[x265] [PATCH] asm: chroma_hps[12x16 for i420] high bit depth - improved 4.35x 3093c->2645c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Wed May 27 06:25:25 CEST 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1432626475 -19800
# Tue May 26 13:17:55 2015 +0530
# Node ID 30b348e730afcc4821742b38354921de7bdc5f21
# Parent cd005c373013bed632ecb4129c620e1447b3d7f4
asm: chroma_hps[12x16 for i420] high bit depth - improved 4.35x 3093c->2645c
diff -r cd005c373013 -r 30b348e730af source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue May 26 12:40:21 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue May 26 13:17:55 2015 +0530
@@ -1523,6 +1523,7 @@
p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].filter_hps = x265_interp_4tap_horiz_ps_32x24_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].filter_hps = x265_interp_4tap_horiz_ps_32x8_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].filter_hps = x265_interp_4tap_horiz_ps_24x32_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_12x16].filter_hps = x265_interp_4tap_horiz_ps_12x16_avx2;
if (cpuMask & X265_CPU_BMI2)
p.scanPosLast = x265_scanPosLast_avx2_bmi2;
diff -r cd005c373013 -r 30b348e730af source/common/x86/ipfilter16.asm
--- a/source/common/x86/ipfilter16.asm Tue May 26 12:40:21 2015 +0530
+++ b/source/common/x86/ipfilter16.asm Tue May 26 13:17:55 2015 +0530
@@ -8273,6 +8273,66 @@
jnz .loop0
RET
%endif
+
+INIT_YMM avx2
+%if ARCH_X86_64 == 1
+cglobal interp_4tap_horiz_ps_12x16, 4, 7, 6
+ add r1d, r1d
+ add r3d, r3d
+ mov r4d, r4m
+ mov r5d, r5m
+
+%ifdef PIC
+ lea r6, [tab_ChromaCoeff]
+ vpbroadcastq m0, [r6 + r4 * 8]
+%else
+ vpbroadcastq m0, [tab_ChromaCoeff + r4 * 8]
+%endif
+ mova m3, [pb_shuf]
+ vbroadcasti128 m2, [pd_n32768]
+
+ ; register map
+ ; m0 , m1 interpolate coeff
+
+ sub r0, 2
+ test r5d, r5d
+ mov r4d, 16
+ jz .loop0
+ sub r0, r1
+ add r4d, 3
+
+.loop0:
+ vbroadcasti128 m4, [r0]
+ vbroadcasti128 m5, [r0 + 8]
+ pshufb m4, m3
+ pshufb m5, m3
+ pmaddwd m4, m0
+ pmaddwd m5, m0
+ phaddd m4, m5
+ paddd m4, m2
+ vpermq m4, m4, q3120
+ psrad m4, 2
+ vextracti128 xm5, m4, 1
+ packssdw xm4, xm5
+ movu [r2], xm4
+
+ vbroadcasti128 m4, [r0 + 16]
+ pshufb m4, m3
+ pmaddwd m4, m0
+ phaddd m4, m4
+ paddd m4, m2
+ vpermq m4, m4, q3120
+ psrad m4, 2
+ vextracti128 xm5, m4, 1
+ packssdw xm4, xm5
+ movq [r2 + 16], xm4
+
+ add r2, r3
+ add r0, r1
+ dec r4d
+ jnz .loop0
+ RET
+%endif
%macro IPFILTER_CHROMA_PS_32xN_AVX2 1
INIT_YMM avx2
%if ARCH_X86_64 == 1
More information about the x265-devel
mailing list