[x265] [PATCH 04 of 18] asm: intra_pred_ang4_5_sse2 16-bit

dtyx265 at gmail.com dtyx265 at gmail.com
Fri Apr 3 18:24:35 CEST 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1428074885 25200
# Node ID abf5013139d97d61474411ec81738b536051f185
# Parent  77b312333ce12f2a0f62ed06719d80b44e31fbc6
asm: intra_pred_ang4_5_sse2 16-bit

This is backported from sse4 code and replaces c code.

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[ 5\]"
intra_ang_4x4[ 5]	4.10x 	 497.50   	 2037.46

transposed mode

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[31\]"
intra_ang_4x4[31]	3.82x 	 394.97   	 1510.36

diff -r 77b312333ce1 -r abf5013139d9 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 03 08:24:22 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 03 08:28:05 2015 -0700
@@ -885,6 +885,8 @@
         p.cu[BLOCK_4x4].intra_pred[2] = x265_intra_pred_ang4_2_sse2;
         p.cu[BLOCK_4x4].intra_pred[3] = x265_intra_pred_ang4_3_sse2;
         p.cu[BLOCK_4x4].intra_pred[4] = x265_intra_pred_ang4_4_sse2;
+        p.cu[BLOCK_4x4].intra_pred[5] = x265_intra_pred_ang4_5_sse2;
+        p.cu[BLOCK_4x4].intra_pred[31] = x265_intra_pred_ang4_5_sse2;
         p.cu[BLOCK_4x4].intra_pred[32] = x265_intra_pred_ang4_4_sse2;
         p.cu[BLOCK_4x4].intra_pred[33] = x265_intra_pred_ang4_3_sse2;
 
diff -r 77b312333ce1 -r abf5013139d9 source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Fri Apr 03 08:24:22 2015 -0700
+++ b/source/common/x86/intrapred16.asm	Fri Apr 03 08:28:05 2015 -0700
@@ -804,6 +804,31 @@
     mova        m7, [r3 +  2 * 16]  ; [20]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_5, 3,5,8
+    mov         r4d, 2
+    cmp         r3m, byte 31
+    mov         r3d, 18
+    cmove       r3d, r4d
+
+    movu        m0, [r2 + r3]   ; [8 7 6 5 4 3 2 1]
+    mova        m2, m0
+    psrldq      m0, 2
+    punpcklwd   m2, m0      ; [5 4 4 3 3 2 2 1]
+    mova        m3, m0
+    psrldq      m0, 2
+    punpcklwd   m3, m0      ; [6 5 5 4 4 3 3 2]
+    mova        m4, m3
+    mova        m5, m0
+    psrldq      m0, 2
+    punpcklwd   m5, m0      ; [7 6 6 5 5 4 4 3]
+
+    lea         r3, [ang_table + 10 * 16]
+    mova        m0, [r3 +  7 * 16]  ; [17]
+    mova        m1, [r3 -  8 * 16]  ; [ 2]
+    mova        m6, [r3 +  9 * 16]  ; [19]
+    mova        m7, [r3 -  6 * 16]  ; [ 4]
+    jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
+
 ;-----------------------------------------------------------------------------------
 ; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel* above, int, int filter)
 ;-----------------------------------------------------------------------------------


More information about the x265-devel mailing list