[x265] [PATCH] asm: code of sse_pp routine for 64x32, 64x48 and 64x64 blocks
murugan at multicorewareinc.com
murugan at multicorewareinc.com
Fri Nov 22 14:04:50 CET 2013
# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1385125480 -19800
# Fri Nov 22 18:34:40 2013 +0530
# Node ID 7dcb6894125c5ad277b31597aba77d4b72db39df
# Parent 37238c6124be44fdbeca53411dd35be3b938b38d
asm: code of sse_pp routine for 64x32, 64x48 and 64x64 blocks
diff -r 37238c6124be -r 7dcb6894125c source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Fri Nov 22 17:39:55 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Fri Nov 22 18:34:40 2013 +0530
@@ -607,6 +607,9 @@
p.sse_pp[LUMA_24x32] = x265_pixel_ssd_24x32_sse4;
p.sse_pp[LUMA_48x64] = x265_pixel_ssd_48x64_sse4;
p.sse_pp[LUMA_64x16] = x265_pixel_ssd_64x16_sse4;
+ p.sse_pp[LUMA_64x32] = x265_pixel_ssd_64x32_sse4;
+ p.sse_pp[LUMA_64x48] = x265_pixel_ssd_64x48_sse4;
+ p.sse_pp[LUMA_64x64] = x265_pixel_ssd_64x64_sse4;
CHROMA_PIXELSUB_PS(_sse4);
diff -r 37238c6124be -r 7dcb6894125c source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm Fri Nov 22 17:39:55 2013 +0530
+++ b/source/common/x86/pixel-a.asm Fri Nov 22 18:34:40 2013 +0530
@@ -831,6 +831,162 @@
RET
+;-----------------------------------------------------------------------------
+; int pixel_ssd_64x32( uint8_t *, intptr_t, uint8_t *, intptr_t )
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal pixel_ssd_64x32, 4, 7, 8, src1, stride1, src2, stride2
+
+ pxor m7, m7
+ pxor m6, m6
+ mov r4, r0
+ mov r5, r2
+ lea r6, [r1 * 2]
+
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 16]
+ lea r2, [r5 + 16]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 32]
+ lea r2, [r5 + 32]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 48]
+ lea r2, [r5 + 48]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+
+ HADDD m7, m1
+ movd eax, m7
+
+ RET
+
+;-----------------------------------------------------------------------------
+; int pixel_ssd_64x48( uint8_t *, intptr_t, uint8_t *, intptr_t )
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal pixel_ssd_64x48, 4, 7, 8, src1, stride1, src2, stride2
+
+ pxor m7, m7
+ pxor m6, m6
+ mov r4, r0
+ mov r5, r2
+ lea r6, [r1 * 2]
+
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 16]
+ lea r2, [r5 + 16]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 32]
+ lea r2, [r5 + 32]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 48]
+ lea r2, [r5 + 48]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+
+ HADDD m7, m1
+ movd eax, m7
+
+ RET
+
+;-----------------------------------------------------------------------------
+; int pixel_ssd_64x64( uint8_t *, intptr_t, uint8_t *, intptr_t )
+;-----------------------------------------------------------------------------
+INIT_XMM sse4
+cglobal pixel_ssd_64x64, 4, 7, 8, src1, stride1, src2, stride2
+
+ pxor m7, m7
+ pxor m6, m6
+ mov r4, r0
+ mov r5, r2
+ lea r6, [r1 * 2]
+
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 16]
+ lea r2, [r5 + 16]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 32]
+ lea r2, [r5 + 32]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r4 + 48]
+ lea r2, [r5 + 48]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+ lea r0, [r0 + r6]
+ lea r2, [r2 + 2 * r3]
+ call pixel_ssd_16x16_internal
+
+ HADDD m7, m1
+ movd eax, m7
+
+ RET
+
;-----------------------------------------------------------------------------
; void pixel_ssd_nv12_core( uint16_t *pixuv1, intptr_t stride1, uint16_t *pixuv2, intptr_t stride2,
; int width, int height, uint64_t *ssd_u, uint64_t *ssd_v )
diff -r 37238c6124be -r 7dcb6894125c source/common/x86/pixel.h
--- a/source/common/x86/pixel.h Fri Nov 22 17:39:55 2013 +0530
+++ b/source/common/x86/pixel.h Fri Nov 22 18:34:40 2013 +0530
@@ -376,5 +376,8 @@
int x265_pixel_ssd_24x32_sse4(pixel *, intptr_t, pixel *, intptr_t);
int x265_pixel_ssd_48x64_sse4(pixel *, intptr_t, pixel *, intptr_t);
int x265_pixel_ssd_64x16_sse4(pixel *, intptr_t, pixel *, intptr_t);
+int x265_pixel_ssd_64x32_sse4(pixel *, intptr_t, pixel *, intptr_t);
+int x265_pixel_ssd_64x48_sse4(pixel *, intptr_t, pixel *, intptr_t);
+int x265_pixel_ssd_64x64_sse4(pixel *, intptr_t, pixel *, intptr_t);
#endif // ifndef X265_I386_PIXEL_H
More information about the x265-devel
mailing list