[x265] [PATCH] pixel_add_ps_2x4, asm code
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Thu Nov 21 14:07:35 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1385039242 -19800
# Node ID 4de4f5ea8bb5b84feac68ce057c2614afdb268eb
# Parent a02029796cb1c99e75af53844b6b18b74fa68d27
pixel_add_ps_2x4, asm code
diff -r a02029796cb1 -r 4de4f5ea8bb5 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Thu Nov 21 18:21:54 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Thu Nov 21 18:37:22 2013 +0530
@@ -635,6 +635,7 @@
// until all partitions are coded and commit smaller patches, easier to
// review.
+ p.chroma[X265_CSP_I420].add_ps[CHROMA_2x4] = x265_pixel_add_ps_2x4_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_4x2] = x265_pixel_add_ps_4x2_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_4x4] = x265_pixel_add_ps_4x4_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_4x8] = x265_pixel_add_ps_4x8_sse4;
diff -r a02029796cb1 -r 4de4f5ea8bb5 source/common/x86/pixeladd8.asm
--- a/source/common/x86/pixeladd8.asm Thu Nov 21 18:21:54 2013 +0530
+++ b/source/common/x86/pixeladd8.asm Thu Nov 21 18:37:22 2013 +0530
@@ -28,6 +28,53 @@
SECTION .text
+
+;-----------------------------------------------------------------------------
+; void pixel_add_ps_2x4(pixel *dest, intptr_t destride, pixel *src0, int16_t *scr1, intptr_t srcStride0, intptr_t srcStride1)
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal pixel_add_ps_2x4, 6, 6, 2, dest, destride, src0, scr1, srcStride0, srcStride1
+
+add r5, r5
+
+pmovzxbw m0, [r2]
+movh m1, [r3]
+
+paddw m0, m1
+packuswb m0, m0
+
+pextrw [r0], m0, 0
+
+pmovzxbw m0, [r2 + r4]
+movh m1, [r3 + r5]
+
+paddw m0, m1
+packuswb m0, m0
+
+pextrw [r0 + r1], m0, 0
+
+pmovzxbw m0, [r2 + 2 * r4]
+movh m1, [r3 + 2 * r5]
+
+paddw m0, m1
+packuswb m0, m0
+
+pextrw [r0 + 2 * r1], m0, 0
+
+lea r0, [r0 + 2 * r1]
+lea r2, [r2 + 2 * r4]
+lea r3, [r3 + 2 * r5]
+
+pmovzxbw m0, [r2 + r4]
+movh m1, [r3 + r5]
+
+paddw m0, m1
+packuswb m0, m0
+
+pextrw [r0 + r1], m0, 0
+
+RET
+
;-----------------------------------------------------------------------------
; void pixel_add_ps_4x2(pixel *dest, intptr_t destride, pixel *src0, int16_t *scr1, intptr_t srcStride0, intptr_t srcStride1)
;-----------------------------------------------------------------------------
More information about the x265-devel
mailing list