[x265] [PATCH] asm : chroma_hpp[24x32] avx2 - improved 4525c->4289c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Wed Mar 25 05:35:05 CET 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1427258097 -19800
# Wed Mar 25 10:04:57 2015 +0530
# Node ID 6effbf0a01cb706151b6f2003ac8081e70ea2694
# Parent 6278d89ebb3957cb27cbbcf4ed9ae20761455bdf
asm : chroma_hpp[24x32] avx2 - improved 4525c->4289c
diff -r 6278d89ebb39 -r 6effbf0a01cb source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Mar 25 09:58:31 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Mar 25 10:04:57 2015 +0530
@@ -1741,6 +1741,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_2x4].filter_hps = x265_interp_4tap_horiz_ps_2x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_2x8].filter_hps = x265_interp_4tap_horiz_ps_2x8_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].filter_hpp = x265_interp_4tap_horiz_pp_24x32_avx2;
p.chroma[X265_CSP_I422].pu[CHROMA_422_4x4].filter_vpp = x265_interp_4tap_vert_pp_4x4_avx2;
diff -r 6278d89ebb39 -r 6effbf0a01cb source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Wed Mar 25 09:58:31 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Wed Mar 25 10:04:57 2015 +0530
@@ -20426,3 +20426,61 @@
dec r4d
jnz .loop
RET
+
+INIT_YMM avx2
+cglobal interp_4tap_horiz_pp_24x32, 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, 32
+
+.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
+
+ vextracti128 xm4, m3, 1
+ movu [r2], xm3
+ movq [r2 + 16], xm4
+ add r2, r3
+ add r0, r1
+ dec r4d
+ jnz .loop
+ RET
More information about the x265-devel
mailing list