[x265] [PATCH Review Only] asm code for interp_4tap_vert_pp_8x4
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Oct 22 17:29:50 CEST 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1382455772 -19800
# Node ID f252b82648bf92c337a6323774a8fffb1cf30835
# Parent 93a50baa316f2cf82ef65e0ea639a8b36ac160fa
asm code for interp_4tap_vert_pp_8x4
diff -r 93a50baa316f -r f252b82648bf source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Tue Oct 22 20:53:04 2013 +0530
+++ b/source/common/x86/ipfilter8.asm Tue Oct 22 20:59:32 2013 +0530
@@ -683,3 +683,93 @@
packuswb m1, m1
movh [r2 + r3], m1
RET
+
+;-----------------------------------------------------------------------------
+; void interp_4tap_vert_pp_8x4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal interp_4tap_vert_pp_8x4, 0, 7, 8
+mov r0, r0mp
+mov r1, r1mp
+mov r2, r2mp
+mov r3, r3mp
+mov r4d, r4m
+
+sub r0, r1
+movq m0, [r0]
+movq m1, [r0 + r1]
+movq m2, [r0 + 2 * r1]
+lea r5, [r0 + 2 * r1]
+movq m3, [r5 + r1]
+
+punpcklbw m0, m1
+punpcklbw m4, m2, m3
+
+%ifdef PIC
+lea r6, [tab_ChromaCoeff]
+movd m5, [r6 + r4 * 4]
+%else
+movd m5, [tab_ChromaCoeff + r4 * 4]
+%endif
+
+mova m6, [tab_Vm]
+pshufb m7, m5, m6
+pmaddubsw m0, m7
+
+mova m6, [tab_Vm + 16]
+pshufb m5, m6
+pmaddubsw m4, m5
+
+paddw m0, m4
+
+mova m6, [tab_c_512]
+
+pmulhrsw m0, m6
+packuswb m0, m0
+movh [r2], m0
+
+movq m4, [r0 + 4 * r1]
+
+punpcklbw m1, m2
+punpcklbw m0, m3, m4
+
+pmaddubsw m1, m7
+pmaddubsw m0, m5
+
+paddw m1, m0
+
+pmulhrsw m1, m6
+packuswb m1, m1
+movh [r2 + r3], m1
+
+lea r6, [r0 + 4 * r1]
+movq m0, [r6 + r1]
+
+punpcklbw m2, m3
+punpcklbw m1, m4, m0
+
+pmaddubsw m2, m7
+pmaddubsw m1, m5
+
+paddw m2, m1
+
+pmulhrsw m2, m6
+packuswb m2, m2
+movh [r2 + 2 * r3], m2
+
+movq m1, [r6 + 2 * r1]
+
+punpcklbw m3, m4
+punpcklbw m0, m1
+
+pmaddubsw m3, m7
+pmaddubsw m0, m5
+
+paddw m3, m0
+
+pmulhrsw m3, m6
+packuswb m3, m3
+lea r6, [r2 + 2 * r3]
+movh [r6 + r3], m3
+
+RET
More information about the x265-devel
mailing list