[x265] [PATCH 2 of 2] asm: routines for chroma vps filter functions for 32xN block sizes
nabajit at multicorewareinc.com
nabajit at multicorewareinc.com
Wed Nov 13 12:17:14 CET 2013
# HG changeset patch
# User Nabajit Deka
# Date 1384341402 -19800
# Wed Nov 13 16:46:42 2013 +0530
# Node ID 919e6bec663a2d46e62b497dcfc2aaedcee49ed8
# Parent 1da763b256063cef7c8614920865c4c405af65f5
asm: routines for chroma vps filter functions for 32xN block sizes.
diff -r 1da763b25606 -r 919e6bec663a source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Wed Nov 13 16:35:45 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Wed Nov 13 16:46:42 2013 +0530
@@ -4736,3 +4736,97 @@
dec r4d
jnz .loop
RET
+
+;---------------------------------------------------------------------------------------------------------------
+; void interp_4tap_vert_ps_32x%2(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx)
+;---------------------------------------------------------------------------------------------------------------
+%macro FILTER_V_PS_W32 2
+INIT_XMM sse4
+cglobal interp_4tap_vert_ps_%1x%2, 4, 6, 8
+
+ mov r4d, r4m
+ sub r0, r1
+ add r3d, r3d
+
+%ifdef PIC
+ lea r5, [tab_ChromaCoeff]
+ movd m0, [r5 + r4 * 4]
+%else
+ movd m0, [tab_ChromaCoeff + r4 * 4]
+%endif
+
+ pshufb m1, m0, [tab_Vm]
+ pshufb m0, [tab_Vm + 16]
+
+ mova m7, [tab_c_8192]
+
+ mov r4d, %2
+
+.loop
+ movu m2, [r0]
+ movu m3, [r0 + r1]
+
+ punpcklbw m4, m2, m3,
+ punpckhbw m2, m3,
+
+ pmaddubsw m4, m1
+ pmaddubsw m2, m1
+
+ movu m3, [r0 + 2 * r1]
+ lea r5, [r0 + 2 * r1]
+ movu m5, [r5 + r1]
+
+ punpcklbw m6, m3, m5
+ punpckhbw m3, m5,
+
+ pmaddubsw m6, m0
+ pmaddubsw m3, m0
+
+ paddw m4, m6
+ paddw m2, m3
+
+ psubw m4, m7
+ psubw m2, m7
+
+ movu [r2], m4
+ movu [r2 + 16], m2
+
+ movu m2, [r0 + 16]
+ movu m3, [r0 + r1 + 16]
+
+ punpcklbw m4, m2, m3,
+ punpckhbw m2, m3,
+
+ pmaddubsw m4, m1
+ pmaddubsw m2, m1
+
+ movu m3, [r0 + 2 * r1 + 16]
+ movu m5, [r5 + r1 + 16]
+
+ punpcklbw m6, m3, m5
+ punpckhbw m3, m5,
+
+ pmaddubsw m6, m0
+ pmaddubsw m3, m0
+
+ paddw m4, m6
+ paddw m2, m3
+
+ psubw m4, m7
+ psubw m2, m7
+
+ movu [r2 + 32], m4
+ movu [r2 + 48], m2
+
+ lea r0, [r0 + r1]
+ lea r2, [r2 + r3]
+
+ dec r4d
+ jnz .loop
+ RET
+%endmacro
+
+FILTER_V_PS_W32 32, 8
+FILTER_V_PS_W32 32, 16
+FILTER_V_PS_W32 32, 24
+FILTER_V_PS_W32 32, 32
More information about the x265-devel
mailing list