[x265] [PATCH] asm code for blockcopy_ps_6x8
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 11 15:54:43 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384181673 -19800
# Node ID e39f9ba2f96fe065dd676456f07832e8fbe8ae2d
# Parent 184059c875b5f68a68c3fd0a9935fed88cba5e7a
asm code for blockcopy_ps_6x8
diff -r 184059c875b5 -r e39f9ba2f96f source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Nov 11 19:20:41 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Nov 11 20:24:33 2013 +0530
@@ -460,6 +460,7 @@
p.chroma_copy_ps[CHROMA_4x2] = x265_blockcopy_ps_4x2_sse4;
p.chroma_copy_ps[CHROMA_4x4] = x265_blockcopy_ps_4x4_sse4;
p.chroma_copy_ps[CHROMA_4x8] = x265_blockcopy_ps_4x8_sse4;
+ p.chroma_copy_ps[CHROMA_6x8] = x265_blockcopy_ps_6x8_sse4;
p.chroma_copy_ps[CHROMA_8x2] = x265_blockcopy_ps_8x2_sse4;
p.chroma_copy_ps[CHROMA_8x4] = x265_blockcopy_ps_8x4_sse4;
p.chroma_copy_ps[CHROMA_8x6] = x265_blockcopy_ps_8x6_sse4;
diff -r 184059c875b5 -r e39f9ba2f96f source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Mon Nov 11 19:20:41 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Mon Nov 11 20:24:33 2013 +0530
@@ -1830,6 +1830,52 @@
BLOCKCOPY_PS_W4_H4 4, 8
+
+;-----------------------------------------------------------------------------
+; void blockcopy_ps_%1x%2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
+;-----------------------------------------------------------------------------
+%macro BLOCKCOPY_PS_W6_H4 2
+INIT_XMM sse4
+cglobal blockcopy_ps_%1x%2, 4, 5, 1, dest, destStride, src, srcStride
+
+add r1, r1
+mov r4d, %2/4
+
+.loop
+ movh m0, [r2]
+ pmovzxbw m0, m0
+ movh [r0], m0
+ pextrd [r0 + 8], m0, 2
+
+ movh m0, [r2 + r3]
+ pmovzxbw m0, m0
+ movh [r0 + r1], m0
+ pextrd [r0 + r1 + 8], m0, 2
+
+ movh m0, [r2 + 2 * r3]
+ pmovzxbw m0, m0
+ movh [r0 + 2 * r1], m0
+ pextrd [r0 + 2 * r1 + 8], m0, 2
+
+ lea r2, [r2 + 2 * r3]
+ lea r0, [r0 + 2 * r1]
+
+ movh m0, [r2 + r3]
+ pmovzxbw m0, m0
+ movh [r0 + r1], m0
+ pextrd [r0 + r1 + 8], m0, 2
+
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
+
+ dec r4d
+ jnz .loop
+
+RET
+%endmacro
+
+BLOCKCOPY_PS_W6_H4 6, 8
+
;-----------------------------------------------------------------------------
; void blockcopy_ps_8x2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
;-----------------------------------------------------------------------------
diff -r 184059c875b5 -r e39f9ba2f96f source/common/x86/blockcopy8.h
--- a/source/common/x86/blockcopy8.h Mon Nov 11 19:20:41 2013 +0530
+++ b/source/common/x86/blockcopy8.h Mon Nov 11 20:24:33 2013 +0530
@@ -99,6 +99,7 @@
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(4, 2, cpu); \
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(4, 4, cpu); \
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(4, 8, cpu); \
+ SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(6, 8, cpu); \
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 2, cpu); \
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 4, cpu); \
SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(8, 6, cpu); \
More information about the x265-devel
mailing list