[x265] [PATCH] asm: avx2 code for sad[32x64] for 8bpp
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Wed Mar 11 12:48:56 CET 2015
# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1426074528 -19800
# Node ID 2d7b1eef74d0c0cc42035d5b82759750b62f2ba9
# Parent ccf70e5d0142ee558c27968a70d1bc9a2002dbb9
asm: avx2 code for sad[32x64] for 8bpp
SSE3
sad[32x64] 37.61x 1402.92 52759.16
AVX2
sad[32x64] 53.95x 909.12 49048.07
diff -r ccf70e5d0142 -r 2d7b1eef74d0 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Mar 11 16:58:21 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Mar 11 17:18:48 2015 +0530
@@ -1447,6 +1447,7 @@
p.pu[LUMA_32x8].sad = x265_pixel_sad_32x8_avx2;
p.pu[LUMA_32x16].sad = x265_pixel_sad_32x16_avx2;
p.pu[LUMA_32x24].sad = x265_pixel_sad_32x24_avx2;
+ p.pu[LUMA_32x64].sad = x265_pixel_sad_32x64_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;
diff -r ccf70e5d0142 -r 2d7b1eef74d0 source/common/x86/sad-a.asm
--- a/source/common/x86/sad-a.asm Wed Mar 11 16:58:21 2015 +0530
+++ b/source/common/x86/sad-a.asm Wed Mar 11 17:18:48 2015 +0530
@@ -4006,6 +4006,33 @@
RET
INIT_YMM avx2
+cglobal pixel_sad_32x64, 4,4,5
+ xorps m0, m0
+%assign x 0
+%rep 32
+ movu m1, [r0] ; row 0 of pix0
+ movu m2, [r2] ; row 0 of pix1
+ movu m3, [r0 + r1] ; row 1 of pix0
+ movu m4, [r2 + r3] ; row 1 of pix1
+
+ psadbw m1, m2
+ psadbw m3, m4
+ paddd m0, m1
+ paddd m0, m3
+%assign x x+1
+ %if x < 32
+ lea r2, [r2 + 2 * r3]
+ lea r0, [r0 + 2 * r1]
+ %endif
+%endrep
+ vextracti128 xm1, m0, 1
+ paddd xm0, xm1
+ pshufd xm1, xm0, 2
+ paddd xm0,xm1
+ movd eax, xm0
+ RET
+
+INIT_YMM avx2
cglobal pixel_sad_64x64, 4,4,5
xorps m0, m0
More information about the x265-devel
mailing list