[x265] [PATCH Review Only] asm code for blockcopy_sp, 8x8 partition

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Nov 5 16:33:12 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1383665578 -19800
# Node ID 8f3ef0e6ff6385c39e1be336f8b54e46e5c67ddc
# Parent  cd6e6dd4443c22bd7b3e1a39542273cc6de816e7
asm code for blockcopy_sp, 8x8 partition

diff -r cd6e6dd4443c -r 8f3ef0e6ff63 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Tue Nov 05 20:43:01 2013 +0530
+++ b/source/common/x86/blockcopy8.asm	Tue Nov 05 21:02:58 2013 +0530
@@ -885,3 +885,49 @@
 movh       [r4 + r1],       m6
 
 RET
+
+;-----------------------------------------------------------------------------
+; void blockcopy_sp_8x8(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)
+;-----------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal blockcopy_sp_8x8, 4, 6, 8, dest, destStride, src, srcStride
+
+add         r3,      r3
+
+mova        m0,     [tab_Vm]
+
+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
+
+RET


More information about the x265-devel mailing list