[x265] [PATCH 3 of 8] asm:intra_pred_ang4_4_sse2
dtyx265 at gmail.com
dtyx265 at gmail.com
Mon Mar 23 21:30:31 CET 2015
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427140402 25200
# Node ID f41f56fc0438049de9c25ef609910af3a22168a4
# Parent ac02f1184aa554cb2d3adbe688493f88f15cbd59
asm:intra_pred_ang4_4_sse2
This is backported from sse4 code and replaces c code.
64-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[ 4\]"
intra_ang_4x4[ 4] 2.74x 709.98 1947.60
32-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[ 4\]"
intra_ang_4x4[ 4] 3.97x 747.49 2970.13
diff -r ac02f1184aa5 -r f41f56fc0438 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Mon Mar 23 12:35:33 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp Mon Mar 23 12:53:22 2015 -0700
@@ -1198,6 +1198,7 @@
p.cu[BLOCK_4x4].intra_pred[2] = x265_intra_pred_ang4_2_sse2;
p.cu[BLOCK_4x4].intra_pred[3] = x265_intra_pred_ang4_3_sse2;
+ p.cu[BLOCK_4x4].intra_pred[4] = x265_intra_pred_ang4_4_sse2;
p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
p.cu[BLOCK_8x8].calcresidual = x265_getResidual8_sse2;
diff -r ac02f1184aa5 -r f41f56fc0438 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h Mon Mar 23 12:35:33 2015 -0700
+++ b/source/common/x86/intrapred.h Mon Mar 23 12:53:22 2015 -0700
@@ -49,6 +49,7 @@
DECL_ANG(4, 2, sse2);
DECL_ANG(4, 3, sse2);
+DECL_ANG(4, 4, sse2);
DECL_ANG(4, 2, ssse3);
DECL_ANG(4, 3, sse4);
diff -r ac02f1184aa5 -r f41f56fc0438 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm Mon Mar 23 12:35:33 2015 -0700
+++ b/source/common/x86/intrapred8.asm Mon Mar 23 12:53:22 2015 -0700
@@ -1215,6 +1215,31 @@
movd [r0 + r1], m0
RET
+cglobal intra_pred_ang4_4, 3,5,8
+ xor r4, r4
+ inc r4
+ cmp r3m, byte 32
+ mov r3, 9
+ cmove r3, r4
+
+ movh m0, [r2 + r3] ; [8 7 6 5 4 3 2 1]
+ mova m1, m0
+ psrldq m1, 1 ; [x 8 7 6 5 4 3 2]
+ punpcklbw m0, m1 ; [x 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1]
+ mova m1, m0
+ psrldq m1, 2 ; [x x x x x x x x 6 5 5 4 4 3 3 2]
+ mova m3, m0
+ psrldq m3, 4 ; [x x x x x x x x 7 6 6 5 5 4 4 3]
+ punpcklqdq m0, m1
+ punpcklqdq m2, m1, m3
+
+ lea r3, [pw_ang_table + 18 * 16]
+ mova m4, [r3 + 3 * 16] ; [21]
+ mova m5, [r3 - 8 * 16] ; [10]
+ mova m6, [r3 + 13 * 16] ; [31]
+ mova m7, [r3 + 2 * 16] ; [20]
+ 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