[x265] [PATCH 09 of 11] asm: intra_pred_ang4_18_sse2

dtyx265 at gmail.com dtyx265 at gmail.com
Wed Apr 1 23:14:30 CEST 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427918073 25200
# Node ID 5157f2f456c3e52c2a89339d8ba05999e1745335
# Parent  2b11cafa932a76445e02563b6eaf812c1475fc2e
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]	6.97x 	 145.00   	 1010.59

32-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[18\]"
intra_ang_4x4[18]	5.01x 	 252.45   	 1265.97

diff -r 2b11cafa932a -r 5157f2f456c3 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Apr 01 12:48:28 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Wed Apr 01 12:54:33 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 2b11cafa932a -r 5157f2f456c3 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Wed Apr 01 12:48:28 2015 -0700
+++ b/source/common/x86/intrapred.h	Wed Apr 01 12:54:33 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 2b11cafa932a -r 5157f2f456c3 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Wed Apr 01 12:48:28 2015 -0700
+++ b/source/common/x86/intrapred8.asm	Wed Apr 01 12:54:33 2015 -0700
@@ -1812,6 +1812,24 @@
     mova        m7, [r3 + 10 * 16]  ; [24]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_18, 3,4,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