[x265] [PATCH] asm: avx2 code for pixel_add_ps[32x32] for 10 bpp - 87x
sumalatha at multicorewareinc.com
sumalatha at multicorewareinc.com
Mon Mar 2 09:53:12 CET 2015
# HG changeset patch
# User Sumalatha Polureddy<sumalatha at multicorewareinc.com>
# Date 1425286371 -19800
# Node ID 360caa3c6a3d41d2b9adc2c5bc64e2f5d611f52b
# Parent eadb74b415c5de7f0cd5360c74ecf0507489de52
asm: avx2 code for pixel_add_ps[32x32] for 10 bpp - 87x
add_ps[32x32] 87.45x 1495.73 130797.27
diff -r eadb74b415c5 -r 360caa3c6a3d source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Mar 02 14:19:34 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Mar 02 14:22:51 2015 +0530
@@ -1071,6 +1071,7 @@
{
p.cu[BLOCK_8x8].add_ps = x265_pixel_add_ps_8x8_avx2;
p.cu[BLOCK_16x16].add_ps = x265_pixel_add_ps_16x16_avx2;
+ p.cu[BLOCK_32x32].add_ps = x265_pixel_add_ps_32x32_avx2;
p.cu[BLOCK_32x32].ssd_s = x265_pixel_ssd_s_32_avx2;
p.cu[BLOCK_16x16].sse_ss = x265_pixel_ssd_ss_16x16_avx2;
diff -r eadb74b415c5 -r 360caa3c6a3d source/common/x86/pixeladd8.asm
--- a/source/common/x86/pixeladd8.asm Mon Mar 02 14:19:34 2015 +0530
+++ b/source/common/x86/pixeladd8.asm Mon Mar 02 14:22:51 2015 +0530
@@ -657,6 +657,67 @@
jnz .loop
RET
+
+INIT_YMM avx2
+cglobal pixel_add_ps_32x%2, 6, 7, 6, dest, destride, src0, scr1, srcStride0, srcStride1
+ mova m5, [pw_pixel_max]
+ pxor m4, m4
+ mov r6d, %2/4
+ add r4, r4
+ add r5, r5
+ add r1, r1
+.loop:
+ movu m0, [r2] ; first 16 of row 0 of src0
+ movu m2, [r2 + 32] ; second 16 of row 0 of src0
+ movu m1, [r3] ; first 16 of row 0 of src1
+ movu m3, [r3 + 32] ; second 16 of row 0 of src1
+ paddw m0, m1
+ paddw m2, m3
+ CLIPW2 m0, m2, m4, m5
+ movu [r0], m0 ; first 16 of row 0 of dst
+ movu [r0 + 32], m2 ; second 16 of row 0 of dst
+
+ movu m0, [r2 + r4] ; first 16 of row 1 of src0
+ movu m2, [r2 + r4 + 32] ; second 16 of row 1 of src0
+ movu m1, [r3 + r5] ; first 16 of row 1 of src1
+ movu m3, [r3 + r5 + 32] ; second 16 of row 1 of src1
+ paddw m0, m1
+ paddw m2, m3
+ CLIPW2 m0, m2, m4, m5
+ movu [r0 + r1], m0 ; first 16 of row 1 of dst
+ movu [r0 + r1 +32], m2 ; second 16 of row 3 of dst
+
+ lea r2, [r2 + r4 * 2]
+ lea r3, [r3 + r5 * 2]
+ lea r0, [r0 + r1 * 2]
+
+ movu m0, [r2] ; first 16 of row 0 of src0
+ movu m2, [r2 + 32] ; second 16 of row 0 of src0
+ movu m1, [r3] ; first 16 of row 0 of src1
+ movu m3, [r3 + 32] ; second 16 of row 0 of src1
+ paddw m0, m1
+ paddw m2, m3
+ CLIPW2 m0, m2, m4, m5
+ movu [r0], m0 ; first 16 of row 0 of dst
+ movu [r0 + 32], m2 ; second 16 of row 0 of dst
+
+ movu m0, [r2 + r4] ; first 16 of row 1 of src0
+ movu m2, [r2 + r4 + 32] ; second 16 of row 1 of src0
+ movu m1, [r3 + r5] ; first 16 of row 1 of src1
+ movu m3, [r3 + r5 + 32] ; second 16 of row 1 of src1
+ paddw m0, m1
+ paddw m2, m3
+ CLIPW2 m0, m2, m4, m5
+ movu [r0 + r1], m0 ; first 16 of row 1 of dst
+ movu [r0 + r1 +32], m2 ; second 16 of row 3 of dst
+
+ lea r2, [r2 + r4 * 2]
+ lea r3, [r3 + r5 * 2]
+ lea r0, [r0 + r1 * 2]
+
+ dec r6d
+ jnz .loop
+ RET
%else
INIT_XMM sse4
cglobal pixel_add_ps_32x%2, 6, 7, 8, dest, destride, src0, scr1, srcStride0, srcStride1
More information about the x265-devel
mailing list