[x265] [PATCH] asm code for blockcopy_ps_4x8
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 11 13:53:19 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384174390 -19800
# Node ID 7a84c2d52c20fb0d915556a008240130c4bf7005
# Parent e7d48d21981b32a44cb8a7ed9c57b69e4429a19a
asm code for blockcopy_ps_4x8
diff -r e7d48d21981b -r 7a84c2d52c20 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Nov 11 18:10:26 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Nov 11 18:23:10 2013 +0530
@@ -457,6 +457,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_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 e7d48d21981b -r 7a84c2d52c20 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Mon Nov 11 18:10:26 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Mon Nov 11 18:23:10 2013 +0530
@@ -1706,6 +1706,48 @@
RET
+
+;-----------------------------------------------------------------------------
+; void blockcopy_ps_%1x%2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
+;-----------------------------------------------------------------------------
+%macro BLOCKCOPY_PS_W4_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
+ movd m0, [r2]
+ pmovzxbw m0, m0
+ movh [r0], m0
+
+ movd m0, [r2 + r3]
+ pmovzxbw m0, m0
+ movh [r0 + r1], m0
+
+ movd m0, [r2 + 2 * r3]
+ pmovzxbw m0, m0
+ movh [r0 + 2 * r1], m0
+
+ lea r2, [r2 + 2 * r3]
+ lea r0, [r0 + 2 * r1]
+
+ movd m0, [r2 + r3]
+ pmovzxbw m0, m0
+ movh [r0 + r1], m0
+
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r3]
+
+ dec r4d
+ jnz .loop
+
+RET
+%endmacro
+
+BLOCKCOPY_PS_W4_H4 4, 8
+
;-----------------------------------------------------------------------------
; void blockcopy_ps_8x2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
;-----------------------------------------------------------------------------
diff -r e7d48d21981b -r 7a84c2d52c20 source/common/x86/blockcopy8.h
--- a/source/common/x86/blockcopy8.h Mon Nov 11 18:10:26 2013 +0530
+++ b/source/common/x86/blockcopy8.h Mon Nov 11 18:23:10 2013 +0530
@@ -96,6 +96,7 @@
#define CHROMA_BLOCKCOPY_DEF_SSE4(cpu) \
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(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