[x265] [PATCH Review Only] asm code for interp_4tap_vert_pp_4x4
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Oct 25 12:31:01 CEST 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1382697048 -19800
# Node ID 788f047f5b1695cfb73875e97ba4c0ae11f9f519
# Parent a20de46f58bd7cd6421b8991343a951d81038451
asm code for interp_4tap_vert_pp_4x4
diff -r a20de46f58bd -r 788f047f5b16 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Fri Oct 25 15:09:26 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Fri Oct 25 16:00:48 2013 +0530
@@ -673,3 +673,77 @@
movd [r2], m2
pextrd [r2 + r3], m2, 1
RET
+
+;-----------------------------------------------------------------------------
+; void interp_4tap_vert_pp_4x4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_4x4, 4, 7, 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 m0, [tab_Cm]
+
+mova m1, [tab_c_512]
+
+movd m2, [r0]
+movd m3, [r0 + r1]
+movd m4, [r0 + 2 * r1]
+lea r5, [r0 + 2 * r1]
+movd m5, [r5 + r1]
+
+punpcklbw m2, m3
+punpcklbw m6, m4, m5
+punpcklbw m2, m6
+
+pmaddubsw m2, m0
+
+movd m6, [r0 + 4 * r1]
+
+punpcklbw m3, m4
+punpcklbw m7, m5, m6
+punpcklbw m3, m7
+
+pmaddubsw m3, m0
+
+phaddw m2, m3
+
+pmulhrsw m2, m1
+packuswb m2, m2
+movd [r2], m2
+pextrd [r2 + r3], m2, 1
+
+lea r5, [r0 + 4 * r1]
+movd m2, [r5 + r1]
+
+punpcklbw m4, m5
+punpcklbw m3, m6, m2
+punpcklbw m4, m3
+
+pmaddubsw m4, m0
+
+movd m3, [r5 + 2 * r1]
+
+punpcklbw m5, m6
+punpcklbw m7, m2, m3
+punpcklbw m5, m7
+
+pmaddubsw m5, m0
+
+phaddw m4, m5
+
+pmulhrsw m4, m1
+packuswb m4, m4
+movd [r2 + 2 * r3], m4
+lea r6, [r2 + 2 * r3]
+pextrd [r6 + r3], m4, 1
+
+RET
More information about the x265-devel
mailing list