[x265] [PATCH 10 of 11] asm: intra_pred_ang4_26_sse2
dtyx265 at gmail.com
dtyx265 at gmail.com
Wed Apr 1 23:14:31 CEST 2015
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427918405 25200
# Node ID 31835b123607cbc75bdb145a4039f5c2d3046f67
# Parent e1c4c4e77ac10b73634e359b8f3d8bd4fe50958e
asm: intra_pred_ang4_26_sse2
This is backported from sse4 code and replaces c code.
64-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[26\]"
intra_ang_4x4[26] 3.37x 217.62 732.77
32-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[26\]"
intra_ang_4x4[26] 2.82x 310.09 873.38
diff -r e1c4c4e77ac1 -r 31835b123607 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Apr 01 12:11:35 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp Wed Apr 01 13:00:05 2015 -0700
@@ -1205,6 +1205,7 @@
p.cu[BLOCK_4x4].intra_pred[8] = x265_intra_pred_ang4_8_sse2;
p.cu[BLOCK_4x4].intra_pred[9] = x265_intra_pred_ang4_9_sse2;
p.cu[BLOCK_4x4].intra_pred[10] = x265_intra_pred_ang4_10_sse2;
+ p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
p.cu[BLOCK_8x8].calcresidual = x265_getResidual8_sse2;
diff -r e1c4c4e77ac1 -r 31835b123607 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h Wed Apr 01 12:11:35 2015 -0700
+++ b/source/common/x86/intrapred.h Wed Apr 01 13:00:05 2015 -0700
@@ -56,6 +56,7 @@
DECL_ANG(4, 8, sse2);
DECL_ANG(4, 9, sse2);
DECL_ANG(4, 10, sse2);
+DECL_ANG(4, 26, sse2);
DECL_ANG(4, 2, ssse3);
DECL_ANG(4, 3, sse4);
diff -r e1c4c4e77ac1 -r 31835b123607 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm Wed Apr 01 12:11:35 2015 -0700
+++ b/source/common/x86/intrapred8.asm Wed Apr 01 13:00:05 2015 -0700
@@ -1574,6 +1574,45 @@
movd [r0], m0
RET
+cglobal intra_pred_ang4_26, 3,4,4
+ movd m0, [r2 + 1] ; [8 7 6 5 4 3 2 1]
+
+ ; store
+ movd [r0], m0
+ movd [r0 + r1], m0
+ movd [r0 + r1 * 2], m0
+ lea r3, [r1 * 3]
+ movd [r0 + r3], m0
+
+ ; filter
+ cmp r4m, byte 0
+ jz .quit
+
+ pxor m3, m3
+ punpcklbw m0, m3
+ pshuflw m0, m0, 0x00
+ movd m2, [r2]
+ punpcklbw m2, m3
+ pshuflw m2, m2, 0x00
+ movd m1, [r2 + 9]
+ punpcklbw m1, m3
+ psubw m1, m2
+ psraw m1, 1
+ paddw m0, m1
+ packuswb m0, m0
+
+ movd r2, m0
+ mov [r0], r2b
+ shr r2, 8
+ mov [r0 + r1], r2b
+ shr r2, 8
+ mov [r0 + r1 * 2], r2b
+ shr r2, 8
+ mov [r0 + r3], r2b
+
+.quit:
+ RET
+
;---------------------------------------------------------------------------------------------
; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
;---------------------------------------------------------------------------------------------
More information about the x265-devel
mailing list