[x265] [PATCH Review Only] asm code for interp_4tap_vert_pp_4x2
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Oct 25 11:39:42 CEST 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1382693966 -19800
# Node ID a20de46f58bd7cd6421b8991343a951d81038451
# Parent 4ca4da7bdd36fbef00b9eefe54c0a56bf11633f3
asm code for interp_4tap_vert_pp_4x2
diff -r 4ca4da7bdd36 -r a20de46f58bd source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Fri Oct 25 12:11:31 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Fri Oct 25 15:09:26 2013 +0530
@@ -35,6 +35,8 @@
db 4, 5, 6, 7, 8, 9, 10, 11, 5, 6, 7, 8, 9, 10, 11, 12
db 6, 7, 8, 9, 10, 11, 12, 13, 7, 8, 9, 10, 11, 12, 13, 14
+tab_Cm: db 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3, 0, 2, 1, 3
+
tab_c_512: times 8 dw 512
tab_ChromaCoeff: db 0, 64, 0, 0
@@ -623,3 +625,51 @@
IPFILTER_LUMA 48, 64
IPFILTER_LUMA 64, 16
IPFILTER_LUMA 16, 64
+
+;-----------------------------------------------------------------------------
+; void interp_4tap_vert_pp_4x2(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_4x2, 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 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
+RET
More information about the x265-devel
mailing list