[x265] [PATCH] asm: chroma_hps[6x8, 6x16] for high bit depth
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Thu Jun 4 16:39:17 CEST 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1433428704 -19800
# Thu Jun 04 20:08:24 2015 +0530
# Node ID 394b62c338ede516aaab252d5e207b4ed20efbb3
# Parent 093618ce0b26ea4703b5928f618d2895cf6daf32
asm: chroma_hps[6x8, 6x16] for high bit depth
chroma_hps[ 6x16] - 3.57x 1825c->1716c
chroma_hps[ 6x8] - 3.46x 1104c->1005c
diff -r 093618ce0b26 -r 394b62c338ed source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Jun 02 17:21:24 2015 +0800
+++ b/source/common/x86/asm-primitives.cpp Thu Jun 04 20:08:24 2015 +0530
@@ -1579,6 +1579,7 @@
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;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_6x8].filter_hps = x265_interp_4tap_horiz_ps_6x8_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_8x8].filter_hps = x265_interp_4tap_horiz_ps_8x8_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_8x16].filter_hps = x265_interp_4tap_horiz_ps_8x16_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_8x32].filter_hps = x265_interp_4tap_horiz_ps_8x32_avx2;
@@ -1596,6 +1597,7 @@
p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].filter_hps = x265_interp_4tap_horiz_ps_32x16_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_12x32].filter_hps = x265_interp_4tap_horiz_ps_12x32_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].filter_hps = x265_interp_4tap_horiz_ps_24x64_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_6x16].filter_hps = x265_interp_4tap_horiz_ps_6x16_avx2;
p.chroma[X265_CSP_I444].pu[LUMA_8x8].filter_hps = x265_interp_4tap_horiz_ps_8x8_avx2;
p.chroma[X265_CSP_I444].pu[LUMA_8x4].filter_hps = x265_interp_4tap_horiz_ps_8x4_avx2;
p.chroma[X265_CSP_I444].pu[LUMA_8x16].filter_hps = x265_interp_4tap_horiz_ps_8x16_avx2;
@@ -1678,6 +1680,7 @@
p.chroma[X265_CSP_I444].pu[LUMA_64x64].filter_hpp = x265_interp_4tap_horiz_pp_64x64_avx2;
p.chroma[X265_CSP_I444].pu[LUMA_48x64].filter_hpp = x265_interp_4tap_horiz_pp_48x64_avx2;
+
if (cpuMask & X265_CPU_BMI2)
p.scanPosLast = x265_scanPosLast_avx2_bmi2;
}
diff -r 093618ce0b26 -r 394b62c338ed source/common/x86/ipfilter16.asm
--- a/source/common/x86/ipfilter16.asm Tue Jun 02 17:21:24 2015 +0800
+++ b/source/common/x86/ipfilter16.asm Thu Jun 04 20:08:24 2015 +0530
@@ -9847,3 +9847,57 @@
jnz .loop0
RET
%endif
+
+%macro IPFILTER_CHROMA_PS_6xN_AVX2 1
+INIT_YMM avx2
+%if ARCH_X86_64 == 1
+cglobal interp_4tap_horiz_ps_6x%1, 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, %1
+ 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
+ movq [r2], xm4
+ pextrd [r2 + 8], xm4, 2
+ add r2, r3
+ add r0, r1
+ dec r4d
+ jnz .loop0
+ RET
+%endif
+%endmacro
+
+ IPFILTER_CHROMA_PS_6xN_AVX2 8
+ IPFILTER_CHROMA_PS_6xN_AVX2 16
More information about the x265-devel
mailing list