[x265] [PATCH] asm: chroma_hps[8xN for i420] high bit depth
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Wed May 27 06:21:14 CEST 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1432618261 -19800
# Tue May 26 11:01:01 2015 +0530
# Node ID 413177b405e03e27030328846441578995bd1f85
# Parent 8ddc790790a46de9ceadea388f6271acdb3012ed
asm: chroma_hps[8xN for i420] high bit depth
chroma_hps[8x8] - 7.96x 1909c->1199c
chroma_hps[8x2] - 6.35x 982c->668c
chroma_hps[8x4] - 6.66x 1210c->890c
chroma_hps[8x6] - 6.36x 1604c->1210c
chroma_hps[8x16] - 7.38c 3182c->2153c
chroma_hps[8x32] - 7.34c 6001c->3880c
diff -r 8ddc790790a4 -r 413177b405e0 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue May 26 10:33:56 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue May 26 11:01:01 2015 +0530
@@ -1507,6 +1507,13 @@
p.pu[LUMA_24x32].luma_hpp = x265_interp_8tap_horiz_pp_24x32_avx2;
p.pu[LUMA_48x64].luma_hpp = x265_interp_8tap_horiz_pp_48x64_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].filter_hps = x265_interp_4tap_horiz_ps_8x8_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x4].filter_hps = x265_interp_4tap_horiz_ps_8x4_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x16].filter_hps = x265_interp_4tap_horiz_ps_8x16_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x6].filter_hps = x265_interp_4tap_horiz_ps_8x6_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x2].filter_hps = x265_interp_4tap_horiz_ps_8x2_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_8x32].filter_hps = x265_interp_4tap_horiz_ps_8x32_avx2;
+
if (cpuMask & X265_CPU_BMI2)
p.scanPosLast = x265_scanPosLast_avx2_bmi2;
}
diff -r 8ddc790790a4 -r 413177b405e0 source/common/x86/ipfilter16.asm
--- a/source/common/x86/ipfilter16.asm Tue May 26 10:33:56 2015 +0530
+++ b/source/common/x86/ipfilter16.asm Tue May 26 11:01:01 2015 +0530
@@ -8068,3 +8068,60 @@
jnz .loop0
RET
%endif
+
+%macro IPFILTER_CHROMA_PS_8xN_AVX2 1
+INIT_YMM avx2
+%if ARCH_X86_64 == 1
+cglobal interp_4tap_horiz_ps_8x%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
+ movu [r2], xm4
+ add r2, r3
+ add r0, r1
+ dec r4d
+ jnz .loop0
+ RET
+%endif
+%endmacro
+
+ IPFILTER_CHROMA_PS_8xN_AVX2 4
+ IPFILTER_CHROMA_PS_8xN_AVX2 8
+ IPFILTER_CHROMA_PS_8xN_AVX2 16
+ IPFILTER_CHROMA_PS_8xN_AVX2 32
+ IPFILTER_CHROMA_PS_8xN_AVX2 6
+ IPFILTER_CHROMA_PS_8xN_AVX2 2
diff -r 8ddc790790a4 -r 413177b405e0 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h Tue May 26 10:33:56 2015 +0530
+++ b/source/common/x86/ipfilter8.h Tue May 26 11:01:01 2015 +0530
@@ -400,6 +400,7 @@
CHROMA_444_VERT_FILTERS(_sse2);
CHROMA_444_HORIZ_FILTERS(_sse4);
+CHROMA_420_HORIZ_FILTERS(_avx2);
#undef CHROMA_420_VERT_FILTERS_SSE4
#undef CHROMA_420_VERT_FILTERS
More information about the x265-devel
mailing list