[x265] [PATCH Review Only] asm code for interp_4tap_vert_pp_24x32
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Oct 29 11:37:07 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383043010 -19800
# Node ID 35bbb8426fe828174d2866154953ef20cea16286
# Parent 3306252fb160dcabe2015a502572e9ad635e48a8
asm code for interp_4tap_vert_pp_24x32
diff -r 3306252fb160 -r 35bbb8426fe8 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Tue Oct 29 14:52:06 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Tue Oct 29 16:06:50 2013 +0530
@@ -1003,3 +1003,84 @@
%endmacro
FILTER_V4_W6_H4 6, 8
+
+;-----------------------------------------------------------------------------
+;void interp_4tap_vert_pp_24x32(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+%macro FILTER_V4_W24 2
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_24x32, 4, 6, 8
+
+mov r4d, r4m
+sub r0, r1
+
+%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_512]
+
+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 m5, [r0 + 2 * r1]
+lea r5, [r0 + 2 * r1]
+movu m3, [r5 + r1]
+
+punpcklbw m6, m5, m3,
+punpckhbw m5, m3
+
+pmaddubsw m6, m0
+pmaddubsw m5, m0
+
+paddw m4, m6
+paddw m2, m5
+
+pmulhrsw m4, m7
+pmulhrsw m2, m7
+
+packuswb m4, m2
+
+movu [r2], m4
+
+movq m2, [r0 + 16]
+movq m3, [r0 + r1 + 16]
+movq m4, [r0 + 2 * r1 + 16]
+movq m5, [r5 + r1 + 16]
+
+punpcklbw m2, m3
+punpcklbw m4, m5
+
+pmaddubsw m2, m1
+pmaddubsw m4, m0
+
+paddw m2, m4
+
+pmulhrsw m2, m7
+packuswb m2, m2
+movh [r2 + 16], m2
+
+lea r0, [r0 + r1]
+lea r2, [r2 + r3]
+
+dec r4
+jnz .loop
+RET
+%endmacro
+
+FILTER_V4_W24 24, 32
More information about the x265-devel
mailing list