[x265] [PATCH] blockcopy_pp_8x8: sse2 asm code optimization

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Feb 3 13:39:43 CET 2015


# HG changeset patch
# User Praveen Tiwari
# Date 1422967175 -19800
# Node ID f1279e348bdaec9e7040e74bb4a9e27651b81707
# Parent  cd9362ddc5c58c48246d6f7d0054e33c9ff16583
blockcopy_pp_8x8: sse2 asm code optimization

improved, 127.71c -> 110.09c

diff -r cd9362ddc5c5 -r f1279e348bda source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm	Tue Feb 03 17:58:13 2015 +0530
+++ b/source/common/x86/blockcopy8.asm	Tue Feb 03 18:09:35 2015 +0530
@@ -382,6 +382,38 @@
     RET
 
 ;-----------------------------------------------------------------------------
+; void blockcopy_pp_8x8(pixel* dst, intptr_t dstStride, const pixel* src, intptr_t srcStride)
+;-----------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal blockcopy_pp_8x8, 4, 6, 4
+
+    lea      r4, [3 * r3]
+    lea      r5, [3 * r1]
+
+    movh     m0, [r2]
+    movh     m1, [r2 + r3]
+    movh     m2, [r2 + 2 * r3]
+    movh     m3, [r2 + r4]
+
+    movh     [r0],          m0
+    movh     [r0 + r1],     m1
+    movh     [r0 + 2 * r1], m2
+    movh     [r0 + r5],     m3
+
+    lea      r2, [r2 + 4 * r3]
+    movh     m0, [r2]
+    movh     m1, [r2 + r3]
+    movh     m2, [r2 + 2 * r3]
+    movh     m3, [r2 + r4]
+
+    lea      r0,            [r0 + 4 * r1]
+    movh     [r0],          m0
+    movh     [r0 + r1],     m1
+    movh     [r0 + 2 * r1], m2
+    movh     [r0 + r5],     m3
+    RET
+
+;-----------------------------------------------------------------------------
 ; void blockcopy_pp_%1x%2(pixel* dst, intptr_t dstStride, const pixel* src, intptr_t srcStride)
 ;-----------------------------------------------------------------------------
 %macro BLOCKCOPY_PP_W8_H8 2
@@ -422,7 +454,6 @@
 RET
 %endmacro
 
-BLOCKCOPY_PP_W8_H8 8, 8
 BLOCKCOPY_PP_W8_H8 8, 16
 BLOCKCOPY_PP_W8_H8 8, 32
 


More information about the x265-devel mailing list