[x265] [PATCH 6 of 6] asm: intra_pred_ang4_3 improved by ~41% over SSE4

praveen at multicorewareinc.com praveen at multicorewareinc.com
Mon Apr 6 10:01:33 CEST 2015


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1428304631 -19800
#      Mon Apr 06 12:47:11 2015 +0530
# Node ID 12cb0ee60c930141fd338956b33420b2c99044fd
# Parent  604cc2d73e402b9ab3a3edc8ecc34c019239680b
asm: intra_pred_ang4_3 improved by ~41% over SSE4

AVX2:
intra_ang_4x4[ 3]       10.17x   97.09           987.20

SSE4:
intra_ang_4x4[ 3]       6.42x    167.16          1072.98

diff -r 604cc2d73e40 -r 12cb0ee60c93 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Mon Apr 06 12:31:17 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Mon Apr 06 12:47:11 2015 +0530
@@ -1701,6 +1701,7 @@
         p.weight_sp = x265_weight_sp_avx2;
 
         // intra_pred functions
+        p.cu[BLOCK_4x4].intra_pred[3] = x265_intra_pred_ang4_3_avx2;
         p.cu[BLOCK_4x4].intra_pred[4] = x265_intra_pred_ang4_4_avx2;
         p.cu[BLOCK_4x4].intra_pred[5] = x265_intra_pred_ang4_5_avx2;
         p.cu[BLOCK_4x4].intra_pred[6] = x265_intra_pred_ang4_6_avx2;
diff -r 604cc2d73e40 -r 12cb0ee60c93 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Mon Apr 06 12:31:17 2015 +0530
+++ b/source/common/x86/intrapred.h	Mon Apr 06 12:47:11 2015 +0530
@@ -187,6 +187,7 @@
 DECL_ANG(32, 33, sse4);
 
 #undef DECL_ANG
+void x265_intra_pred_ang4_3_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_4_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_5_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_6_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
diff -r 604cc2d73e40 -r 12cb0ee60c93 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Mon Apr 06 12:31:17 2015 +0530
+++ b/source/common/x86/intrapred8.asm	Mon Apr 06 12:47:11 2015 +0530
@@ -515,6 +515,7 @@
 intra_pred4_shuff2:      db 0, 1, 1, 2, 2, 3, 3, 4, 0, 1, 1, 2, 2, 3, 3, 4, 1, 2, 2, 3, 3, 4, 4, 5, 1, 2, 2, 3, 3, 4, 4, 5
 intra_pred4_shuff31:     db 0, 1, 1, 2, 2, 3, 3, 4, 1, 2, 2, 3, 3, 4, 4, 5, 1, 2, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 5, 6
 intra_pred4_shuff33:     db 0, 1, 1, 2, 2, 3, 3, 4, 1, 2, 2, 3, 3, 4, 4, 5, 2, 3, 3, 4, 4, 5, 5, 6, 3, 4, 4, 5, 5, 6, 6, 7
+intra_pred4_shuff3:      db 8, 9, 9, 10, 10, 11, 11, 12, 9, 10, 10, 11, 11, 12, 12, 13, 10, 11, 11, 12, 12, 13, 13, 14, 11, 12, 12, 13, 13, 14, 14, 15
 intra_pred4_shuff4:      db 9, 10, 10, 11, 11, 12, 12, 13, 10, 11, 11, 12, 12, 13, 13, 14, 10, 11, 11, 12, 12, 13, 13, 14, 11, 12, 12, 13, 13, 14, 14, 15
 intra_pred4_shuff5:      db 9, 10, 10, 11, 11, 12, 12, 13, 10, 11, 11, 12, 12, 13, 13, 14, 10, 11, 11, 12, 12, 13, 13, 14, 11, 12, 12, 13, 13, 14, 14, 15
 intra_pred4_shuff6:      db 9, 10, 10, 11, 11, 12, 12, 13, 9, 10, 10, 11, 11, 12, 12, 13, 10, 11, 11, 12, 12, 13, 13, 14, 10, 11, 11, 12, 12, 13, 13, 14
@@ -16099,6 +16100,18 @@
     INTRA_PRED_STORE_4x4
     RET
 
+
+INIT_YMM avx2
+cglobal intra_pred_ang4_3, 3, 3, 1
+    vbroadcasti128    m0, [r2 + 1]
+    pshufb            m0, [intra_pred4_shuff3]
+    pmaddubsw         m0, [c_ang4_mode_33]
+    pmulhrsw          m0, [pw_1024]
+    packuswb          m0, m0
+
+    INTRA_PRED_TRANS_STORE_4x4
+    RET
+
 INIT_YMM avx2
 cglobal intra_pred_ang4_4, 3, 3, 1
     vbroadcasti128    m0, [r2]


More information about the x265-devel mailing list