]> granicus.if.org Git - libx264/commitdiff
cosmetics in mc_chroma
authorLoren Merritt <pengvado@videolan.org>
Wed, 8 Feb 2006 00:53:35 +0000 (00:53 +0000)
committerLoren Merritt <pengvado@videolan.org>
Wed, 8 Feb 2006 00:53:35 +0000 (00:53 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@420 df754926-b1dd-0310-bc7b-ec298dee348c

common/amd64/mc-a.asm
common/i386/mc-a.asm
common/i386/mc.h
common/mc.c

index b55e86f983cf66a242331501cbb215819aa60900..debb6aef5c6577c3f875bdf63ae9cfe66be285cf 100644 (file)
@@ -70,7 +70,7 @@ cglobal x264_mc_copy_w8_mmxext
 cglobal x264_mc_copy_w16_mmxext
 cglobal x264_mc_copy_w16_sse2
 
-cglobal x264_mc_chroma_sse
+cglobal x264_mc_chroma_mmxext
 
 ;=============================================================================
 ; pixel avg
@@ -403,13 +403,13 @@ ALIGN 4
 
 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
 
@@ -432,7 +432,7 @@ x264_mc_chroma_sse:
 
     mov     rax, parm1q
     mov     r10, parm3q
-    mov     r11d, parm7d
+    mov     r11d, parm8d
 
 ALIGN 4
 .height_loop
@@ -468,14 +468,12 @@ ALIGN 4
     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
index 5ade06f1d93f3543e6e0693a6b74c079dd7ebe5a..949b68c6b37fc680957f4db1de3cda00527d6ac9 100644 (file)
@@ -74,7 +74,7 @@ cglobal x264_mc_copy_w8_mmxext
 cglobal x264_mc_copy_w16_mmxext
 cglobal x264_mc_copy_w16_sse2
 
-cglobal x264_mc_chroma_sse
+cglobal x264_mc_chroma_mmxext
 
 ;=============================================================================
 ; pixel avg
@@ -504,27 +504,27 @@ ALIGN 4
 
 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
@@ -537,7 +537,7 @@ x264_mc_chroma_sse:
     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
@@ -573,14 +573,12 @@ ALIGN 4
     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
index 69766167270c60a345f6b846d0041db46b801967..bde31b0dd64d0d245194a48df8cc672ea3e1e02a 100644 (file)
@@ -27,8 +27,7 @@
 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
index 3087b40247bb3af2d3206ef302e254978621b679..9750818ae855a2ce0bedab6e07f1a4c3dd11a3ec 100644 (file)
@@ -323,7 +323,7 @@ static void motion_compensation_chroma( uint8_t *src, int i_src_stride,
 }
 
 #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 )
@@ -337,8 +337,8 @@ static void motion_compensation_chroma_sse( uint8_t *src, int i_src_stride,
         
         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
@@ -374,7 +374,7 @@ void x264_mc_init( int cpu, x264_mc_functions_t *pf )
 #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