[x265] [PATCH] asm: 10bpp code for blockcopy_ps_48x64
murugan at multicorewareinc.com
murugan at multicorewareinc.com
Tue Dec 10 09:32:23 CET 2013
# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1386664204 -19800
# Tue Dec 10 14:00:04 2013 +0530
# Node ID 674a87448095d5f907454ed3fe2e1b1fe411a480
# Parent c86148cae36d031891801911fbe29f7390f01da3
asm: 10bpp code for blockcopy_ps_48x64
diff -r c86148cae36d -r 674a87448095 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Dec 10 13:41:27 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue Dec 10 14:00:04 2013 +0530
@@ -690,6 +690,7 @@
p.chroma[X265_CSP_I420].copy_pp[LUMA_64x48] = x265_blockcopy_pp_32x24_sse2;
p.chroma[X265_CSP_I420].copy_pp[LUMA_64x64] = x265_blockcopy_pp_32x32_sse2;
p.luma_copy_pp[LUMA_32x64] = x265_blockcopy_pp_32x64_sse2;
+ p.luma_copy_pp[LUMA_48x64] = x265_blockcopy_pp_48x64_sse2;
}
if (cpuMask & X265_CPU_SSSE3)
{
diff -r c86148cae36d -r 674a87448095 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Tue Dec 10 13:41:27 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Tue Dec 10 14:00:04 2013 +0530
@@ -984,33 +984,111 @@
;-----------------------------------------------------------------------------
%macro BLOCKCOPY_PP_W48_H2 2
INIT_XMM sse2
-cglobal blockcopy_pp_%1x%2, 4, 5, 8, dest, deststride, src, srcstride
-
-mov r4d, %2
-
+cglobal blockcopy_pp_%1x%2, 4, 5, 6, dest, deststride, src, srcstride
+ mov r4d, %2/4
+%if HIGH_BIT_DEPTH
+ add r1, r1
+ add r3, r3
.loop
- movu m0, [r2]
- movu m1, [r2 + 16]
- movu m2, [r2 + 32]
-
- movu m3, [r2 + r3]
- movu m4, [r2 + r3 + 16]
- movu m5, [r2 + r3 + 32]
-
- movu [r0], m0
- movu [r0 + 16], m1
- movu [r0 + 32], m2
-
- movu [r0 + r1], m3
- movu [r0 + r1 + 16], m4
- movu [r0 + r1 + 32], m5
-
- lea r0, [r0 + 2 * r1]
- lea r2, [r2 + 2 * r3]
-
- sub r4d, 2
- jnz .loop
-
+ movu m0, [r2]
+ movu m1, [r2 + 16]
+ movu m2, [r2 + 32]
+ movu m3, [r2 + 48]
+ movu m4, [r2 + 64]
+ movu m5, [r2 + 80]
+
+ movu [r0], m0
+ movu [r0 + 16], m1
+ movu [r0 + 32], m2
+ movu [r0 + 48], m3
+ movu [r0 + 64], m4
+ movu [r0 + 80], m5
+
+ movu m0, [r2 + r3]
+ movu m1, [r2 + r3 + 16]
+ movu m2, [r2 + r3 + 32]
+ movu m3, [r2 + r3 + 48]
+ movu m4, [r2 + r3 + 64]
+ movu m5, [r2 + r3 + 80]
+ lea r2, [r2 + 2 * r3]
+
+ movu [r0 + r1], m0
+ movu [r0 + r1 + 16], m1
+ movu [r0 + r1 + 32], m2
+ movu [r0 + r1 + 48], m3
+ movu [r0 + r1 + 64], m4
+ movu [r0 + r1 + 80], m5
+ lea r0, [r0 + 2 * r1]
+
+ movu m0, [r2]
+ movu m1, [r2 + 16]
+ movu m2, [r2 + 32]
+ movu m3, [r2 + 48]
+ movu m4, [r2 + 64]
+ movu m5, [r2 + 80]
+
+ movu [r0], m0
+ movu [r0 + 16], m1
+ movu [r0 + 32], m2
+ movu [r0 + 48], m3
+ movu [r0 + 64], m4
+ movu [r0 + 80], m5
+
+ movu m0, [r2 + r3]
+ movu m1, [r2 + r3 + 16]
+ movu m2, [r2 + r3 + 32]
+ movu m3, [r2 + r3 + 48]
+ movu m4, [r2 + r3 + 64]
+ movu m5, [r2 + r3 + 80]
+
+ movu [r0 + r1], m0
+ movu [r0 + r1 + 16], m1
+ movu [r0 + r1 + 32], m2
+ movu [r0 + r1 + 48], m3
+ movu [r0 + r1 + 64], m4
+ movu [r0 + r1 + 80], m5
+
+ dec r4d
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
+ jnz .loop
+%else
+.loop
+ movu m0, [r2]
+ movu m1, [r2 + 16]
+ movu m2, [r2 + 32]
+ movu m3, [r2 + r3]
+ movu m4, [r2 + r3 + 16]
+ movu m5, [r2 + r3 + 32]
+ lea r2, [r2 + 2 * r3]
+
+ movu [r0], m0
+ movu [r0 + 16], m1
+ movu [r0 + 32], m2
+ movu [r0 + r1], m3
+ movu [r0 + r1 + 16], m4
+ movu [r0 + r1 + 32], m5
+ lea r0, [r0 + 2 * r1]
+
+ movu m0, [r2]
+ movu m1, [r2 + 16]
+ movu m2, [r2 + 32]
+ movu m3, [r2 + r3]
+ movu m4, [r2 + r3 + 16]
+ movu m5, [r2 + r3 + 32]
+
+ movu [r0], m0
+ movu [r0 + 16], m1
+ movu [r0 + 32], m2
+ movu [r0 + r1], m3
+ movu [r0 + r1 + 16], m4
+ movu [r0 + r1 + 32], m5
+
+ dec r4d
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
+ jnz .loop
+%endif
RET
%endmacro
More information about the x265-devel
mailing list