[x265] [PATCH 15 of 18] asm: intra_pred_ang4_15_sse2 16-bit

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1428077130 25200
# Node ID 9ec19f6d4e3aeb7ae686626438158aa6d67c2cea
# Parent  8dbdcc01c0afd466b7c7ef1a5b9b67e246c0c77a
asm: intra_pred_ang4_15_sse2 16-bit

This is backported from sse4 code and replaces c code.

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[15\]"
intra_ang_4x4[15]	4.12x 	 502.63   	 2073.01

transposed mode

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[21\]"
intra_ang_4x4[21]	3.80x 	 425.10   	 1616.30

diff -r 8dbdcc01c0af -r 9ec19f6d4e3a source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 03 09:02:38 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 03 09:05:30 2015 -0700
@@ -895,6 +895,8 @@
         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[14] = x265_intra_pred_ang4_14_sse2;
+        p.cu[BLOCK_4x4].intra_pred[15] = x265_intra_pred_ang4_15_sse2;
+        p.cu[BLOCK_4x4].intra_pred[21] = x265_intra_pred_ang4_15_sse2;
         p.cu[BLOCK_4x4].intra_pred[22] = x265_intra_pred_ang4_14_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;
diff -r 8dbdcc01c0af -r 9ec19f6d4e3a source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Fri Apr 03 09:02:38 2015 -0700
+++ b/source/common/x86/intrapred16.asm	Fri Apr 03 09:05:30 2015 -0700
@@ -1080,6 +1080,37 @@
     mova        m7, [r3 -  7 * 16]  ; [12]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_15, 3,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 21
+    mov         r3d, 16
+    jz          .next
+    xchg        r3d, r4d
+.next:
+    movd        m4, [r2]                ;[x x x A]
+    movh        m5, [r2 + r3 + 4]       ;[x C x B]
+    movh        m0, [r2 + r4 + 2]       ;[4 3 2 1]
+    pshuflw     m5, m5, 0x22            ;[B C B C]
+    punpcklqdq  m5, m4                  ;[x x x A B C B C]
+    psrldq      m5, 2                   ;[x x x x A B C B]
+    punpcklqdq  m5, m0
+    psrldq      m5, 2
+    mova        m2, m5
+    mova        m3, m5
+    psrldq      m2, 4
+    psrldq      m3, 2
+    punpcklwd   m5, m3          ; [2 1 1 0 0 x x y]
+    punpcklwd   m3, m2          ; [3 2 2 1 1 0 0 x]
+    punpcklwd   m2, m0          ; [4 3 3 2 2 1 1 0]
+    mova        m4, m3
+
+    lea         r3, [ang_table + 23 * 16]
+    mova        m0, [r3 -  8 * 16]  ; [15]
+    mova        m1, [r3 +  7 * 16]  ; [30]
+    mova        m6, [r3 - 10 * 16]  ; [13]
+    mova        m7, [r3 +  5 * 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