[x264-devel] [PATCH 5/5] x86: XOP pixel_sadx_{x3, x4} high bit-depth

James Almer jamrial at gmail.com
Wed Apr 9 08:33:06 CEST 2014


Signed-off-by: James Almer <jamrial at gmail.com>
---
 common/pixel.c         |  2 ++
 common/x86/pixel.h     |  1 +
 common/x86/sad16-a.asm | 13 +++++++++++++
 3 files changed, 16 insertions(+)

diff --git a/common/pixel.c b/common/pixel.c
index df6ac68..31e6f83 100644
--- a/common/pixel.c
+++ b/common/pixel.c
@@ -1021,6 +1021,8 @@ void x264_pixel_init( int cpu, x264_pixel_function_t *pixf )
     }
     if( cpu&X264_CPU_XOP )
     {
+        INIT5( sad_x3, _xop );
+        INIT5( sad_x4, _xop );
         pixf->ssd_nv12_core    = x264_pixel_ssd_nv12_core_xop;
         pixf->var[PIXEL_16x16] = x264_pixel_var_16x16_xop;
         pixf->var[PIXEL_8x8]   = x264_pixel_var_8x8_xop;
diff --git a/common/x86/pixel.h b/common/x86/pixel.h
index 4568da6..27c7a54 100644
--- a/common/x86/pixel.h
+++ b/common/x86/pixel.h
@@ -56,6 +56,7 @@ DECL_X4( sad, mmx2 )
 DECL_X4( sad, sse2 )
 DECL_X4( sad, sse3 )
 DECL_X4( sad, ssse3 )
+DECL_X4( sad, xop )
 DECL_X4( sad, avx )
 DECL_X4( sad, avx2 )
 DECL_X1( ssd, mmx )
diff --git a/common/x86/sad16-a.asm b/common/x86/sad16-a.asm
index ebfe9b5..5b5e9c8 100644
--- a/common/x86/sad16-a.asm
+++ b/common/x86/sad16-a.asm
@@ -519,6 +519,19 @@ SAD_X 4, 16,  8
 SAD_X 4,  8, 16
 SAD_X 4,  8,  8
 SAD_X 4,  8,  4
+INIT_XMM xop
+%define XMM_REGS 7
+SAD_X 3, 16, 16
+SAD_X 3, 16,  8
+SAD_X 3,  8, 16
+SAD_X 3,  8,  8
+SAD_X 3,  8,  4
+%define XMM_REGS 9
+SAD_X 4, 16, 16
+SAD_X 4, 16,  8
+SAD_X 4,  8, 16
+SAD_X 4,  8,  8
+SAD_X 4,  8,  4
 INIT_YMM avx2
 %define XMM_REGS 7
 SAD_X 3, 16, 16
-- 
1.8.3.2



More information about the x264-devel mailing list