[x265] [PATCH] Luma_hpp[16x4, 16x8, 16x12, 16x16 , 16x32, 16x64] avx2 asm code: improved 619c->458c, 1174c->812c, 1694c->1112c, 2291c->1535c, 4846c->3207c, 9294c->6104c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Tue Nov 25 09:42:24 CET 2014
- Previous message: [x265] [PATCH] asm: luma_vpp[32x24] in avx2: improve 5562c->3899c
- Next message: [x265] [PATCH] Luma_hpp[16x4, 16x8, 16x12, 16x16 , 16x32, 16x64] avx2 asm code: improved 619c->458c, 1174c->812c, 1694c->1112c, 2291c->1535c, 4846c->3207c, 9294c->6104c
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1416904933 -19800
# Tue Nov 25 14:12:13 2014 +0530
# Node ID 5d9afc075f88738b5a558c2d6e6de50b6586b634
# Parent 507aedba064f7a1f2ee27d945ee25f17b2365548
Luma_hpp[16x4, 16x8, 16x12, 16x16 , 16x32, 16x64] avx2 asm code: improved 619c->458c, 1174c->812c, 1694c->1112c, 2291c->1535c, 4846c->3207c, 9294c->6104c
diff -r 507aedba064f -r 5d9afc075f88 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Nov 25 12:22:04 2014 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue Nov 25 14:12:13 2014 +0530
@@ -1800,11 +1800,20 @@
#endif
p.luma_hpp[LUMA_4x4] = x265_interp_8tap_horiz_pp_4x4_avx2;
+ p.luma_hpp[LUMA_16x4] = x265_interp_8tap_horiz_pp_16x4_avx2;
+ p.luma_hpp[LUMA_16x8] = x265_interp_8tap_horiz_pp_16x8_avx2;
+ p.luma_hpp[LUMA_16x12] = x265_interp_8tap_horiz_pp_16x12_avx2;
+ p.luma_hpp[LUMA_16x16] = x265_interp_8tap_horiz_pp_16x16_avx2;
+ p.luma_hpp[LUMA_16x32] = x265_interp_8tap_horiz_pp_16x32_avx2;
+ p.luma_hpp[LUMA_16x64] = x265_interp_8tap_horiz_pp_16x64_avx2;
+
p.luma_hpp[LUMA_64x64] = x265_interp_8tap_horiz_pp_64x64_avx2;
p.luma_hpp[LUMA_64x48] = x265_interp_8tap_horiz_pp_64x48_avx2;
p.luma_hpp[LUMA_64x32] = x265_interp_8tap_horiz_pp_64x32_avx2;
p.luma_hpp[LUMA_64x16] = x265_interp_8tap_horiz_pp_64x16_avx2;
+
+
p.luma_vpp[LUMA_4x4] = x265_interp_8tap_vert_pp_4x4_avx2;
}
#endif // if HIGH_BIT_DEPTH
diff -r 507aedba064f -r 5d9afc075f88 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Tue Nov 25 12:22:04 2014 +0530
+++ b/source/common/x86/ipfilter8.asm Tue Nov 25 14:12:13 2014 +0530
@@ -853,6 +853,75 @@
pextrd [r2+r0], xm3, 3
RET
+%macro IPFILTER_LUMA_AVX2 2
+INIT_YMM avx2
+cglobal interp_8tap_horiz_pp_%1x%2, 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]
+
+ ; register map
+ ; m0 , m1 interpolate coeff
+ ; m2 , m2 shuffle order table
+ ; m7 - pw_1
+
+ mov r4d, %2/2
+.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, [tab_Tm]
+ pmaddubsw m4, m0
+ pmaddubsw m5, m1
+ paddw m4, m5
+ pmaddwd m4, m7
+ vbroadcasti128 m5, [r0 + 8] ; second 8 elements in Row0
+ pshufb m6, m5, m3
+ pshufb m5, [tab_Tm]
+ 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 + r1] ; [x E D C B A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m5, m2, m3
+ pshufb m2, [tab_Tm]
+ pmaddubsw m2, m0
+ pmaddubsw m5, m1
+ paddw m2, m5
+ pmaddwd m2, m7
+ vbroadcasti128 m5, [r0 + r1 + 8] ; second 8 elements in Row0
+ pshufb m6, m5, m3
+ pshufb m5, [tab_Tm]
+ pmaddubsw m5, m0
+ pmaddubsw m6, m1
+ paddw m5, m6
+ pmaddwd m5, m7
+ packssdw m2, m5 ; [17 16 15 14 07 06 05 04 13 12 11 10 03 02 01 00]
+ 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
+ movu [r2+r3], xm5
+ lea r0, [r0 + r1 * 2]
+ lea r2, [r2 + r3 * 2]
+ dec r4d
+ jnz .loop
+ RET
+%endmacro
%macro IPFILTER_LUMA_64x_avx2 2
INIT_YMM avx2
@@ -973,6 +1042,14 @@
IPFILTER_LUMA 12, 16, pp
IPFILTER_LUMA 4, 16, pp
+
+ IPFILTER_LUMA_AVX2 16, 4
+ IPFILTER_LUMA_AVX2 16, 8
+ IPFILTER_LUMA_AVX2 16, 12
+ IPFILTER_LUMA_AVX2 16, 16
+ IPFILTER_LUMA_AVX2 16, 32
+ IPFILTER_LUMA_AVX2 16, 64
+
IPFILTER_LUMA_64x_avx2 64 , 64
IPFILTER_LUMA_64x_avx2 64 , 48
IPFILTER_LUMA_64x_avx2 64 , 32
- Previous message: [x265] [PATCH] asm: luma_vpp[32x24] in avx2: improve 5562c->3899c
- Next message: [x265] [PATCH] Luma_hpp[16x4, 16x8, 16x12, 16x16 , 16x32, 16x64] avx2 asm code: improved 619c->458c, 1174c->812c, 1694c->1112c, 2291c->1535c, 4846c->3207c, 9294c->6104c
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the x265-devel
mailing list