[x265] [PATCH] asm: avx2 code for sad[32x32] for 8bpp
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Mon Mar 16 06:13:23 CET 2015
# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1426482793 -19800
# Node ID 8b3ce08d1ba85d4d31fd48f52efba19c22462254
# Parent 6461985f33ac6fc5b205879bbb0f2a535226ca76
asm: avx2 code for sad[32x32] for 8bpp
sad[32x32] 44.69x 494.86 22114.45
diff -r 6461985f33ac -r 8b3ce08d1ba8 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Sun Mar 15 11:58:32 2015 -0500
+++ b/source/common/x86/asm-primitives.cpp Mon Mar 16 10:43:13 2015 +0530
@@ -1444,6 +1444,8 @@
p.pu[LUMA_8x16].satd = x265_pixel_satd_8x16_avx2;
p.pu[LUMA_8x8].satd = x265_pixel_satd_8x8_avx2;
+ p.pu[LUMA_32x32].sad = x265_pixel_sad_32x32_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_8x16].sad_x3 = x265_pixel_sad_x3_8x16_avx2;
diff -r 6461985f33ac -r 8b3ce08d1ba8 source/common/x86/sad-a.asm
--- a/source/common/x86/sad-a.asm Sun Mar 15 11:58:32 2015 -0500
+++ b/source/common/x86/sad-a.asm Mon Mar 16 10:43:13 2015 +0530
@@ -3897,5 +3897,34 @@
movq [r6 + 8], xm1
RET
+INIT_YMM avx2
+cglobal pixel_sad_32x32, 4,5,5
+ xorps m0, m0
+ mov r4d, 16
+
+.loop
+ 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
+
+ lea r2, [r2 + 2 * r3]
+ lea r0, [r0 + 2 * r1]
+
+ dec r4d
+ jnz .loop
+
+ vextracti128 xm1, m0, 1
+ paddd xm0, xm1
+ pshufd xm1, xm0, 2
+ paddd xm0,xm1
+ movd eax, xm0
+ RET
+
%endif
More information about the x265-devel
mailing list