[x265] [PATCH] asm code for blockcopy_sp, 48x64
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Wed Nov 6 16:31:42 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383751892 -19800
# Node ID 6c36a3db7210cd94da4f92bb2f7b7d3e62f7ed80
# Parent 79b302e8886ff6dff8802494c13a6fabba0e02c7
asm code for blockcopy_sp, 48x64
diff -r 79b302e8886f -r 6c36a3db7210 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Nov 06 20:51:42 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Nov 06 21:01:32 2013 +0530
@@ -355,6 +355,7 @@
p.chroma_copy_sp[CHROMA_32x24] = x265_blockcopy_sp_32x24_sse2;
p.chroma_copy_sp[CHROMA_32x32] = x265_blockcopy_sp_32x32_sse2;
p.luma_copy_sp[LUMA_32x64] = x265_blockcopy_sp_32x64_sse2;
+ p.luma_copy_sp[LUMA_48x64] = x265_blockcopy_sp_48x64_sse2;
#if X86_64
p.satd[LUMA_8x32] = x265_pixel_satd_8x32_sse2;
p.satd[LUMA_16x4] = x265_pixel_satd_16x4_sse2;
diff -r 79b302e8886f -r 6c36a3db7210 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Wed Nov 06 20:51:42 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Wed Nov 06 21:01:32 2013 +0530
@@ -1523,3 +1523,70 @@
BLOCKCOPY_SP_W32_H2 32, 24
BLOCKCOPY_SP_W32_H2 32, 32
BLOCKCOPY_SP_W32_H2 32, 64
+
+;-----------------------------------------------------------------------------
+; void blockcopy_sp_%1x%2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)
+;-----------------------------------------------------------------------------
+%macro BLOCKCOPY_SP_W32_H2 2
+INIT_XMM sse2
+cglobal blockcopy_sp_%1x%2, 4, 5, 5, dest, destStride, src, srcStride
+
+mov r4d, %2
+
+add r3, r3
+
+mova m0, [tab_Vm]
+
+.loop
+ movu m1, [r2]
+ movu m2, [r2 + 16]
+ movu m3, [r2 + 32]
+ movu m4, [r2 + 48]
+ movu m5, [r2 + 64]
+ movu m6, [r2 + 80]
+
+ pshufb m1, m0
+ pshufb m2, m0
+ pshufb m3, m0
+ pshufb m4, m0
+ pshufb m5, m0
+ pshufb m6, m0
+
+ movh [r0], m1
+ movh [r0 + 8], m2
+ movh [r0 + 16], m3
+ movh [r0 + 24], m4
+ movh [r0 + 32], m5
+ movh [r0 + 40], m6
+
+ movu m1, [r2 + r3]
+ movu m2, [r2 + r3 + 16]
+ movu m3, [r2 + r3 + 32]
+ movu m4, [r2 + r3 + 48]
+ movu m5, [r2 + r3 + 64]
+ movu m6, [r2 + r3 + 80]
+
+ pshufb m1, m0
+ pshufb m2, m0
+ pshufb m3, m0
+ pshufb m4, m0
+ pshufb m5, m0
+ pshufb m6, m0
+
+ movh [r0 + r1], m1
+ movh [r0 + r1 + 8], m2
+ movh [r0 + r1 + 16], m3
+ movh [r0 + r1 + 24], m4
+ movh [r0 + r1 + 32], m5
+ movh [r0 + r1 + 40], m6
+
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
+
+ sub r4d, 2
+ jnz .loop
+
+RET
+%endmacro
+
+BLOCKCOPY_SP_W32_H2 48, 64
More information about the x265-devel
mailing list