[x265] [PATCH] asm code for blockcopy_ps_8x4

praveen at multicorewareinc.com praveen at multicorewareinc.com
Mon Nov 11 09:05:20 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1384157111 -19800
# Node ID e8756b2c05c7c7de5ec41e9f299b97fc1bc5b28d
# Parent  74f525729a65be1dc6c6e3136c268c7ea9f5c724
asm code for blockcopy_ps_8x4

diff -r 74f525729a65 -r e8756b2c05c7 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Mon Nov 11 13:07:57 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Mon Nov 11 13:35:11 2013 +0530
@@ -457,6 +457,7 @@
         // review.
 
         p.chroma_copy_ps[CHROMA_8x2] = x265_blockcopy_ps_8x2_sse4;
+        p.chroma_copy_ps[CHROMA_8x4] = x265_blockcopy_ps_8x4_sse4;
     }
     if (cpuMask & X265_CPU_AVX)
     {
diff -r 74f525729a65 -r e8756b2c05c7 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Mon Nov 11 13:07:57 2013 +0530
+++ b/source/common/x86/blockcopy8.asm	Mon Nov 11 13:35:11 2013 +0530
@@ -1674,3 +1674,32 @@
 movu       [r0 + r1],  m0
 
 RET
+
+;-----------------------------------------------------------------------------
+; void blockcopy_ps_8x4(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal blockcopy_ps_8x4, 4, 4, 1, dest, destStride, src, srcStride
+
+add        r1,            r1
+
+movh       m0,            [r2]
+pmovzxbw   m0,            m0
+movu       [r0],          m0
+
+movh       m0,            [r2 + r3]
+pmovzxbw   m0,            m0
+movu       [r0 + r1],     m0
+
+movh       m0,            [r2 + 2 * r3]
+pmovzxbw   m0,            m0
+movu       [r0 + 2 * r1], m0
+
+lea        r2,            [r2 + 2 * r3]
+lea        r0,            [r0 + 2 * r1]
+
+movh       m0,            [r2 + r3]
+pmovzxbw   m0,            m0
+movu       [r0 + r1],     m0
+
+RET
diff -r 74f525729a65 -r e8756b2c05c7 source/common/x86/blockcopy8.h
--- a/source/common/x86/blockcopy8.h	Mon Nov 11 13:07:57 2013 +0530
+++ b/source/common/x86/blockcopy8.h	Mon Nov 11 13:35:11 2013 +0530
@@ -94,7 +94,8 @@
     void x265_blockcopy_ps_ ## W ## x ## H ## cpu(int16_t *dst, intptr_t dstStride, pixel *src, intptr_t srcStride);
 
 #define CHROMA_BLOCKCOPY_DEF_SSE4(cpu) \
-    SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 2, cpu);
+    SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 2, cpu); \
+    SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 4, cpu);
 
 CHROMA_BLOCKCOPY_DEF_SSE4(_sse4);
 


More information about the x265-devel mailing list