[x265] [PATCH 1 of 8] asm:intra_pred_ang4_2_sse2
dtyx265 at gmail.com
dtyx265 at gmail.com
Mon Mar 23 21:30:29 CET 2015
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427138798 25200
# Node ID 5ddfa3f9d2af9272d7c30f18014ad3dacc35cb9b
# Parent cc496665280f9e9e4776327e9a1cc1b2eeffecbc
asm:intra_pred_ang4_2_sse2
This is backported from sse4 code and replaces c code.
64-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[ 2\]"
intra_ang_4x4[ 2] 8.86x 134.98 1195.68
32-bit
./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[ 2\]"
intra_ang_4x4[ 2] 9.23x 222.48 2053.30
diff -r cc496665280f -r 5ddfa3f9d2af source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Sun Mar 22 22:16:45 2015 -0400
+++ b/source/common/x86/asm-primitives.cpp Mon Mar 23 12:26:38 2015 -0700
@@ -1196,6 +1196,8 @@
p.cu[BLOCK_16x16].intra_pred[PLANAR_IDX] = x265_intra_pred_planar16_sse2;
p.cu[BLOCK_32x32].intra_pred[PLANAR_IDX] = x265_intra_pred_planar32_sse2;
+ p.cu[BLOCK_4x4].intra_pred[2] = x265_intra_pred_ang4_2_sse2;
+
p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
p.cu[BLOCK_8x8].calcresidual = x265_getResidual8_sse2;
diff -r cc496665280f -r 5ddfa3f9d2af source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h Sun Mar 22 22:16:45 2015 -0400
+++ b/source/common/x86/intrapred.h Mon Mar 23 12:26:38 2015 -0700
@@ -47,6 +47,8 @@
#define DECL_ANG(bsize, mode, cpu) \
void x265_intra_pred_ang ## bsize ## _ ## mode ## _ ## cpu(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
+DECL_ANG(4, 2, sse2);
+
DECL_ANG(4, 2, ssse3);
DECL_ANG(4, 3, sse4);
DECL_ANG(4, 4, sse4);
diff -r cc496665280f -r 5ddfa3f9d2af source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm Sun Mar 22 22:16:45 2015 -0400
+++ b/source/common/x86/intrapred8.asm Mon Mar 23 12:26:38 2015 -0700
@@ -1109,6 +1109,29 @@
%endif ; end ARCH_X86_32
+;-----------------------------------------------------------------------------------------
+; void intraPredAng4(pixel* dst, intptr_t dstStride, pixel* src, int dirMode, int bFilter)
+;-----------------------------------------------------------------------------------------
+INIT_XMM sse2
+cglobal intra_pred_ang4_2, 3,5,3
+ lea r4, [r2 + 2]
+ add r2, 10
+ cmp r3m, byte 34
+ cmove r2, r4
+
+ movh m0, [r2]
+ movd [r0], m0
+ mova m1, m0
+ psrldq m1, 1
+ movd [r0 + r1], m1
+ mova m2, m0
+ psrldq m2, 2
+ movd [r0 + r1 * 2], m2
+ lea r1, [r1 * 3]
+ psrldq m0, 3
+ movd [r0 + r1], m0
+ RET
+
;---------------------------------------------------------------------------------------------
; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
;---------------------------------------------------------------------------------------------
More information about the x265-devel
mailing list