[x265] [PATCH] asm code for blockcopy_sp, 2x8

praveen at multicorewareinc.com praveen at multicorewareinc.com
Wed Nov 6 15:58:25 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1383749895 -19800
# Node ID c6c2f999c37ee5846f056183fbbfccf1a8e8a82d
# Parent  6e8d917d7d904c1498307f4895fc0f2c3a959389
asm code for blockcopy_sp, 2x8

diff -r 6e8d917d7d90 -r c6c2f999c37e source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Nov 06 19:58:21 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Wed Nov 06 20:28:15 2013 +0530
@@ -331,6 +331,7 @@
 //It is used to avoid linker error until all partion are coded and commit smaller patches, easier to review.
 
         p.chroma_copy_sp[CHROMA_2x4] = x265_blockcopy_sp_2x4_sse2;
+        p.chroma_copy_sp[CHROMA_2x8] = x265_blockcopy_sp_2x8_sse2;
         p.chroma_copy_sp[CHROMA_4x2] = x265_blockcopy_sp_4x2_sse2;
         p.chroma_copy_sp[CHROMA_4x4] = x265_blockcopy_sp_4x4_sse2;
         p.chroma_copy_sp[CHROMA_4x8] = x265_blockcopy_sp_4x8_sse2;
diff -r 6e8d917d7d90 -r c6c2f999c37e source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Wed Nov 06 19:58:21 2013 +0530
+++ b/source/common/x86/blockcopy8.asm	Wed Nov 06 20:28:15 2013 +0530
@@ -835,6 +835,69 @@
 
 RET
 
+
+;-----------------------------------------------------------------------------
+; void blockcopy_sp_2x8(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)
+;-----------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal blockcopy_sp_2x8, 4, 7, 8, dest, destStride, src, srcStride
+
+add        r3,      r3
+
+mova       m0,      [tab_Vm]
+
+movd       m1,      [r2]
+movd       m2,      [r2 + r3]
+movd       m3,      [r2 + 2 * r3]
+lea        r4,      [r2 + 2 * r3]
+movd       m4,      [r4 + r3]
+movd       m5,      [r4 + 2 * r3]
+lea        r4,      [r4 + 2 * r3]
+movd       m6,      [r4 + r3]
+movd       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
+
+pextrw     r6,            m1,          0
+mov        [r0],          r6w
+
+pextrw     r6,            m2,          0
+mov        [r0 + r1],     r6w
+
+pextrw     r6,            m3,          0
+mov        [r0 + 2 * r1], r6w
+
+lea        r4,            [r0 + 2 * r1]
+pextrw     r6,            m4,          0
+mov        [r4 + r1],     r6w
+
+pextrw     r6,            m5,          0
+mov        [r4 + 2 * r1], r6w
+
+
+lea        r4,            [r4 + 2 * r1]
+pextrw     r6,            m6,          0
+mov        [r4 + r1],     r6w
+
+pextrw     r6,            m7,          0
+mov        [r4 + 2 * r1], r6w
+
+movd       m1,            [r5 + r3]
+pshufb     m1,            m0
+
+lea        r4,            [r4 + 2 * r1]
+pextrw     r6,            m1,          0
+mov        [r4 + r1],     r6w
+
+RET
+
 ;-----------------------------------------------------------------------------
 ; void blockcopy_sp_4x2(pixel *dest, intptr_t destStride, int16_t *src, intptr_t srcStride)
 ;-----------------------------------------------------------------------------


More information about the x265-devel mailing list