[x265] [PATCH] asm: luma_hpp[24x32] avx2 - improved 6186c->5068c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Thu Mar 19 05:26:21 CET 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1426739174 -19800
# Thu Mar 19 09:56:14 2015 +0530
# Node ID a553a8afc46a9a1d380f9973eaae33603eedf863
# Parent cbfa66e0b50cc2393ccbcf6471406504c6c06011
asm: luma_hpp[24x32] avx2 - improved 6186c->5068c
diff -r cbfa66e0b50c -r a553a8afc46a source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Mar 18 18:16:51 2015 -0500
+++ b/source/common/x86/asm-primitives.cpp Thu Mar 19 09:56:14 2015 +0530
@@ -1584,6 +1584,7 @@
p.pu[LUMA_64x32].luma_hpp = x265_interp_8tap_horiz_pp_64x32_avx2;
p.pu[LUMA_64x16].luma_hpp = x265_interp_8tap_horiz_pp_64x16_avx2;
p.pu[LUMA_48x64].luma_hpp = x265_interp_8tap_horiz_pp_48x64_avx2;
+ p.pu[LUMA_24x32].luma_hpp = x265_interp_8tap_horiz_pp_24x32_avx2;
p.pu[LUMA_4x4].luma_hps = x265_interp_8tap_horiz_ps_4x4_avx2;
p.pu[LUMA_4x8].luma_hps = x265_interp_8tap_horiz_ps_4x8_avx2;
diff -r cbfa66e0b50c -r a553a8afc46a source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Wed Mar 18 18:16:51 2015 -0500
+++ b/source/common/x86/ipfilter8.asm Thu Mar 19 09:56:14 2015 +0530
@@ -18535,3 +18535,69 @@
IPFILTER_CHROMA_PP_4xN_AVX2 4 , 8
IPFILTER_CHROMA_PP_4xN_AVX2 4 , 16
+
+INIT_YMM avx2
+cglobal interp_8tap_horiz_pp_24x32, 4,6,8
+ sub r0, 3
+ mov r4d, r4m
+%ifdef PIC
+ lea r5, [tab_LumaCoeff]
+ vpbroadcastd m0, [r5 + r4 * 8]
+ vpbroadcastd m1, [r5 + r4 * 8 + 4]
+%else
+ vpbroadcastd m0, [tab_LumaCoeff + r4 * 8]
+ vpbroadcastd m1, [tab_LumaCoeff + r4 * 8 + 4]
+%endif
+ movu m3, [tab_Tm + 16]
+ vpbroadcastd m7, [pw_1]
+ lea r5, [tab_Tm]
+
+ ; register map
+ ; m0 , m1 interpolate coeff
+ ; m2 , m2 shuffle order table
+ ; m7 - pw_1
+
+ mov r4d, 32
+.loop:
+ ; Row 0
+ vbroadcasti128 m4, [r0] ; [x E D C B A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m5, m4, m3
+ pshufb m4, [r5]
+ pmaddubsw m4, m0
+ pmaddubsw m5, m1
+ paddw m4, m5
+ pmaddwd m4, m7
+
+ vbroadcasti128 m5, [r0 + 8]
+ pshufb m6, m5, m3
+ pshufb m5, [r5]
+ pmaddubsw m5, m0
+ pmaddubsw m6, m1
+ paddw m5, m6
+ pmaddwd m5, m7
+ packssdw m4, m5 ; [17 16 15 14 07 06 05 04 13 12 11 10 03 02 01 00]
+ pmulhrsw m4, [pw_512]
+
+ vbroadcasti128 m2, [r0 + 16]
+ pshufb m5, m2, m3
+ pshufb m2, [r5]
+ pmaddubsw m2, m0
+ pmaddubsw m5, m1
+ paddw m2, m5
+ pmaddwd m2, m7
+
+ packssdw m2, m2
+ pmulhrsw m2, [pw_512]
+ packuswb m4, m2
+ vpermq m4, m4, 11011000b
+ vextracti128 xm5, m4, 1
+ pshufd xm4, xm4, 11011000b
+ pshufd xm5, xm5, 11011000b
+
+ movu [r2], xm4
+ movq [r2 + 16], xm5
+ add r0, r1
+ add r2, r3
+ dec r4d
+ jnz .loop
+ RET
More information about the x265-devel
mailing list