[x265] [PATCH Review only] asm: code for transpose_32x32 routine
murugan at multicorewareinc.com
murugan at multicorewareinc.com
Wed Nov 20 13:21:41 CET 2013
# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1384950080 -19800
# Wed Nov 20 17:51:20 2013 +0530
# Node ID 2ea432a36a03a7ee7e0f788181ff35ac8db20337
# Parent a059cd5c08133486fb0499aeb77ac34677759d9b
asm: code for transpose_32x32 routine
diff -r a059cd5c0813 -r 2ea432a36a03 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Nov 20 15:13:48 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Nov 20 17:51:20 2013 +0530
@@ -547,6 +547,7 @@
p.transpose[BLOCK_4x4] = x265_transpose4_sse2;
p.transpose[BLOCK_8x8] = x265_transpose8_sse2;
p.transpose[BLOCK_16x16] = x265_transpose16_sse2;
+ p.transpose[BLOCK_32x32] = x265_transpose32_sse2;
}
if (cpuMask & X265_CPU_SSSE3)
{
diff -r a059cd5c0813 -r 2ea432a36a03 source/common/x86/pixel-a.asm
--- a/source/common/x86/pixel-a.asm Wed Nov 20 15:13:48 2013 +0530
+++ b/source/common/x86/pixel-a.asm Wed Nov 20 17:51:20 2013 +0530
@@ -7079,6 +7079,48 @@
RET
+%macro TRANSPOSE_16x16 1
+ TRANSPOSE_8x8 %1
+ lea r1, [r1 + 2 * r2]
+ lea r0, [r5 + 8]
+ TRANSPOSE_8x8 %1
+ lea r1, [r6 + 8]
+ lea r0, [r5 + 8 * %1]
+ TRANSPOSE_8x8 %1
+ lea r1, [r1 + 2 * r2]
+ lea r0, [r5 + 8 * %1 + 8]
+ TRANSPOSE_8x8 %1
+%endmacro
+
+;-----------------------------------------------------------------
+; void transpose_32x32(pixel *dst, pixel *src, intptr_t stride)
+;-----------------------------------------------------------------
+INIT_XMM sse2
+cglobal transpose32, 3, 7, 8, dest, src, stride
+
+ mov r3, r0
+ mov r4, r1
+ mov r5, r0
+ mov r6, r1
+ TRANSPOSE_16x16 32
+ lea r1, [r1 - 8 + 2 * r2]
+ lea r0, [r3 + 16]
+ mov r5, r0
+ mov r6, r1
+ TRANSPOSE_16x16 32
+ lea r1, [r4 + 16]
+ lea r0, [r3 + 16 * 32]
+ mov r5, r0
+ mov r6, r1
+ TRANSPOSE_16x16 32
+ lea r1, [r1 - 8 + 2 * r2]
+ lea r0, [r3 + 16 * 32 + 16]
+ mov r5, r0
+ mov r6, r1
+ TRANSPOSE_16x16 32
+
+ RET
+
;-----------------------------------------------------------------------------
; void pixel_sub_ps_c_2x4(int16_t *dest, intptr_t destride, pixel *src0, pixel *src1, intptr_t srcstride0, intptr_t srcstride1);
;-----------------------------------------------------------------------------
diff -r a059cd5c0813 -r 2ea432a36a03 source/common/x86/pixel.h
--- a/source/common/x86/pixel.h Wed Nov 20 15:13:48 2013 +0530
+++ b/source/common/x86/pixel.h Wed Nov 20 17:51:20 2013 +0530
@@ -367,5 +367,6 @@
void x265_transpose4_sse2(pixel *dest, pixel *src, intptr_t stride);
void x265_transpose8_sse2(pixel *dest, pixel *src, intptr_t stride);
void x265_transpose16_sse2(pixel *dest, pixel *src, intptr_t stride);
+void x265_transpose32_sse2(pixel *dest, pixel *src, intptr_t stride);
#endif // ifndef X265_I386_PIXEL_H
More information about the x265-devel
mailing list