[x265] [PATCH] asm: avx2 code for sad_x3[8x8] for 8bpp
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Tue Mar 10 08:10:55 CET 2015
# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1425971445 -19800
# Node ID 881ed7b0739f896a22f11b524aac6466e1972111
# Parent 71fea29034b0de0d3361069628ddb6f933391851
asm: avx2 code for sad_x3[8x8] for 8bpp
SSE3
sad_x3[ 8x8] 60.97x 368.45 22464.34
AVX2
sad_x3[ 8x8] 66.54x 339.03 22558.79
diff -r 71fea29034b0 -r 881ed7b0739f source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Mar 10 12:28:50 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue Mar 10 12:40:45 2015 +0530
@@ -1443,6 +1443,7 @@
p.pu[LUMA_8x8].satd = x265_pixel_satd_8x8_avx2;
p.pu[LUMA_8x4].sad_x3 = x265_pixel_sad_x3_8x4_avx2;
+ p.pu[LUMA_8x8].sad_x3 = x265_pixel_sad_x3_8x8_avx2;
p.pu[LUMA_16x8].sad_x4 = x265_pixel_sad_x4_16x8_avx2;
p.pu[LUMA_16x12].sad_x4 = x265_pixel_sad_x4_16x12_avx2;
diff -r 71fea29034b0 -r 881ed7b0739f source/common/x86/sad-a.asm
--- a/source/common/x86/sad-a.asm Tue Mar 10 12:28:50 2015 +0530
+++ b/source/common/x86/sad-a.asm Tue Mar 10 12:40:45 2015 +0530
@@ -3766,4 +3766,47 @@
movq [r5 + 0], xm0
movd [r5 + 8], xm1
RET
+
+INIT_YMM avx2
+cglobal pixel_sad_x3_8x8, 6,6,5
+ xorps m0, m0
+ xorps m1, m1
+
+ sub r2, r1 ; rebase on pointer r1
+ sub r3, r1
+%assign x 0
+%rep 4
+ ; row 0
+ vpbroadcastq xm2, [r0 + 0 * FENC_STRIDE]
+ movq xm3, [r1]
+ movhps xm3, [r1 + r2]
+ movq xm4, [r1 + r3]
+ psadbw xm3, xm2
+ psadbw xm4, xm2
+ paddd xm0, xm3
+ paddd xm1, xm4
+ add r1, r4
+
+ ; row 1
+ vpbroadcastq xm2, [r0 + 1 * FENC_STRIDE]
+ movq xm3, [r1]
+ movhps xm3, [r1 + r2]
+ movq xm4, [r1 + r3]
+ psadbw xm3, xm2
+ psadbw xm4, xm2
+ paddd xm0, xm3
+ paddd xm1, xm4
+
+%assign x x+1
+ %if x < 4
+ add r1, r4
+ add r0, 2 * FENC_STRIDE
+ %endif
+%endrep
+
+ pshufd xm0, xm0, q0020
+ movq [r5 + 0], xm0
+ movd [r5 + 8], xm1
+ RET
+
%endif
More information about the x265-devel
mailing list