[x265] [PATCH] asm code for blockcopy_ps_4x2
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Mon Nov 11 13:31:26 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384173076 -19800
# Node ID 3b48733bee3327ae046c00ebc24877882e54c9ec
# Parent afcf4952995ca2da024776b1795841cf45187d9c
asm code for blockcopy_ps_4x2
diff -r afcf4952995c -r 3b48733bee33 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Nov 11 17:50:45 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Mon Nov 11 18:01:16 2013 +0530
@@ -455,6 +455,7 @@
// until all partitions are coded and commit smaller patches, easier to
// review.
+ p.chroma_copy_ps[CHROMA_4x2] = x265_blockcopy_ps_4x2_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 afcf4952995c -r 3b48733bee33 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Mon Nov 11 17:50:45 2013 +0530
+++ b/source/common/x86/blockcopy8.asm Mon Nov 11 18:01:16 2013 +0530
@@ -1657,6 +1657,25 @@
BLOCKFILL_S_W32_H4 32, 32
+
+;-----------------------------------------------------------------------------
+; void blockcopy_ps_4x2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal blockcopy_ps_4x2, 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
+
+RET
+
;-----------------------------------------------------------------------------
; void blockcopy_ps_8x2(int16_t *dest, intptr_t destStride, pixel *src, intptr_t srcStride);
;-----------------------------------------------------------------------------
diff -r afcf4952995c -r 3b48733bee33 source/common/x86/blockcopy8.h
--- a/source/common/x86/blockcopy8.h Mon Nov 11 17:50:45 2013 +0530
+++ b/source/common/x86/blockcopy8.h Mon Nov 11 18:01:16 2013 +0530
@@ -94,6 +94,7 @@
void x265_blockcopy_ps_ ## W ## x ## H ## cpu(int16_t *dst, intptr_t dstStride, pixel *src, intptr_t srcStride);
#define CHROMA_BLOCKCOPY_DEF_SSE4(cpu) \
+ SETUP_CHROMA_BLOCKCOPY_FUNC_SSE4(4, 2, 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