[x265] [PATCH 05 of 11] asm: intra_pred_ang4_13_sse2
dtyx265 at gmail.com
dtyx265 at gmail.com
Sat Mar 28 03:42:45 CET 2015
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427506466 25200
# Node ID 21fa4dfd1ceb3c1479722f759411afc402c03ea6
# Parent 3ea097e4acb7e6ce9161b79968c3653741003daf
asm: intra_pred_ang4_13_sse2
This is backported from sse4 code and replaces c code.
64-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[13\]"
intra_ang_4x4[13] 3.02x 697.49 2105.43
32-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[13\]"
intra_ang_4x4[13] 4.07x 755.00 3073.42
diff -r 3ea097e4acb7 -r 21fa4dfd1ceb source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Fri Mar 27 18:25:36 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp Fri Mar 27 18:34:26 2015 -0700
@@ -1207,6 +1207,7 @@
p.cu[BLOCK_4x4].intra_pred[10] = x265_intra_pred_ang4_10_sse2;
p.cu[BLOCK_4x4].intra_pred[11] = x265_intra_pred_ang4_11_sse2;
p.cu[BLOCK_4x4].intra_pred[12] = x265_intra_pred_ang4_12_sse2;
+ p.cu[BLOCK_4x4].intra_pred[13] = x265_intra_pred_ang4_13_sse2;
p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
diff -r 3ea097e4acb7 -r 21fa4dfd1ceb source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h Fri Mar 27 18:25:36 2015 -0700
+++ b/source/common/x86/intrapred.h Fri Mar 27 18:34:26 2015 -0700
@@ -58,6 +58,7 @@
DECL_ANG(4, 10, sse2);
DECL_ANG(4, 11, sse2);
DECL_ANG(4, 12, sse2);
+DECL_ANG(4, 13, sse2);
DECL_ANG(4, 26, sse2);
DECL_ANG(4, 2, ssse3);
diff -r 3ea097e4acb7 -r 21fa4dfd1ceb source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm Fri Mar 27 18:25:36 2015 -0700
+++ b/source/common/x86/intrapred8.asm Fri Mar 27 18:34:26 2015 -0700
@@ -1595,6 +1595,35 @@
mova m7, [r3 - 8 * 16] ; [12]
jmp mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
+cglobal intra_pred_ang4_13, 4,5,8
+ xor r4d, r4d
+ cmp r3m, byte 23
+ mov r3d, 8
+ jz .next
+ xchg r3d, r4d
+
+.next:
+ movd m1, [r2 - 1] ;[x x A x]
+ movd m2, [r2 + r4 + 1] ;[4 3 2 1]
+ movd m0, [r2 + r3 + 3] ;[x x B x]
+ punpcklbw m0, m1 ;[x x x x A B x x]
+ punpckldq m0, m2 ;[4 3 2 1 A B x x]
+ psrldq m0, 2 ;[x x 4 3 2 1 A B]
+ punpcklbw m0, m0 ;[x x x x 4 4 3 3 2 2 1 1 A A B B]
+ mova m1, m0
+ psrldq m0, 3 ;[x x x x x x x 4 4 3 3 2 2 1 1 A]
+ psrldq m1, 1 ;[x x x x x 4 4 3 3 2 2 1 1 A A B]
+ movh m2, m0
+ punpcklqdq m0, m0
+ punpcklqdq m2, m1
+
+ lea r3, [pw_ang_table + 21 * 16]
+ mova m4, [r3 + 2 * 16] ; [23]
+ mova m5, [r3 - 7 * 16] ; [14]
+ mova m6, [r3 - 16 * 16] ; [ 5]
+ mova m7, [r3 + 7 * 16] ; [28]
+ jmp mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
+
;---------------------------------------------------------------------------------------------
; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
;---------------------------------------------------------------------------------------------
More information about the x265-devel
mailing list