[x265] [PATCH Review Only] asm code for blockcopy_sp, 8x16 partition
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Nov 5 16:52:39 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383666746 -19800
# Node ID c10e41531bbd8837a3153be41885a303ee8ce405
# Parent 8f3ef0e6ff6385c39e1be336f8b54e46e5c67ddc
asm code for blockcopy_sp, 8x16 partition
diff -r 8f3ef0e6ff63 -r c10e41531bbd source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Tue Nov 05 21:02:58 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Tue Nov 05 21:22:26 2013 +0530
@@ -931,3 +931,62 @@
movh [r4 + r1], m1
RET
+
+;-----------------------------------------------------------------------------
+; void blockcopy_sp_%1x%2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)
+;-----------------------------------------------------------------------------
+%macro BLOCKCOPY_SP_W8_H8 2
+INIT_XMM sse2
+cglobal blockcopy_sp_%1x%2, 4, 7, 8, dest, destStride, src, srcStride
+
+mov r6d, %2
+
+add r3, r3
+
+mova m0, [tab_Vm]
+
+.loop
+ movu m1, [r2]
+ movu m2, [r2 + r3]
+ movu m3, [r2 + 2 * r3]
+ lea r4, [r2 + 2 * r3]
+ movu m4, [r4 + r3]
+ movu m5, [r4 + 2 * r3]
+ lea r4, [r4 + 2 * r3]
+ movu m6, [r4 + r3]
+ movu m7, [r4 + 2 * r3]
+ lea r5, [r4 + 2 * r3]
+
+ pshufb m1, m0
+ pshufb m2, m0
+ pshufb m3, m0
+ pshufb m4, m0
+ pshufb m5, m0
+ pshufb m6, m0
+ pshufb m7, m0
+
+ movh [r0], m1
+ movh [r0 + r1], m2
+ movh [r0 + 2 * r1], m3
+ lea r4, [r0 + 2 * r1]
+ movh [r4 + r1], m4
+ movh [r4 + 2 * r1], m5
+ lea r4, [r4 + 2 * r1]
+ movh [r4 + r1], m6
+ movh [r4 + 2 * r1], m7
+
+ movu m1, [r5 + r3]
+ pshufb m1, m0
+ lea r4, [r4 + 2 * r1]
+ movh [r4 + r1], m1
+
+ lea r0, [r0 + 8 * r1]
+ lea r2, [r2 + 8 * r3]
+
+ sub r6d, 8
+ jnz .loop
+
+RET
+%endmacro
+
+BLOCKCOPY_SP_W8_H8 8, 16
More information about the x265-devel
mailing list