[x265] [PATCH] asm: intra_pred_ang4_18_sse2

dtyx265 at gmail.com dtyx265 at gmail.com
Sat Mar 28 04:46:34 CET 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427514280 25200
# Node ID 3d127036d0baf9cbf7e4448958b37db12ed0c877
# Parent  89f337fa1d295b161d4800cc28674c9d02d4c6a9
asm: intra_pred_ang4_18_sse2

This is backported from sse4 code and replaces c code.

64-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[18\]"
intra_ang_4x4[18]	7.28x 	 145.00   	 1056.31

32-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[18\]"
intra_ang_4x4[18]	5.05x 	 254.73   	 1285.70

diff -r 89f337fa1d29 -r 3d127036d0ba source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Mar 27 19:22:53 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Mar 27 20:44:40 2015 -0700
@@ -1212,6 +1212,7 @@
         p.cu[BLOCK_4x4].intra_pred[15] = x265_intra_pred_ang4_15_sse2;
         p.cu[BLOCK_4x4].intra_pred[16] = x265_intra_pred_ang4_16_sse2;
         p.cu[BLOCK_4x4].intra_pred[17] = x265_intra_pred_ang4_17_sse2;
+        p.cu[BLOCK_4x4].intra_pred[18] = x265_intra_pred_ang4_18_sse2;
         p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
 
         p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
diff -r 89f337fa1d29 -r 3d127036d0ba source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Fri Mar 27 19:22:53 2015 -0700
+++ b/source/common/x86/intrapred.h	Fri Mar 27 20:44:40 2015 -0700
@@ -63,6 +63,7 @@
 DECL_ANG(4, 15, sse2);
 DECL_ANG(4, 16, sse2);
 DECL_ANG(4, 17, sse2);
+DECL_ANG(4, 18, sse2);
 DECL_ANG(4, 26, sse2);
 
 DECL_ANG(4, 2, ssse3);
diff -r 89f337fa1d29 -r 3d127036d0ba source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Fri Mar 27 19:22:53 2015 -0700
+++ b/source/common/x86/intrapred8.asm	Fri Mar 27 20:44:40 2015 -0700
@@ -1751,6 +1751,24 @@
     mova        m7, [r3 + 10 * 16]  ; [24]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_18, 4,5,2
+    mov         r3d, [r2 + 8]
+    mov         r3b, byte [r2]
+    bswap       r3d
+    movd        m0, r3d
+
+    movd        m1, [r2 + 1]
+    punpckldq   m0, m1
+    lea         r3, [r1 * 3]
+    movd        [r0 + r3], m0
+    psrldq      m0, 1
+    movd        [r0 + r1 * 2], m0
+    psrldq      m0, 1
+    movd        [r0 + r1], m0
+    psrldq      m0, 1
+    movd        [r0], 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