Commit b5d6d038 authored by Loren Merritt's avatar Loren Merritt

cosmetics: reorder mc_luma/mc_chroma/get_ref arguments for consistency with other functions


git-svn-id: svn://svn.videolan.org/x264/trunk@694 df754926-b1dd-0310-bc7b-ec298dee348c
parent 94c55d8c
......@@ -421,8 +421,8 @@ ALIGN 4
;=============================================================================
;-----------------------------------------------------------------------------
; void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
; uint8_t *dst, int i_dst_stride,
; void x264_mc_chroma_mmxext( uint8_t *dst, int i_dst_stride,
; uint8_t *src, int i_src_stride,
; int dx, int dy,
; int i_width, int i_height )
;-----------------------------------------------------------------------------
......@@ -431,12 +431,12 @@ cglobal x264_mc_chroma_mmxext
mov r11d, parm5d
sar r10d, 3
sar r11d, 3
imul r10d, parm2d
imul r10d, parm4d
pxor mm3, mm3
add r10d, r11d
movsxd r10, r10d
mov r11d, parm8d
add parm1q, r10 ; src += (dx>>3) + (dy>>3) * src_stride
add parm3q, r10 ; src += (dx>>3) + (dy>>3) * src_stride
and parm5d, 7 ; dx &= 7
je .mc1d
and parm6d, 7 ; dy &= 7
......@@ -460,13 +460,13 @@ cglobal x264_mc_chroma_mmxext
pmullw mm6, mm4 ; mm6 = (8-dx)*dy = cC
pmullw mm4, mm0 ; mm4 = (8-dx)*(8-dy) = cA
mov rax, parm1q
mov r10, parm3q
mov rax, parm3q
mov r10, parm1q
ALIGN 4
.height_loop
movd mm1, [rax+parm2q]
movd mm1, [rax+parm4q]
movd mm0, [rax]
punpcklbw mm1, mm3 ; 00 px1 | 00 px2 | 00 px3 | 00 px4
punpcklbw mm0, mm3
......@@ -476,7 +476,7 @@ ALIGN 4
paddw mm0, mm1 ; mm0 <- result
movd mm2, [rax+1]
movd mm1, [rax+parm2q+1]
movd mm1, [rax+parm4q+1]
punpcklbw mm2, mm3
punpcklbw mm1, mm3
......@@ -491,16 +491,16 @@ ALIGN 4
packuswb mm0, mm3 ; 00 00 00 00 px1 px2 px3 px4
movd [r10], mm0
add rax, parm2q
add r10, parm4q ; i_dst_stride
add rax, parm4q
add r10, parm2q ; i_dst_stride
dec r11d
jnz .height_loop
sub parm7d, 8
jnz .finish ; width != 8 so assume 4
mov r10, parm3q ; dst
mov rax, parm1q ; src
mov r10, parm1q ; dst
mov rax, parm3q ; src
mov r11d, parm8d ; i_height
add r10, 4
add rax, 4
......@@ -511,17 +511,13 @@ ALIGN 4
ALIGN 4
.mc1d
%ifdef WIN64
%define pel_offset rsi
%else
%define pel_offset r9
%endif
%define pel_offset temp1q
mov eax, parm5d
or eax, parm6d
and eax, 7
cmp parm5d, 0
mov pel_offset, 1
cmove pel_offset, parm2q ; pel_offset = dx ? 1 : src_stride
cmove pel_offset, parm4q ; pel_offset = dx ? 1 : src_stride
movd mm6, eax
movq mm5, [pw_8 GLOBAL]
pshufw mm6, mm6, 0
......@@ -533,8 +529,8 @@ ALIGN 4
ALIGN 4
.height_loop1_w4
movd mm0, [parm1q+pel_offset]
movd mm1, [parm1q]
movd mm0, [parm3q+pel_offset]
movd mm1, [parm3q]
punpcklbw mm0, mm3
punpcklbw mm1, mm3
pmullw mm0, mm6
......@@ -543,17 +539,17 @@ ALIGN 4
paddw mm0, mm1
psrlw mm0, 3
packuswb mm0, mm3
movd [parm3q], mm0
add parm1q, parm2q
movd [parm1q], mm0
add parm3q, parm4q
add parm1q, parm2q
dec r11d
jnz .height_loop1_w4
rep ret
ALIGN 4
.height_loop1_w8
movq mm0, [parm1q+pel_offset]
movq mm1, [parm1q]
movq mm0, [parm3q+pel_offset]
movq mm1, [parm3q]
movq mm2, mm0
movq mm4, mm1
punpcklbw mm0, mm3
......@@ -571,9 +567,9 @@ ALIGN 4
psrlw mm0, 3
psrlw mm2, 3
packuswb mm0, mm2
movq [parm3q], mm0
add parm1q, parm2q
movq [parm1q], mm0
add parm3q, parm4q
add parm1q, parm2q
dec r11d
jnz .height_loop1_w8
rep ret
......
......@@ -484,8 +484,8 @@ ALIGN 4
;=============================================================================
;-----------------------------------------------------------------------------
; void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
; uint8_t *dst, int i_dst_stride,
; void x264_mc_chroma_mmxext( uint8_t *dst, int i_dst_stride,
; uint8_t *src, int i_src_stride,
; int dx, int dy,
; int i_width, int i_height )
;-----------------------------------------------------------------------------
......@@ -501,9 +501,9 @@ cglobal x264_mc_chroma_mmxext
mov edi, edx
sar ecx, 3
sar edx, 3
imul ecx, [picesp+4+8]
imul ecx, [picesp+4+16]
add ecx, edx
add [picesp+4+4], ecx ; src += (dx>>3) + (dy>>3) * src_stride
add [picesp+4+12], ecx ; src += (dx>>3) + (dy>>3) * src_stride
pxor mm3, mm3
......@@ -526,9 +526,9 @@ cglobal x264_mc_chroma_mmxext
pmullw mm6, mm4 ; mm6 = (8-dx)*dy = cC
pmullw mm4, mm0 ; mm4 = (8-dx)*(8-dy) = cA
mov eax, [picesp+4+4] ; src
mov edi, [picesp+4+12] ; dst
mov ecx, [picesp+4+8] ; i_src_stride
mov eax, [picesp+4+12] ; src
mov edi, [picesp+4+4] ; dst
mov ecx, [picesp+4+16] ; i_src_stride
mov edx, [picesp+4+32] ; i_height
ALIGN 4
......@@ -560,7 +560,7 @@ ALIGN 4
movd [edi], mm0
add eax, ecx
add edi, [picesp+4+16]
add edi, [picesp+4+8]
dec edx
jnz .height_loop
......@@ -568,8 +568,8 @@ ALIGN 4
sub [picesp+4+28], dword 8
jnz .finish ; width != 8 so assume 4
mov edi, [picesp+4+12] ; dst
mov eax, [picesp+4+4] ; src
mov edi, [picesp+4+4] ; dst
mov eax, [picesp+4+12] ; src
mov edx, [picesp+4+32] ; i_height
add edi, 4
add eax, 4
......
......@@ -84,8 +84,8 @@ static void (* const x264_mc_copy_wtab_mmx[5])( uint8_t *, int, uint8_t *, int,
static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
void mc_luma_mmx( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int i_dst_stride,
void mc_luma_mmx( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......@@ -107,8 +107,8 @@ void mc_luma_mmx( uint8_t *src[4], int i_src_stride,
}
}
uint8_t *get_ref_mmx( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int *i_dst_stride,
uint8_t *get_ref_mmx( uint8_t *dst, int *i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......
......@@ -589,21 +589,21 @@ static inline void x264_mb_mc_0xywh( x264_t *h, int x, int y, int width, int hei
const int mvx = x264_clip3( h->mb.cache.mv[0][i8][0], h->mb.mv_min[0], h->mb.mv_max[0] );
int mvy = x264_clip3( h->mb.cache.mv[0][i8][1], h->mb.mv_min[1], h->mb.mv_max[1] );
h->mc.mc_luma( h->mb.pic.p_fref[0][i_ref], h->mb.pic.i_stride[0],
&h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE,
mvx + 4*4*x, mvy + 4*4*y, 4*width, 4*height );
h->mc.mc_luma( &h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE,
h->mb.pic.p_fref[0][i_ref], h->mb.pic.i_stride[0],
mvx + 4*4*x, mvy + 4*4*y, 4*width, 4*height );
// chroma is offset if MCing from a field of opposite parity
if( h->mb.b_interlaced & i_ref )
mvy += (h->mb.i_mb_y & 1)*4 - 2;
h->mc.mc_chroma( &h->mb.pic.p_fref[0][i_ref][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
&h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
&h->mb.pic.p_fref[0][i_ref][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fref[0][i_ref][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
&h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
&h->mb.pic.p_fref[0][i_ref][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
mvx, mvy, 2*width, 2*height );
}
static inline void x264_mb_mc_1xywh( x264_t *h, int x, int y, int width, int height )
{
......@@ -612,20 +612,20 @@ static inline void x264_mb_mc_1xywh( x264_t *h, int x, int y, int width, int hei
const int mvx = x264_clip3( h->mb.cache.mv[1][i8][0], h->mb.mv_min[0], h->mb.mv_max[0] );
int mvy = x264_clip3( h->mb.cache.mv[1][i8][1], h->mb.mv_min[1], h->mb.mv_max[1] );
h->mc.mc_luma( h->mb.pic.p_fref[1][i_ref], h->mb.pic.i_stride[0],
&h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE,
mvx + 4*4*x, mvy + 4*4*y, 4*width, 4*height );
h->mc.mc_luma( &h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE,
h->mb.pic.p_fref[1][i_ref], h->mb.pic.i_stride[0],
mvx + 4*4*x, mvy + 4*4*y, 4*width, 4*height );
if( h->mb.b_interlaced & i_ref )
mvy += (h->mb.i_mb_y & 1)*4 - 2;
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
&h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
&h->mb.pic.p_fref[1][i_ref][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
&h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
mvx, mvy, 2*width, 2*height );
h->mc.mc_chroma( &h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE,
&h->mb.pic.p_fref[1][i_ref][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
mvx, mvy, 2*width, 2*height );
}
static inline void x264_mb_mc_01xywh( x264_t *h, int x, int y, int width, int height )
......@@ -640,8 +640,8 @@ static inline void x264_mb_mc_01xywh( x264_t *h, int x, int y, int width, int he
x264_mb_mc_0xywh( h, x, y, width, height );
h->mc.mc_luma( h->mb.pic.p_fref[1][i_ref1], h->mb.pic.i_stride[0],
tmp, 16, mvx1 + 4*4*x, mvy1 + 4*4*y, 4*width, 4*height );
h->mc.mc_luma( tmp, 16, h->mb.pic.p_fref[1][i_ref1], h->mb.pic.i_stride[0],
mvx1 + 4*4*x, mvy1 + 4*4*y, 4*width, 4*height );
if( h->mb.b_interlaced & i_ref1 )
mvy1 += (h->mb.i_mb_y & 1)*4 - 2;
......@@ -653,24 +653,24 @@ static inline void x264_mb_mc_01xywh( x264_t *h, int x, int y, int width, int he
h->mc.avg_weight[i_mode]( &h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE, tmp, 16, weight );
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref1][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
tmp, 16, mvx1, mvy1, 2*width, 2*height );
h->mc.mc_chroma( tmp, 16, &h->mb.pic.p_fref[1][i_ref1][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
mvx1, mvy1, 2*width, 2*height );
h->mc.avg_weight[i_mode+3]( &h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE, tmp, 16, weight );
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref1][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
tmp, 16, mvx1, mvy1, 2*width, 2*height );
h->mc.mc_chroma( tmp, 16, &h->mb.pic.p_fref[1][i_ref1][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
mvx1, mvy1, 2*width, 2*height );
h->mc.avg_weight[i_mode+3]( &h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE, tmp, 16, weight );
}
else
{
h->mc.avg[i_mode]( &h->mb.pic.p_fdec[0][4*y*FDEC_STRIDE+4*x], FDEC_STRIDE, tmp, 16 );
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref1][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
tmp, 16, mvx1, mvy1, 2*width, 2*height );
h->mc.mc_chroma( tmp, 16, &h->mb.pic.p_fref[1][i_ref1][4][2*y*h->mb.pic.i_stride[1]+2*x], h->mb.pic.i_stride[1],
mvx1, mvy1, 2*width, 2*height );
h->mc.avg[i_mode+3]( &h->mb.pic.p_fdec[1][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE, tmp, 16 );
h->mc.mc_chroma( &h->mb.pic.p_fref[1][i_ref1][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
tmp, 16, mvx1, mvy1, 2*width, 2*height );
h->mc.mc_chroma( tmp, 16, &h->mb.pic.p_fref[1][i_ref1][5][2*y*h->mb.pic.i_stride[2]+2*x], h->mb.pic.i_stride[2],
mvx1, mvy1, 2*width, 2*height );
h->mc.avg[i_mode+3]( &h->mb.pic.p_fdec[2][2*y*FDEC_STRIDE+2*x], FDEC_STRIDE, tmp, 16 );
}
}
......
......@@ -231,8 +231,8 @@ static void hpel_filter( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *s
static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
static void mc_luma( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int i_dst_stride,
static void mc_luma( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......@@ -252,8 +252,8 @@ static void mc_luma( uint8_t *src[4], int i_src_stride,
}
}
static uint8_t *get_ref( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int *i_dst_stride,
static uint8_t *get_ref( uint8_t *dst, int *i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......@@ -276,10 +276,10 @@ static uint8_t *get_ref( uint8_t *src[4], int i_src_stride,
}
/* full chroma mc (ie until 1/8 pixel)*/
static void motion_compensation_chroma( uint8_t *src, int i_src_stride,
uint8_t *dst, int i_dst_stride,
int mvx, int mvy,
int i_width, int i_height )
static void mc_chroma( uint8_t *dst, int i_dst_stride,
uint8_t *src, int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
uint8_t *srcp;
int x, y;
......@@ -340,7 +340,7 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf )
{
pf->mc_luma = mc_luma;
pf->get_ref = get_ref;
pf->mc_chroma = motion_compensation_chroma;
pf->mc_chroma = mc_chroma;
pf->avg[PIXEL_16x16]= pixel_avg_16x16;
pf->avg[PIXEL_16x8] = pixel_avg_16x8;
......
......@@ -33,18 +33,18 @@
typedef struct
{
void (*mc_luma)(uint8_t **, int, uint8_t *, int,
void (*mc_luma)(uint8_t *dst, int i_dst, uint8_t **src, int i_src,
int mvx, int mvy,
int i_width, int i_height );
/* may round up the dimensions if they're not a power of 2 */
uint8_t* (*get_ref)(uint8_t **, int, uint8_t *, int *,
uint8_t* (*get_ref)(uint8_t *dst, int *i_dst, uint8_t **src, int i_src,
int mvx, int mvy,
int i_width, int i_height );
/* mc_chroma may write up to 2 bytes of garbage to the right of dst,
* so it must be run from left to right. */
void (*mc_chroma)(uint8_t *, int, uint8_t *, int,
void (*mc_chroma)(uint8_t *dst, int i_dst, uint8_t *src, int i_src,
int mvx, int mvy,
int i_width, int i_height );
......
......@@ -132,8 +132,8 @@ MC_COPY( mc_copy_w4, 4 )
MC_COPY( mc_copy_w8, 8 )
MC_COPY( mc_copy_w16, 16 )
void mc_luma_altivec( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int i_dst_stride,
void mc_luma_altivec( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......@@ -190,8 +190,8 @@ void mc_luma_altivec( uint8_t *src[4], int i_src_stride,
}
}
uint8_t *get_ref_altivec( uint8_t *src[4], int i_src_stride,
uint8_t *dst, int * i_dst_stride,
uint8_t *get_ref_altivec( uint8_t *dst, int * i_dst_stride,
uint8_t *src[4], int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
......@@ -253,8 +253,8 @@ uint8_t *get_ref_altivec( uint8_t *src[4], int i_src_stride,
src##a##v_16 = vec_mladd( coeff##a##v, src##a##v_16, zero_u16v ); \
dstv_16 = vec_add( dstv_16, src##a##v_16 )
static void mc_chroma_altivec_4xh( uint8_t *src, int i_src_stride,
uint8_t *dst, int i_dst_stride,
static void mc_chroma_altivec_4xh( uint8_t *dst, int i_dst_stride,
uint8_t *src, int i_src_stride,
int mvx, int mvy,
int i_height )
{
......@@ -319,8 +319,8 @@ static void mc_chroma_altivec_4xh( uint8_t *src, int i_src_stride,
}
}
static void mc_chroma_altivec_8xh( uint8_t *src, int i_src_stride,
uint8_t *dst, int i_dst_stride,
static void mc_chroma_altivec_8xh( uint8_t *dst, int i_dst_stride,
uint8_t *src, int i_src_stride,
int mvx, int mvy,
int i_height )
{
......@@ -385,19 +385,19 @@ static void mc_chroma_altivec_8xh( uint8_t *src, int i_src_stride,
}
}
static void mc_chroma_altivec( uint8_t *src, int i_src_stride,
uint8_t *dst, int i_dst_stride,
static void mc_chroma_altivec( uint8_t *dst, int i_dst_stride,
uint8_t *src, int i_src_stride,
int mvx, int mvy,
int i_width, int i_height )
{
if( i_width == 8 )
{
mc_chroma_altivec_8xh( src, i_src_stride, dst, i_dst_stride,
mc_chroma_altivec_8xh( dst, i_dst_stride, src, i_src_stride,
mvx, mvy, i_height );
}
else
{
mc_chroma_altivec_4xh( src, i_src_stride, dst, i_dst_stride,
mc_chroma_altivec_4xh( dst, i_dst_stride, src, i_src_stride,
mvx, mvy, i_height );
}
}
......
......@@ -1236,8 +1236,8 @@ static int x264_mb_analyse_inter_p4x4_chroma( x264_t *h, x264_mb_analysis_t *a,
const int oe = 4*(i8x8&1) + 2*(i8x8&2)*FENC_STRIDE;
#define CHROMA4x4MC( width, height, me, x, y ) \
h->mc.mc_chroma( &p_fref[4][or+x+y*i_stride], i_stride, &pix1[x+y*16], 16, (me).mv[0], (me).mv[1], width, height ); \
h->mc.mc_chroma( &p_fref[5][or+x+y*i_stride], i_stride, &pix2[x+y*16], 16, (me).mv[0], (me).mv[1], width, height );
h->mc.mc_chroma( &pix1[x+y*16], 16, &p_fref[4][or+x+y*i_stride], i_stride, (me).mv[0], (me).mv[1], width, height ); \
h->mc.mc_chroma( &pix2[x+y*16], 16, &p_fref[5][or+x+y*i_stride], i_stride, (me).mv[0], (me).mv[1], width, height );
if( pixel == PIXEL_4x4 )
{
......@@ -1488,27 +1488,29 @@ static void x264_mb_analyse_inter_b16x16( x264_t *h, x264_mb_analysis_t *a )
if ( ((a->l0.me16x16.mv[0] | a->l0.me16x16.mv[1]) & 1) == 0 )
{
/* l0 reference is halfpel, so get_ref on it will make it faster */
src2 = h->mc.get_ref( h->mb.pic.p_fref[0][a->l0.i_ref], h->mb.pic.i_stride[0],
pix2, &stride2,
a->l0.me16x16.mv[0], a->l0.me16x16.mv[1],
16, 16 );
h->mc.mc_luma( h->mb.pic.p_fref[1][a->l1.i_ref], h->mb.pic.i_stride[0],
pix1, 16,
a->l1.me16x16.mv[0], a->l1.me16x16.mv[1],
16, 16 );
src2 =
h->mc.get_ref( pix2, &stride2,
h->mb.pic.p_fref[0][a->l0.i_ref], h->mb.pic.i_stride[0],
a->l0.me16x16.mv[0], a->l0.me16x16.mv[1],
16, 16 );
h->mc.mc_luma( pix1, 16,
h->mb.pic.p_fref[1][a->l1.i_ref], h->mb.pic.i_stride[0],
a->l1.me16x16.mv[0], a->l1.me16x16.mv[1],
16, 16 );
weight = 64 - weight;
}
else
{
/* if l0 was qpel, we'll use get_ref on l1 instead */
h->mc.mc_luma( h->mb.pic.p_fref[0][a->l0.i_ref], h->mb.pic.i_stride[0],
pix1, 16,
a->l0.me16x16.mv[0], a->l0.me16x16.mv[1],
16, 16 );
src2 = h->mc.get_ref( h->mb.pic.p_fref[1][a->l1.i_ref], h->mb.pic.i_stride[0],
pix2, &stride2,
a->l1.me16x16.mv[0], a->l1.me16x16.mv[1],
16, 16 );
h->mc.mc_luma( pix1, 16,
h->mb.pic.p_fref[0][a->l0.i_ref], h->mb.pic.i_stride[0],
a->l0.me16x16.mv[0], a->l0.me16x16.mv[1],
16, 16 );
src2 =
h->mc.get_ref( pix2, &stride2,
h->mb.pic.p_fref[1][a->l1.i_ref], h->mb.pic.i_stride[0],
a->l1.me16x16.mv[0], a->l1.me16x16.mv[1],
16, 16 );
}
if( h->param.analyse.b_weighted_bipred )
......@@ -1650,8 +1652,8 @@ static void x264_mb_analyse_inter_b8x8( x264_t *h, x264_mb_analysis_t *a )
x264_macroblock_cache_mv( h, 2*x8, 2*y8, 2, 2, l, m->mv[0], m->mv[1] );
/* BI mode */
h->mc.mc_luma( m->p_fref, m->i_stride[0], pix[l], 8,
m->mv[0], m->mv[1], 8, 8 );
h->mc.mc_luma( pix[l], 8, m->p_fref, m->i_stride[0],
m->mv[0], m->mv[1], 8, 8 );
i_part_cost_bi += m->cost_mv;
/* FIXME: ref cost */
}
......@@ -1715,8 +1717,8 @@ static void x264_mb_analyse_inter_b16x8( x264_t *h, x264_mb_analysis_t *a )
x264_me_search( h, m, mvc, 2 );
/* BI mode */
h->mc.mc_luma( m->p_fref, m->i_stride[0], pix[l], 16,
m->mv[0], m->mv[1], 16, 8 );
h->mc.mc_luma( pix[l], 16, m->p_fref, m->i_stride[0],
m->mv[0], m->mv[1], 16, 8 );
/* FIXME: ref cost */
i_part_cost_bi += m->cost_mv;
}
......@@ -1785,8 +1787,8 @@ static void x264_mb_analyse_inter_b8x16( x264_t *h, x264_mb_analysis_t *a )
x264_me_search( h, m, mvc, 2 );
/* BI mode */
h->mc.mc_luma( m->p_fref, m->i_stride[0], pix[l], 8,
m->mv[0], m->mv[1], 8, 16 );
h->mc.mc_luma( pix[l], 8, m->p_fref, m->i_stride[0],
m->mv[0], m->mv[1], 8, 16 );
/* FIXME: ref cost */
i_part_cost_bi += m->cost_mv;
}
......
......@@ -296,17 +296,17 @@ void x264_macroblock_encode_pskip( x264_t *h )
h->mb.mv_min[1], h->mb.mv_max[1] );
/* Motion compensation XXX probably unneeded */
h->mc.mc_luma( h->mb.pic.p_fref[0][0], h->mb.pic.i_stride[0],
h->mb.pic.p_fdec[0], FDEC_STRIDE,
h->mc.mc_luma( h->mb.pic.p_fdec[0], FDEC_STRIDE,
h->mb.pic.p_fref[0][0], h->mb.pic.i_stride[0],
mvx, mvy, 16, 16 );
/* Chroma MC */
h->mc.mc_chroma( h->mb.pic.p_fref[0][0][4], h->mb.pic.i_stride[1],
h->mb.pic.p_fdec[1], FDEC_STRIDE,
h->mc.mc_chroma( h->mb.pic.p_fdec[1], FDEC_STRIDE,
h->mb.pic.p_fref[0][0][4], h->mb.pic.i_stride[1],
mvx, mvy, 8, 8 );
h->mc.mc_chroma( h->mb.pic.p_fref[0][0][5], h->mb.pic.i_stride[2],
h->mb.pic.p_fdec[2], FDEC_STRIDE,
h->mc.mc_chroma( h->mb.pic.p_fdec[2], FDEC_STRIDE,
h->mb.pic.p_fref[0][0][5], h->mb.pic.i_stride[2],
mvx, mvy, 8, 8 );
x264_macroblock_encode_skip( h );
......@@ -618,8 +618,8 @@ int x264_macroblock_probe_skip( x264_t *h, const int b_bidir )
mvp[1] = x264_clip3( h->mb.cache.pskip_mv[1], h->mb.mv_min[1], h->mb.mv_max[1] );
/* Motion compensation */