[x265] [PATCH 17 of 18] asm: intra_pred_ang4_17_sse2 16-bit

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1428078042 25200
# Node ID e4b343abfa73af9b68f26283a9e75e161860d7b2
# Parent  97e3406e46539aefb8e1568fb49c452a63554887
asm: intra_pred_ang4_17_sse2 16-bit

This is backported from sse4 code and replaces c code.

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[17\]"
intra_ang_4x4[17]	3.80x 	 580.18   	 2202.73

transposed mode

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[19\]"
intra_ang_4x4[19]	3.39x 	 512.79   	 1735.90

diff -r 97e3406e4653 -r e4b343abfa73 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 03 09:09:04 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 03 09:20:42 2015 -0700
@@ -897,6 +897,8 @@
         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[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[19] = x265_intra_pred_ang4_17_sse2;
         p.cu[BLOCK_4x4].intra_pred[20] = x265_intra_pred_ang4_16_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;
diff -r 97e3406e4653 -r e4b343abfa73 source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Fri Apr 03 09:09:04 2015 -0700
+++ b/source/common/x86/intrapred16.asm	Fri Apr 03 09:20:42 2015 -0700
@@ -1141,6 +1141,40 @@
     mova        m7, [r3 -  7 * 16]  ; [12]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_17, 3,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 19
+    mov         r3d, 16
+    jz          .next
+    xchg        r3d, r4d
+.next:
+    movd        m4, [r2]
+    movh        m5, [r2 + r3 + 2]       ;[D x C B]
+    pshuflw     m5, m5, 0x1F            ;[B C D D]
+    punpcklqdq  m5, m4                  ;[x x x A B C D D]
+    psrldq      m5, 2                   ;[x x x x A B C D]
+    movhps      m5, [r2 + r4 + 2]
+
+    mova        m4, m5
+    psrldq      m4, 2
+    punpcklwd   m5, m4
+    mova        m3, m4
+    psrldq      m3, 2
+    punpcklwd   m4, m3
+    mova        m2, m3
+    psrldq      m2, 2
+    punpcklwd   m3, m2
+    mova        m1, m2
+    psrldq      m1, 2
+    punpcklwd   m2, m1
+
+    lea         r3, [ang_table + 14 * 16]
+    mova        m0, [r3 -  8 * 16]  ; [ 6]
+    mova        m1, [r3 -  2 * 16]  ; [12]
+    mova        m6, [r3 +  4 * 16]  ; [18]
+    mova        m7, [r3 + 10 * 16]  ; [24]
+    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