[x265] [PATCH] blockcopy_sp_6x8, optimized asm code
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Fri Nov 8 17:20:31 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383927623 -19800
# Node ID 1f96f7e693f551be88259cc5f8dc156ae1690cd0
# Parent eb99ce96cf7f261816694b6083b8d4d0d986d7df
blockcopy_sp_6x8, optimized asm code
diff -r eb99ce96cf7f -r 1f96f7e693f5 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Fri Nov 08 21:21:21 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Fri Nov 08 21:50:23 2013 +0530
@@ -1048,47 +1048,32 @@
;-----------------------------------------------------------------------------
%macro BLOCKCOPY_SP_W6_H4 2
INIT_XMM sse4
-cglobal blockcopy_sp_6x8, 4, 7, 8, dest, destStride, src, srcStride
+cglobal blockcopy_sp_6x8, 4, 6, 2, dest, destStride, src, srcStride
-mov r5d, %2
+mov r4d, %2/2
-add r3, r3
-
-mova m0, [tab_Vm]
+add r3, r3
.loop
- movu m1, [r2]
- movu m2, [r2 + r3]
- movu m3, [r2 + 2 * r3]
- lea r4, [r2 + 2 * r3]
- movu m4, [r4 + r3]
+ movu m0, [r2]
+ movu m1, [r2 + r3]
- pshufb m1, m0
- pshufb m2, m0
- pshufb m3, m0
- pshufb m4, m0
- movd [r0], m1
- pextrw r6, m1, 2
- mov [r0 + 4], r6w
+ packuswb m0, m1
- movd [r0 + r1], m2
- pextrw r6, m2, 2
- mov [r0 + r1 + 4], r6w
+ movd [r0], m0
+ pextrw r5, m0, 2
+ mov [r0 + 4], r5w
- movd [r0 + 2 * r1], m3
- pextrw r6, m3, 2
- mov [r0 + 2 * r1 + 4], r6w
+ pextrw r5, m0, 6
+ pshufd m0, m0, 2
+ movd [r0 + r1], m0
+ mov [r0 + r1 + 4], r5w
- lea r4, [r0 + 2 * r1]
- movd [r4 + r1], m4
- pextrw r6, m4, 2
- mov [r4 + r1 + 4], r6w
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
- lea r0, [r0 + 4 * r1]
- lea r2, [r2 + 4 * r3]
-
- sub r5d, 4
+ dec r4d
jnz .loop
RET
More information about the x265-devel
mailing list