[x265] [PATCH 13 of 18] asm: intra_pred_ang4_13_sse2 16-bit

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1428076807 25200
# Node ID 57f635c8bd62590c95d6d0ad1a20ce5270639038
# Parent  b0e5af8de87a8b1db1c7e2f71abb5246124df8e0
asm: intra_pred_ang4_13_sse2 16-bit

This is backported from sse4 code and replaces c code.

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[13\]"
intra_ang_4x4[13]	4.11x 	 525.09   	 2155.55

transposed mode

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[23\]"
intra_ang_4x4[23]	3.53x 	 460.18   	 1623.95

diff -r b0e5af8de87a -r 57f635c8bd62 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 03 08:56:27 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 03 09:00:07 2015 -0700
@@ -893,6 +893,8 @@
         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[12] = x265_intra_pred_ang4_12_sse2;
+        p.cu[BLOCK_4x4].intra_pred[13] = x265_intra_pred_ang4_13_sse2;
+        p.cu[BLOCK_4x4].intra_pred[23] = x265_intra_pred_ang4_13_sse2;
         p.cu[BLOCK_4x4].intra_pred[24] = x265_intra_pred_ang4_12_sse2;
         p.cu[BLOCK_4x4].intra_pred[25] = x265_intra_pred_ang4_11_sse2;
         p.cu[BLOCK_4x4].intra_pred[26] = x265_intra_pred_ang4_26_sse2;
diff -r b0e5af8de87a -r 57f635c8bd62 source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Fri Apr 03 08:56:27 2015 -0700
+++ b/source/common/x86/intrapred16.asm	Fri Apr 03 09:00:07 2015 -0700
@@ -1026,6 +1026,33 @@
     mova        m7, [r3 -  8 * 16]  ; [12]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_13, 3,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 23
+    mov         r3d, 16
+    jz          .next
+    xchg        r3d, r4d
+.next:
+    movd        m5, [r2 + r3 + 6]
+    movd        m2, [r2 - 2]
+    movh        m0, [r2 + r4 + 2]
+    punpcklwd   m5, m2
+    punpcklqdq  m5, m0
+    psrldq      m5, 4
+    mova        m2, m5
+    psrldq      m2, 2
+    punpcklwd   m5, m2          ; [3 2 2 1 1 0 0 x]
+    punpcklwd   m2, m0          ; [4 3 3 2 2 1 1 0]
+    mova        m3, m2
+    mova        m4, m2
+
+    lea         r3, [ang_table + 21 * 16]
+    mova        m0, [r3 +  2 * 16]  ; [23]
+    mova        m1, [r3 -  7 * 16]  ; [14]
+    mova        m6, [r3 - 16 * 16]  ; [ 5]
+    mova        m7, [r3 +  7 * 16]  ; [28]
+    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