[x265] [PATCH] asm: luma_hpp[12x16] avx2 - improved 2899c->1808c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Thu Mar 19 05:33:50 CET 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1426739341 -19800
# Thu Mar 19 09:59:01 2015 +0530
# Node ID cef1fc70dbf24acadc3423d56128a7e481795b95
# Parent a553a8afc46a9a1d380f9973eaae33603eedf863
asm: luma_hpp[12x16] avx2 - improved 2899c->1808c
diff -r a553a8afc46a -r cef1fc70dbf2 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Thu Mar 19 09:56:14 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Thu Mar 19 09:59:01 2015 +0530
@@ -1585,6 +1585,7 @@
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_12x16].luma_hpp = x265_interp_8tap_horiz_pp_12x16_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 a553a8afc46a -r cef1fc70dbf2 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Thu Mar 19 09:56:14 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Thu Mar 19 09:59:01 2015 +0530
@@ -18601,3 +18601,81 @@
dec r4d
jnz .loop
RET
+
+INIT_YMM avx2
+cglobal interp_8tap_horiz_pp_12x16, 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, 8
+.loop:
+ ; Row 0
+ vbroadcasti128 m4, [r0] ;first 8 element
+ pshufb m5, m4, m3
+ pshufb m4, [r5]
+ pmaddubsw m4, m0
+ pmaddubsw m5, m1
+ paddw m4, m5
+ pmaddwd m4, m7
+
+ vbroadcasti128 m5, [r0 + 8] ; element 8 to 11
+ 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]
+
+ ;Row 1
+ vbroadcasti128 m2, [r0 + r1]
+ pshufb m5, m2, m3
+ pshufb m2, [r5]
+ pmaddubsw m2, m0
+ pmaddubsw m5, m1
+ paddw m2, m5
+ pmaddwd m2, m7
+
+ vbroadcasti128 m5, [r0 + r1 + 8]
+ pshufb m6, m5, m3
+ pshufb m5, [r5]
+ pmaddubsw m5, m0
+ pmaddubsw m6, m1
+ paddw m5, m6
+ pmaddwd m5, m7
+
+ packssdw m2, m5
+ pmulhrsw m2, [pw_512]
+ packuswb m4, m2
+ vpermq m4, m4, 11011000b
+ vextracti128 xm5, m4, 1
+ pshufd xm4, xm4, 11011000b
+ pshufd xm5, xm5, 11011000b
+
+ movq [r2], xm4
+ pextrd [r2+8], xm4, 2
+ movq [r2 + r3], xm5
+ pextrd [r2+r3+8], xm5, 2
+ lea r0, [r0 + r1 * 2]
+ lea r2, [r2 + r3 * 2]
+ dec r4d
+ jnz .loop
+ RET
More information about the x265-devel
mailing list