[x265] [PATCH Review Only] demo asm code for pixel_add_pp_c, 8x4 block
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Nov 5 09:18:16 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1383639477 -19800
# Node ID 31e895d679b47fafc0e8f0d46d49e26ae4f51382
# Parent 686b5b50279715bcfd15af8603e52c59de7d1b40
demo asm code for pixel_add_pp_c, 8x4 block
diff -r 686b5b502797 -r 31e895d679b4 source/common/x86/blockcopy8.asm
--- a/source/common/x86/blockcopy8.asm Mon Nov 04 22:50:48 2013 -0600
+++ b/source/common/x86/blockcopy8.asm Tue Nov 05 13:47:57 2013 +0530
@@ -796,3 +796,40 @@
BLOCKCOPY_PP_W64_H2 64, 32
BLOCKCOPY_PP_W64_H2 64, 48
BLOCKCOPY_PP_W64_H2 64, 64
+
+;-----------------------------------------------------------------------------
+; void pixel_add_pp_c_8x4(pixel *dest, intptr_t destride, pixel *src0, pixel *src1, intptr_t srcstride0, intptr_t srcstride1);
+;-----------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal pixel_add_pp_8x4, 4, 6, 8, dest, deststride, src0, src1
+
+mov r4d, r4m
+mov r5d, r5m
+
+movh m0, [r2]
+movh m1, [r3]
+
+movh m2, [r2 + r4]
+movh m3, [r3 + r5]
+
+movh m4, [r2 + 2 * r4]
+movh m5, [r3 + 2 * r5]
+
+lea r2, [r2 + 2 * r4]
+lea r3, [r3 + 2 * r5]
+
+movh m6, [r2 + r4]
+movh m7, [r3 + r5]
+
+paddusb m0, m1
+paddusb m2, m3
+paddusb m4, m5
+paddusb m6, m7
+
+movh [r0], m0
+movh [r0 + r1], m2
+movh [r0 + 2 * r1], m4
+
+lea r0, [r0 + 2 * r1]
+movh [r0 + r1], m6
+RET
More information about the x265-devel
mailing list