cglobal x264_mc_copy_w16_mmxext
cglobal x264_mc_copy_w16_sse2
-cglobal x264_mc_chroma_sse
+cglobal x264_mc_chroma_mmxext
;=============================================================================
; pixel avg
ALIGN 16
;-----------------------------------------------------------------------------
-; void x264_mc_chroma_sse( uint8_t *src, int i_src_stride,
+; void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
; uint8_t *dst, int i_dst_stride,
; int dx, int dy,
-; int i_height, int i_width )
+; int i_width, int i_height )
;-----------------------------------------------------------------------------
-x264_mc_chroma_sse:
+x264_mc_chroma_mmxext:
movd mm0, parm5d
movd mm1, parm6d
mov rax, parm1q
mov r10, parm3q
- mov r11d, parm7d
+ mov r11d, parm8d
ALIGN 4
.height_loop
dec r11d
jnz .height_loop
- mov eax, parm8d ; i_width
- sub eax, 8
+ sub parm7d, 8
jnz .finish ; width != 8 so assume 4
- mov parm8d, eax ; i_width
mov r10, parm3q ; dst
mov rax, parm1q ; src
- mov r11d, parm7d ; i_height
+ mov r11d, parm8d ; i_height
add r10, 4
add rax, 4
jmp .height_loop
cglobal x264_mc_copy_w16_mmxext
cglobal x264_mc_copy_w16_sse2
-cglobal x264_mc_chroma_sse
+cglobal x264_mc_chroma_mmxext
;=============================================================================
; pixel avg
ALIGN 16
;-----------------------------------------------------------------------------
-; void x264_mc_chroma_sse( uint8_t *src, int i_src_stride,
+; void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
; uint8_t *dst, int i_dst_stride,
; int dx, int dy,
-; int i_height, int i_width )
+; int i_width, int i_height )
;-----------------------------------------------------------------------------
-x264_mc_chroma_sse:
+x264_mc_chroma_mmxext:
PUSH_EBX_IF_PIC
GET_GOT_IN_EBX_IF_PIC
pxor mm3, mm3
- pshufw mm5, [esp+20], 0 ; mm5 - dx
- pshufw mm6, [esp+24], 0 ; mm6 - dy
+ pshufw mm5, [esp+20], 0 ; mm5 = dx
+ pshufw mm6, [esp+24], 0 ; mm6 = dy
movq mm4, [pw_8 GLOBAL]
movq mm0, mm4
- psubw mm4, mm5 ; mm4 - 8-dx
- psubw mm0, mm6 ; mm0 - 8-dy
+ psubw mm4, mm5 ; mm4 = 8-dx
+ psubw mm0, mm6 ; mm0 = 8-dy
movq mm7, mm5
pmullw mm5, mm0 ; mm5 = dx*(8-dy) = cB
mov eax, [esp+4+4] ; src
mov edi, [esp+4+12] ; dst
mov ecx, [esp+4+8] ; i_src_stride
- mov edx, [esp+4+28] ; i_height
+ mov edx, [esp+4+32] ; i_height
ALIGN 4
.height_loop
dec edx
jnz .height_loop
- mov eax, [esp+4+32]
- sub eax, 8
- jnz .finish ; width != 8 so assume 4
+ sub [esp+4+28], dword 8
+ jnz .finish ; width != 8 so assume 4
- mov [esp+4+32], eax
mov edi, [esp+4+12] ; dst
mov eax, [esp+4+4] ; src
- mov edx, [esp+4+28] ; i_height
+ mov edx, [esp+4+32] ; i_height
add edi, 4
add eax, 4
jmp .height_loop
void x264_mc_mmxext_init( x264_mc_functions_t *pf );
void x264_mc_sse2_init( x264_mc_functions_t *pf );
-void x264_mc_chroma_sse( uint8_t *src, int i_src_stride,
- uint8_t *dst, int i_dst_stride,
- int dx, int dy,
- int i_height, int i_width );
+void x264_mc_chroma_mmxext( uint8_t *src, int i_src_stride,
+ uint8_t *dst, int i_dst_stride,
+ int dx, int dy, int i_width, int i_height );
#endif
}
#ifdef HAVE_MMXEXT
-static void motion_compensation_chroma_sse( uint8_t *src, int i_src_stride,
+static void motion_compensation_chroma_mmxext( uint8_t *src, int i_src_stride,
uint8_t *dst, int i_dst_stride,
int mvx, int mvy,
int i_width, int i_height )
src += (mvy >> 3) * i_src_stride + (mvx >> 3);
- x264_mc_chroma_sse(src, i_src_stride, dst, i_dst_stride,
- d8x, d8y, i_height, i_width);
+ x264_mc_chroma_mmxext( src, i_src_stride, dst, i_dst_stride,
+ d8x, d8y, i_width, i_height );
}
}
#endif
#ifdef HAVE_MMXEXT
if( cpu&X264_CPU_MMXEXT ) {
x264_mc_mmxext_init( pf );
- pf->mc_chroma = motion_compensation_chroma_sse;
+ pf->mc_chroma = motion_compensation_chroma_mmxext;
}
#endif
#ifdef HAVE_SSE2