[x265] [PATCH] chroma_hps[32x32] for i420 avx2 asm: 5927c->3933c
aasaipriya at multicorewareinc.com
aasaipriya at multicorewareinc.com
Mon Mar 9 11:44:59 CET 2015
# HG changeset patch
# User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
# Date 1425897892 -19800
# Mon Mar 09 16:14:52 2015 +0530
# Node ID 3bd083b168a1a92f513313142e13f629f93331df
# Parent eb66c664cd8293c78886c13cd006c9dca2dd0fc1
chroma_hps[32x32] for i420 avx2 asm: 5927c->3933c
diff -r eb66c664cd82 -r 3bd083b168a1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Mar 09 16:12:04 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Mar 09 16:14:52 2015 +0530
@@ -1794,6 +1794,7 @@
p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].filter_hps = x265_interp_4tap_horiz_ps_4x4_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_8x8].filter_hps = x265_interp_4tap_horiz_ps_8x8_avx2;
p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].filter_hps = x265_interp_4tap_horiz_ps_16x16_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].filter_hps = x265_interp_4tap_horiz_ps_32x32_avx2;
p.pu[LUMA_4x4].luma_vps = x265_interp_8tap_vert_ps_4x4_avx2;
diff -r eb66c664cd82 -r 3bd083b168a1 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Mon Mar 09 16:12:04 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Mon Mar 09 16:14:52 2015 +0530
@@ -1928,6 +1928,71 @@
jnz .loop
RET
+INIT_YMM avx2
+cglobal interp_4tap_horiz_ps_32x32, 4,7,6
+ mov r4d, r4m
+ mov r5d, r5m
+ add r3d, r3d
+
+%ifdef PIC
+ lea r6, [tab_ChromaCoeff]
+ vpbroadcastd m0, [r6 + r4 * 4]
+%else
+ vpbroadcastd m0, [tab_ChromaCoeff + r4 * 4]
+%endif
+
+ vbroadcasti128 m2, [pw_1]
+ vbroadcasti128 m5, [pw_2000]
+ mova m1, [tab_Tm]
+
+ ; register map
+ ; m0 - interpolate coeff
+ ; m1 - shuffle order table
+ ; m2 - constant word 1
+ mov r6d, 32
+ dec r0
+ cmp r5m, byte 0
+ je .loop
+ sub r0 , r1
+ add r6d , 3
+
+.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 + 8] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+
+ packssdw m3, m4
+ psubw m3, m5
+
+ vpermq m3, m3, 11011000b
+ movu [r2], m3
+
+ vbroadcasti128 m3, [r0 + 16] ; [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 + 24] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
+ pshufb m4, m1
+ pmaddubsw m4, m0
+ pmaddwd m4, m2
+
+ packssdw m3, m4
+ psubw m3, m5
+
+ vpermq m3, m3, 11011000b
+ movu [r2 + 32], m3
+
+ lea r2, [r2 + r3]
+ lea r0, [r0 + r1]
+ dec r6d
+ jnz .loop
+ RET
;-----------------------------------------------------------------------------------------------------------------------------
;void interp_horiz_ps_c(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt)
;-----------------------------------------------------------------------------------------------------------------------------
More information about the x265-devel
mailing list