[x265] [PATCH] asm code for blockcopy_ps_4x4
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 11 13:40:36 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384173626 -19800
# Node ID e7d48d21981b32a44cb8a7ed9c57b69e4429a19a
# Parent 3b48733bee3327ae046c00ebc24877882e54c9ec
asm code for blockcopy_ps_4x4
diff -r 3b48733bee33 -r e7d48d21981b source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Nov 11 18:01:16 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Nov 11 18:10:26 2013 +0530
@@ -456,6 +456,7 @@
// review.
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_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 3b48733bee33 -r e7d48d21981b source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Mon Nov 11 18:01:16 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Mon Nov 11 18:10:26 2013 +0530
@@ -1676,6 +1676,36 @@
RET
+
+;-----------------------------------------------------------------------------
+; void blockcopy_ps_4x4(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal blockcopy_ps_4x4, 4, 4, 1, dest, destStride, src, srcStride
+
+add r1, r1
+
+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
+
+RET
+
;-----------------------------------------------------------------------------
; void blockcopy_ps_8x2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
;-----------------------------------------------------------------------------
diff -r 3b48733bee33 -r e7d48d21981b source/common/x86/blockcopy8.h
--- a/source/common/x86/blockcopy8.h Mon Nov 11 18:01:16 2013 +0530
+++ b/source/common/x86/blockcopy8.h Mon Nov 11 18:10:26 2013 +0530
@@ -95,6 +95,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(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