[x265] [PATCH] pixel_add_ps_6x8, asm code
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Thu Nov 21 13:52:56 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1385038314 -19800
# Node ID a02029796cb1c99e75af53844b6b18b74fa68d27
# Parent 907b99bb4a404f4d5dd1655751b47c226b574f53
pixel_add_ps_6x8, asm code
diff -r 907b99bb4a40 -r a02029796cb1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Thu Nov 21 17:27:06 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Thu Nov 21 18:21:54 2013 +0530
@@ -639,6 +639,7 @@
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;
p.chroma[X265_CSP_I420].add_ps[CHROMA_4x16] = x265_pixel_add_ps_4x16_sse4;
+ p.chroma[X265_CSP_I420].add_ps[CHROMA_6x8] = x265_pixel_add_ps_6x8_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_8x2] = x265_pixel_add_ps_8x2_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_8x4] = x265_pixel_add_ps_8x4_sse4;
p.chroma[X265_CSP_I420].add_ps[CHROMA_8x6] = x265_pixel_add_ps_8x6_sse4;
diff -r 907b99bb4a40 -r a02029796cb1 source/common/x86/pixeladd8.asm
--- a/source/common/x86/pixeladd8.asm Thu Nov 21 17:27:06 2013 +0530
+++ b/source/common/x86/pixeladd8.asm Thu Nov 21 18:21:54 2013 +0530
@@ -161,6 +161,71 @@
PIXEL_ADD_PS_W4_H4 4, 8
PIXEL_ADD_PS_W4_H4 4, 16
+
+;-----------------------------------------------------------------------------
+; void pixel_add_ps_%1x%2(pixel *dest, intptr_t destride, pixel *src0, int16_t *scr1, intptr_t srcStride0, intptr_t srcStride1)
+;-----------------------------------------------------------------------------
+%macro PIXEL_ADD_PS_W6_H4 2
+INIT_XMM sse4
+cglobal pixel_add_ps_%1x%2, 6, 7, 2, dest, destride, src0, scr1, srcStride0, srcStride1
+
+add r5, r5
+
+mov r6d, %2/4
+
+.loop
+ pmovzxbw m0, [r2]
+ movu m1, [r3]
+
+ paddw m0, m1
+ packuswb m0, m0
+
+ movd [r0], m0
+ pextrw [r0 + 4], m0, 2
+
+ pmovzxbw m0, [r2 + r4]
+ movu m1, [r3 + r5]
+
+ paddw m0, m1
+ packuswb m0, m0
+
+ movd [r0 + r1], m0
+ pextrw [r0 + r1 + 4], m0, 2
+
+ pmovzxbw m0, [r2 + 2 * r4]
+ movu m1, [r3 + 2 * r5]
+
+ paddw m0, m1
+ packuswb m0, m0
+
+ movd [r0 + 2 * r1], m0
+ pextrw [r0 + 2 * r1 + 4], m0, 2
+
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r4]
+ lea r3, [r3 + 2 * r5]
+
+ pmovzxbw m0, [r2 + r4]
+ movu m1, [r3 + r5]
+
+ paddw m0, m1
+ packuswb m0, m0
+
+ movd [r0 + r1], m0
+ pextrw [r0 + r1 + 4], m0, 2
+
+ lea r0, [r0 + 2 * r1]
+ lea r2, [r2 + 2 * r4]
+ lea r3, [r3 + 2 * r5]
+
+ dec r6d
+ jnz .loop
+
+RET
+%endmacro
+
+PIXEL_ADD_PS_W6_H4 6, 8
+
;-----------------------------------------------------------------------------
; void pixel_add_ps_8x2(pixel *dest, intptr_t destride, pixel *src0, int16_t *scr1, intptr_t srcStride0, intptr_t srcStride1)
;-----------------------------------------------------------------------------
More information about the x265-devel
mailing list