[x265] [PATCH] asm: chroma_hpp[64x64, 64x48, 64x32, 64x16] for i444 - improved 22990c->14176c, 17897c->10791c, 12050c->7186c, 5655c->3266c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Fri Apr 17 07:08:51 CEST 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1429246698 -19800
# Fri Apr 17 10:28:18 2015 +0530
# Node ID d8ea45299885b4e00cec173569d06b5dd359a5e8
# Parent b49bc22d93e527bc0279f5cf3149b7652f3cc871
asm: chroma_hpp[64x64, 64x48, 64x32, 64x16] for i444 - improved 22990c->14176c, 17897c->10791c, 12050c->7186c, 5655c->3266c
diff -r b49bc22d93e5 -r d8ea45299885 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Thu Apr 16 15:28:19 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Fri Apr 17 10:28:18 2015 +0530
@@ -2212,6 +2212,11 @@
p.chroma[X265_CSP_I422].pu[CHROMA_422_2x8].filter_hpp = x265_interp_4tap_horiz_pp_2x8_avx2;
+ p.chroma[X265_CSP_I444].pu[LUMA_64x64].filter_hpp = x265_interp_4tap_horiz_pp_64x64_avx2;
+ p.chroma[X265_CSP_I444].pu[LUMA_64x32].filter_hpp = x265_interp_4tap_horiz_pp_64x32_avx2;
+ p.chroma[X265_CSP_I444].pu[LUMA_64x48].filter_hpp = x265_interp_4tap_horiz_pp_64x48_avx2;
+ p.chroma[X265_CSP_I444].pu[LUMA_64x16].filter_hpp = x265_interp_4tap_horiz_pp_64x16_avx2;
+
//i444 chroma_hps
p.chroma[X265_CSP_I444].pu[LUMA_64x32].filter_hps = x265_interp_4tap_horiz_ps_64x32_avx2;
p.chroma[X265_CSP_I444].pu[LUMA_64x48].filter_hps = x265_interp_4tap_horiz_ps_64x48_avx2;
diff -r b49bc22d93e5 -r d8ea45299885 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Thu Apr 16 15:28:19 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Fri Apr 17 10:28:18 2015 +0530
@@ -22098,3 +22098,93 @@
pextrw [r2 + r3 * 2], xm1, 6
pextrw [r2 + r4], xm1, 7
RET
+
+;-------------------------------------------------------------------------------------------------------------
+; void interp_4tap_horiz_pp_64xN(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx
+;-------------------------------------------------------------------------------------------------------------
+%macro IPFILTER_CHROMA_PP_64xN_AVX2 1
+INIT_YMM avx2
+cglobal interp_4tap_horiz_pp_64x%1, 4,6,7
+ mov r4d, r4m
+
+%ifdef PIC
+ lea r5, [tab_ChromaCoeff]
+ vpbroadcastd m0, [r5 + r4 * 4]
+%else
+ vpbroadcastd m0, [tab_ChromaCoeff + r4 * 4]
+%endif
+
+ mova m1, [interp4_horiz_shuf1]
+ vpbroadcastd m2, [pw_1]
+ mova m6, [pw_512]
+ ; register map
+ ; m0 - interpolate coeff
+ ; m1 - shuffle order table
+ ; m2 - constant word 1
+
+ dec r0
+ mov r4d, %1
+
+.loop:
+ ; Row 0
+ vbroadcasti128 m3, [r0] ; [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 + 4]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+ packssdw m3, m4
+ pmulhrsw m3, m6
+
+ vbroadcasti128 m4, [r0 + 16]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+ vbroadcasti128 m5, [r0 + 20]
+ pshufb m5, m1
+ pmaddubsw m5, m0
+ pmaddwd m5, m2
+ packssdw m4, m5
+ pmulhrsw m4, m6
+ packuswb m3, m4
+ vpermq m3, m3, 11011000b
+ movu [r2], m3
+
+ vbroadcasti128 m3, [r0 + 32] ; [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 + 36]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+ packssdw m3, m4
+ pmulhrsw m3, m6
+
+ vbroadcasti128 m4, [r0 + 48]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+ vbroadcasti128 m5, [r0 + 52]
+ pshufb m5, m1
+ pmaddubsw m5, m0
+ pmaddwd m5, m2
+ packssdw m4, m5
+ pmulhrsw m4, m6
+ packuswb m3, m4
+ vpermq m3, m3, 11011000b
+ movu [r2 + 32], m3
+
+ add r2, r3
+ add r0, r1
+ dec r4d
+ jnz .loop
+ RET
+%endmacro
+
+IPFILTER_CHROMA_PP_64xN_AVX2 64
+IPFILTER_CHROMA_PP_64xN_AVX2 32
+IPFILTER_CHROMA_PP_64xN_AVX2 48
+IPFILTER_CHROMA_PP_64xN_AVX2 16
More information about the x265-devel
mailing list