[x264-devel] x86: AVX2 high bit-depth pixel_ssd

Henrik Gramner git at videolan.org
Tue Apr 23 23:03:08 CEST 2013


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Tue Apr 16 23:27:50 2013 +0200| [44abaee949b7c48efa5b02346443c5f91d918af8] | committer: Jason Garrett-Glaser

x86: AVX2 high bit-depth pixel_ssd

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=44abaee949b7c48efa5b02346443c5f91d918af8
---

 common/pixel.c         |    1 +
 common/x86/pixel-a.asm |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/pixel.c b/common/pixel.c
index 13b566c..4a00834 100644
--- a/common/pixel.c
+++ b/common/pixel.c
@@ -989,6 +989,7 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
     }
     if( cpu&X264_CPU_AVX2 )
     {
+        INIT2( ssd, _avx2 );
         INIT2( sad, _avx2 );
         INIT2_NAME( sad_aligned, sad, _avx2 );
         INIT2( sad_x3, _avx2 );
diff --git a/common/x86/pixel-a.asm b/common/x86/pixel-a.asm
index 29fc0cc..a89aa14 100644
--- a/common/x86/pixel-a.asm
+++ b/common/x86/pixel-a.asm
@@ -150,7 +150,7 @@ cextern hsub_mul
 
 %if HIGH_BIT_DEPTH
 ;-----------------------------------------------------------------------------
-; int pixel_ssd_MxN( uint16_t *, intptr_t, uint16_t *, intptr_t )
+; int pixel_ssd_WxH( uint16_t *, intptr_t, uint16_t *, intptr_t )
 ;-----------------------------------------------------------------------------
 %macro SSD_ONE 2
 cglobal pixel_ssd_%1x%2, 4,7,6
@@ -210,7 +210,7 @@ cglobal pixel_ssd_%1x%2, 4,7,6
     jg .loop
 %endif
     HADDD   m0, m5
-    movd   eax, m0
+    movd   eax, xm0
     RET
 %endmacro
 
@@ -229,6 +229,9 @@ SSD_ONE     8,  8
 SSD_ONE     8, 16
 SSD_ONE    16,  8
 SSD_ONE    16, 16
+INIT_YMM avx2
+SSD_ONE    16,  8
+SSD_ONE    16, 16
 %endif ; HIGH_BIT_DEPTH
 
 %if HIGH_BIT_DEPTH == 0



More information about the x264-devel mailing list