[x265] [PATCH Review Only] chroma_hpp[32x32] for colorspace i420 in avx2: improve 6189c->4856c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Thu Dec 4 10:28:40 CET 2014
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1417685186 -19800
# Thu Dec 04 14:56:26 2014 +0530
# Node ID 0813637ebb45b461dc882c5d578540273a0924af
# Parent ada9f34f4a7cc59e101d8af0e6dcac016048308c
chroma_hpp[32x32] for colorspace i420 in avx2: improve 6189c->4856c
diff -r ada9f34f4a7c -r 0813637ebb45 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Thu Dec 04 14:48:06 2014 +0530
+++ b/source/common/x86/asm-primitives.cpp Thu Dec 04 14:56:26 2014 +0530
@@ -1824,6 +1824,8 @@
p.chroma[X265_CSP_I420].filter_hpp[CHROMA_16x16] = x265_interp_4tap_horiz_pp_16x16_avx2;
+ p.chroma[X265_CSP_I420].filter_hpp[CHROMA_32x32] = x265_interp_4tap_horiz_pp_32x32_avx2;
+
p.luma_vpp[LUMA_4x4] = x265_interp_8tap_vert_pp_4x4_avx2;
}
#endif // if HIGH_BIT_DEPTH
diff -r ada9f34f4a7c -r 0813637ebb45 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Thu Dec 04 14:48:06 2014 +0530
+++ b/source/common/x86/ipfilter8.asm Thu Dec 04 14:56:26 2014 +0530
@@ -1290,6 +1290,67 @@
jnz .loop
RET
+INIT_YMM avx2
+cglobal interp_4tap_horiz_pp_32x32, 4,6,6
+ mov r4d, r4m
+
+%ifdef PIC
+ lea r5, [tab_ChromaCoeff]
+ vpbroadcastd m0, [r5 + r4 * 4]
+%else
+ vpbroadcastd m0, [tab_ChromaCoeff + r4 * 4]
+%endif
+
+ movu m1, [tab_Tm]
+ vpbroadcastd m2, [pw_1]
+
+ ; register map
+ ; m0 - interpolate coeff
+ ; m1 - shuffle order table
+ ; m2 - constant word 1
+
+ mov r4d, 32
+ sub r0, 1
+
+ .loop
+ ; Row 0
+ vbroadcasti128 m3, [r0]
+ pshufb m3, m1
+ pmaddubsw m3, m0
+ pmaddwd m3, m2
+ vbroadcasti128 m4, [r0 + 8]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+
+ packssdw m3, m4
+ pmulhrsw m3, [pw_512]
+ vextracti128 xm4, m3, 1
+ packuswb xm3, xm4
+ pshufd xm3, xm3, 11011000b
+ movu [r2], xm3
+
+ vbroadcasti128 m3, [r0 + 16] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m3, m1
+ pmaddubsw m3, m0
+ pmaddwd m3, m2
+ vbroadcasti128 m4, [r0 + 24] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+
+ packssdw m3, m4
+ pmulhrsw m3, [pw_512]
+ vextracti128 xm4, m3, 1
+ packuswb xm3, xm4
+ pshufd xm3, xm3, 11011000b
+ movu [r2 + 16], xm3
+
+ lea r0, [r0 + r1]
+ lea r2, [r2 + r3]
+ dec r4d
+ jnz .loop
+ RET
;--------------------------------------------------------------------------------------------------------------
; void interp_8tap_horiz_pp_%1x%2(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
More information about the x265-devel
mailing list