]> granicus.if.org Git - libx264/commitdiff
use x264_mc_copy_w16_sse2 in mc.copy, it was previously only in mc_luma
authorLoren Merritt <pengvado@akuvian.org>
Fri, 21 Mar 2008 01:35:54 +0000 (19:35 -0600)
committerLoren Merritt <pengvado@akuvian.org>
Fri, 21 Mar 2008 01:35:54 +0000 (19:35 -0600)
common/x86/mc-a.asm
common/x86/mc-c.c

index 0296fbd6e5f6c81c3fad9f7a4920d757ed69a80b..b262e391212a64044bc4287310d61455add5405d 100644 (file)
@@ -341,14 +341,15 @@ cglobal x264_mc_copy_w16_mmx, 5,7
     jg      .height_loop
     REP_RET
 
-cglobal x264_mc_copy_w16_sse2, 5,7
+%macro COPY_W16_SSE2 2
+cglobal %1, 5,7
     lea     r6, [r3*3]
     lea     r5, [r1*3]
 .height_loop:
-    movdqu  xmm0, [r2]
-    movdqu  xmm1, [r2+r3]
-    movdqu  xmm2, [r2+r3*2]
-    movdqu  xmm3, [r2+r6]
+    %2      xmm0, [r2]
+    %2      xmm1, [r2+r3]
+    %2      xmm2, [r2+r3*2]
+    %2      xmm3, [r2+r6]
     movdqa  [r0], xmm0
     movdqa  [r0+r1], xmm1
     movdqa  [r0+r1*2], xmm2
@@ -358,6 +359,10 @@ cglobal x264_mc_copy_w16_sse2, 5,7
     sub     r4d, 4
     jg      .height_loop
     REP_RET
+%endmacro
+
+COPY_W16_SSE2 x264_mc_copy_w16_sse2, movdqu
+COPY_W16_SSE2 x264_mc_copy_w16_aligned_sse2, movdqa
 
 
 
index 5d855dea063f32cff814a7536420b50e73d032f7..9c5345156ef5cfe6767371f5588dd27aa3e92fd8 100644 (file)
@@ -49,6 +49,7 @@ extern void x264_mc_copy_w4_mmx( uint8_t *, int, uint8_t *, int, int );
 extern void x264_mc_copy_w8_mmx( uint8_t *, int, uint8_t *, int, int );
 extern void x264_mc_copy_w16_mmx( uint8_t *, int, uint8_t *, int, int );
 extern void x264_mc_copy_w16_sse2( uint8_t *, int, uint8_t *, int, int );
+extern void x264_mc_copy_w16_aligned_sse2( uint8_t *, int, uint8_t *, int, int );
 extern void x264_pixel_avg_weight_4x4_mmxext( uint8_t *, int, uint8_t *, int, int );
 extern void x264_pixel_avg_weight_w8_mmxext( uint8_t *, int, uint8_t *, int, int, int );
 extern void x264_pixel_avg_weight_w16_mmxext( uint8_t *, int, uint8_t *, int, int, int );
@@ -215,6 +216,7 @@ void x264_mc_init_mmx( int cpu, x264_mc_functions_t *pf )
 
     pf->mc_luma = mc_luma_sse2;
     pf->get_ref = get_ref_sse2;
+    pf->copy[PIXEL_16x16] = x264_mc_copy_w16_aligned_sse2;
     pf->avg[PIXEL_16x16] = x264_pixel_avg_16x16_sse2;
     pf->avg[PIXEL_16x8]  = x264_pixel_avg_16x8_sse2;
 }