[x265] [PATCH 12 of 18] asm: intra_pred_ang4_12_sse2 16-bit

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1428076587 25200
# Node ID b0e5af8de87a8b1db1c7e2f71abb5246124df8e0
# Parent  dfcd48ac5d09a2a0615d5657328457b08ce12e0e
asm: intra_pred_ang4_12_sse2 16-bit

This is backported from sse4 code and replaces c code.

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[12\]"
intra_ang_4x4[12]	4.40x 	 462.50   	 2032.77

transposed mode

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[24\]"
intra_ang_4x4[24]	3.76x 	 402.72   	 1514.26

diff -r dfcd48ac5d09 -r b0e5af8de87a source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 03 08:53:42 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 03 08:56:27 2015 -0700
@@ -892,6 +892,8 @@
         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[12] = x265_intra_pred_ang4_12_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;
         p.cu[BLOCK_4x4].intra_pred[27] = x265_intra_pred_ang4_9_sse2;
diff -r dfcd48ac5d09 -r b0e5af8de87a source/common/x86/intrapred16.asm
--- a/source/common/x86/intrapred16.asm	Fri Apr 03 08:53:42 2015 -0700
+++ b/source/common/x86/intrapred16.asm	Fri Apr 03 08:56:27 2015 -0700
@@ -1004,6 +1004,28 @@
     mova        m7, [r3 +  0 * 16]  ; [30]
     jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
 
+cglobal intra_pred_ang4_12, 3,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 24
+    mov         r3d, 16
+    cmove       r3d, r4d
+
+    movh        m1, [r2 + r3 + 2]
+    movh        m2, [r2 - 6]
+    punpcklqdq  m2, m1
+    psrldq      m2, 6
+    punpcklwd   m2, m1          ; [4 3 3 2 2 1 1 0]
+    mova        m3, m2
+    mova        m4, m2
+    mova        m5, m2
+
+    lea         r3, [ang_table + 20 * 16]
+    mova        m0, [r3 +  7 * 16]  ; [27]
+    mova        m1, [r3 +  2 * 16]  ; [22]
+    mova        m6, [r3 -  3 * 16]  ; [17]
+    mova        m7, [r3 -  8 * 16]  ; [12]
+    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