[x265] [PATCH 03 of 11] asm: intra_pred_ang4_11_sse2

dtyx265 at gmail.com dtyx265 at gmail.com
Sat Mar 28 03:42:43 CET 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1427505657 25200
# Node ID 4314cdf34f36c7a7fc3a4b3e744cd05c6ab90352
# Parent  c5fa8f49bf15818007fe6ab25eb6aec65bb203cb
asm: intra_pred_ang4_11_sse2

This is backported from sse4 code and replaces c code.

64-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[11\]"
intra_ang_4x4[11]	3.19x 	 617.47   	 1968.37

32-bit

./test/TestBench --testbench intrapred | grep "intra_ang_4x4\[11\]"
intra_ang_4x4[11]	4.37x 	 694.98   	 3040.30

diff -r c5fa8f49bf15 -r 4314cdf34f36 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Mar 27 18:06:42 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Mar 27 18:20:57 2015 -0700
@@ -1205,6 +1205,7 @@
         p.cu[BLOCK_4x4].intra_pred[8] = x265_intra_pred_ang4_8_sse2;
         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[26] = x265_intra_pred_ang4_26_sse2;
 
         p.cu[BLOCK_4x4].calcresidual = x265_getResidual4_sse2;
diff -r c5fa8f49bf15 -r 4314cdf34f36 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Fri Mar 27 18:06:42 2015 -0700
+++ b/source/common/x86/intrapred.h	Fri Mar 27 18:20:57 2015 -0700
@@ -56,6 +56,7 @@
 DECL_ANG(4, 8, sse2);
 DECL_ANG(4, 9, sse2);
 DECL_ANG(4, 10, sse2);
+DECL_ANG(4, 11, sse2);
 DECL_ANG(4, 26, sse2);
 
 DECL_ANG(4, 2, ssse3);
diff -r c5fa8f49bf15 -r 4314cdf34f36 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Fri Mar 27 18:06:42 2015 -0700
+++ b/source/common/x86/intrapred8.asm	Fri Mar 27 18:20:57 2015 -0700
@@ -1552,6 +1552,28 @@
 .quit:
     RET
 
+cglobal intra_pred_ang4_11, 4,5,8
+    xor         r4d, r4d
+    cmp         r3m, byte 25
+    mov         r3d, 8
+    cmove       r3d, r4d
+
+    movd        m1, [r2 + r3 + 1]       ;[4 3 2 1]
+    movh        m0, [r2 - 7]            ;[A x x x x x x x]
+    punpcklbw   m1, m1                  ;[4 4 3 3 2 2 1 1]
+    punpcklqdq  m0, m1                  ;[4 4 3 3 2 2 1 1 A x x x x x x x]]
+    psrldq      m0, 7                   ;[x x x x x x x x 4 3 3 2 2 1 1 A]
+    punpcklqdq  m0, m0
+    mova        m2, m0
+
+    lea         r3, [pw_ang_table + 24 * 16]
+
+    mova        m4, [r3 +  6 * 16]  ; [24]
+    mova        m5, [r3 +  4 * 16]  ; [26]
+    mova        m6, [r3 +  2 * 16]  ; [28]
+    mova        m7, [r3 +  0 * 16]  ; [30]
+    jmp         mangle(private_prefix %+ _ %+ intra_pred_ang4_3 %+ SUFFIX %+ .do_filter4x4)
+
 ;---------------------------------------------------------------------------------------------
 ; void intra_pred_dc(pixel* dst, intptr_t dstStride, pixel *srcPix, int dirMode, int bFilter)
 ;---------------------------------------------------------------------------------------------


More information about the x265-devel mailing list