[x265] [PATCH 02 of 11] asm: intra_pred_ang4_11_sse2

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427916156 25200
# Node ID 02879e6629a89c9831ed88ed18e6d437b2363bfc
# Parent  56f0339269c10d6a96ff95ab0ead60e7e6dd895b
asm: intra_pred_ang4_11_sse2

This is backported from sse4 code and replaces c code.

64-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[11\]"
intra_ang_4x4[11]	3.54x 	 562.48   	 1990.89

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[11\]"
intra_ang_4x4[11]	4.64x 	 635.00   	 2943.84

diff -r 56f0339269c1 -r 02879e6629a8 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Wed Apr 01 12:17:25 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Wed Apr 01 12:22:36 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[11] = x265_intra_pred_ang4_11_sse2;
         p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
 
         p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
diff -r 56f0339269c1 -r 02879e6629a8 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Wed Apr 01 12:17:25 2015 -0700
+++ b/source/common/x86/intrapred.h	Wed Apr 01 12:22:36 2015 -0700
@@ -56,6 +56,7 @@
 DECL_ANG(4, 8, sse2);
 DECL_ANG(4, 9, sse2);
 DECL_ANG(4, 10, sse2);
+DECL_ANG(4, 11, sse2);
 DECL_ANG(4, 26, sse2);
 
 DECL_ANG(4, 2, ssse3);
diff -r 56f0339269c1 -r 02879e6629a8 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Wed Apr 01 12:17:25 2015 -0700
+++ b/source/common/x86/intrapred8.asm	Wed Apr 01 12:22:36 2015 -0700
@@ -1613,6 +1613,28 @@
 .quit:
     RET
 
+cglobal intra_pred_ang4_11, 3,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 25
+    mov         r3d, 8
+    cmove       r3d, r4d
+
+    movd        m1, [r2 + r3 + 1]       ;[4 3 2 1]
+    movh        m0, [r2 - 7]            ;[A x x x x x x x]
+    punpcklbw   m1, m1                  ;[4 4 3 3 2 2 1 1]
+    punpcklqdq  m0, m1                  ;[4 4 3 3 2 2 1 1 A x x x x x x x]]
+    psrldq      m0, 7                   ;[x x x x x x x x 4 3 3 2 2 1 1 A]
+    punpcklqdq  m0, m0
+    mova        m2, m0
+
+    lea         r3, [pw_ang_table + 24 * 16]
+
+    mova        m4, [r3 +  6 * 16]  ; [24]
+    mova        m5, [r3 +  4 * 16]  ; [26]
+    mova        m6, [r3 +  2 * 16]  ; [28]
+    mova        m7, [r3 +  0 * 16]  ; [30]
+    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