From 40406b804105964d6b5abea38833d69f6d617815 Mon Sep 17 00:00:00 2001 From: Henrik Gramner Date: Tue, 16 Apr 2013 23:27:50 +0200 Subject: [PATCH] x86: AVX2 high bit-depth pixel_ssd --- 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 13b566c2..4a008343 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 29fc0cc7..a89aa14d 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 -- 2.47.3