[x265] [PATCH Review Only] asm code for interp_4tap_vert_pp_4x8 and interp_4tap_vert_pp_4x16
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Oct 25 13:40:42 CEST 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1382701230 -19800
# Node ID 1da28bd93ab7fbb698f0101423103740b4fa1c3f
# Parent 788f047f5b1695cfb73875e97ba4c0ae11f9f519
asm code for interp_4tap_vert_pp_4x8 and interp_4tap_vert_pp_4x16
diff -r 788f047f5b16 -r 1da28bd93ab7 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Fri Oct 25 16:00:48 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Fri Oct 25 17:10:30 2013 +0530
@@ -747,3 +747,91 @@
pextrd [r6 + r3], m4, 1
RET
+
+;-----------------------------------------------------------------------------
+; void interp_4tap_vert_pp_%1x%2(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+%macro FILTER_V8_W4_H4 2
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_%1x%2, 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]
+
+xor r4, r4
+add r4d, %2
+
+.loop
+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
+
+lea r0, [r0 + 4 * r1]
+lea r2, [r2 + 4 * r3]
+
+sub r4, 4
+jnz .loop
+RET
+%endmacro
+
+FILTER_V8_W4_H4 4, 8
+FILTER_V8_W4_H4 4, 16
More information about the x265-devel
mailing list