[x265] [PATCH] asm: 10bpp code for transpose 16x16
murugan at multicorewareinc.com
murugan at multicorewareinc.com
Wed Dec 4 07:36:29 CET 2013
# HG changeset patch
# User Murugan Vairavel <murugan at multicorewareinc.com>
# Date 1386138979 -19800
# Wed Dec 04 12:06:19 2013 +0530
# Node ID 8b73b22d90e1a0d70495e8b5f009a9c4fc37f258
# Parent 55c0bf9d99661073a7acdb5749e2625379d8393a
asm: 10bpp code for transpose 16x16
diff -r 55c0bf9d9966 -r 8b73b22d90e1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Dec 03 14:14:44 2013 -0600
+++ b/source/common/x86/asm-primitives.cpp Wed Dec 04 12:06:19 2013 +0530
@@ -528,6 +528,7 @@
p.transpose[BLOCK_4x4] = x265_transpose4_sse2;
p.transpose[BLOCK_8x8] = x265_transpose8_sse2;
+ p.transpose[BLOCK_16x16] = x265_transpose16_sse2;
p.ssim_4x4x2_core = x265_pixel_ssim_4x4x2_core_sse2;
PIXEL_AVG(sse2);
diff -r 55c0bf9d9966 -r 8b73b22d90e1 source/common/x86/pixel-util8.asm
--- a/source/common/x86/pixel-util8.asm Tue Dec 03 14:14:44 2013 -0600
+++ b/source/common/x86/pixel-util8.asm Wed Dec 04 12:06:19 2013 +0530
@@ -883,7 +883,10 @@
lea r1, [r1 + 2 * r2]
lea r0, [r3 + 8]
TRANSPOSE_4x4 r5
- lea r1, [r4 + 8]
+ lea r1, [r1 + 2 * r2]
+ neg r2
+ lea r1, [r1 + r2 * 8 + 8]
+ neg r2
lea r0, [r3 + 4 * r5]
TRANSPOSE_4x4 r5
lea r1, [r1 + 2 * r2]
@@ -893,7 +896,6 @@
cglobal transpose8, 3, 6, 4, dest, src, stride
add r2, r2
mov r3, r0
- mov r4, r1
mov r5, 16
call transpose8_internal
%else
@@ -978,8 +980,29 @@
; void transpose_16x16(pixel *dst, pixel *src, intptr_t stride)
;-----------------------------------------------------------------
INIT_XMM sse2
+%if HIGH_BIT_DEPTH
+cglobal transpose16, 3, 7, 4, dest, src, stride
+ add r2, r2
+ mov r3, r0
+ mov r4, r1
+ mov r5, 32
+ mov r6, r0
+ call transpose8_internal
+ lea r1, [r1 - 8 + 2 * r2]
+ lea r0, [r6 + 16]
+ mov r3, r0
+ call transpose8_internal
+ lea r1, [r4 + 16]
+ lea r0, [r6 + 8 * r5]
+ mov r3, r0
+ call transpose8_internal
+ lea r1, [r1 - 8 + 2 * r2]
+ lea r0, [r6 + 8 * r5 + 16]
+ mov r3, r0
+ call transpose8_internal
+
+%else
cglobal transpose16, 3, 5, 8, dest, src, stride
-
mov r3, r0
mov r4, r1
TRANSPOSE_8x8 16
@@ -992,7 +1015,7 @@
lea r1, [r1 + 2 * r2]
lea r0, [r3 + 8 * 16 + 8]
TRANSPOSE_8x8 16
-
+%endif
RET
cglobal transpose16_internal
More information about the x265-devel
mailing list