[x265] [PATCH 05 of 11] asm: intra_pred_ang4_25 improved ~37% over SSE4

praveen at multicorewareinc.com praveen at multicorewareinc.com
Thu Apr 2 12:49:39 CEST 2015


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1427954980 -19800
#      Thu Apr 02 11:39:40 2015 +0530
# Node ID 48455a4b18c1ab88b7da28764b7ec94586337e5b
# Parent  ee8d89f8caec8b9937b486a02bbb991636e6774f
asm: intra_pred_ang4_25 improved ~37% over SSE4

AVX2:
intra_ang_4x4[25]       9.39x    93.98           882.65

SSE4:
intra_ang_4x4[25]       5.89x    148.20          873.53

diff -r ee8d89f8caec -r 48455a4b18c1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Apr 02 11:27:14 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Thu Apr 02 11:39:40 2015 +0530
@@ -1607,6 +1607,7 @@
 
         // intra_pred functions
         p.cu[BLOCK_4x4].intra_pred[24] = x265_intra_pred_ang4_24_avx2;
+        p.cu[BLOCK_4x4].intra_pred[25] = x265_intra_pred_ang4_25_avx2;
         p.cu[BLOCK_4x4].intra_pred[27] = x265_intra_pred_ang4_27_avx2;
         p.cu[BLOCK_4x4].intra_pred[28] = x265_intra_pred_ang4_28_avx2;
         p.cu[BLOCK_4x4].intra_pred[29] = x265_intra_pred_ang4_29_avx2;
diff -r ee8d89f8caec -r 48455a4b18c1 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Thu Apr 02 11:27:14 2015 +0530
+++ b/source/common/x86/intrapred.h	Thu Apr 02 11:39:40 2015 +0530
@@ -175,6 +175,7 @@
 
 #undef DECL_ANG
 void x265_intra_pred_ang4_24_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
+void x265_intra_pred_ang4_25_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_27_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_28_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang4_29_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
diff -r ee8d89f8caec -r 48455a4b18c1 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Thu Apr 02 11:27:14 2015 +0530
+++ b/source/common/x86/intrapred8.asm	Thu Apr 02 11:39:40 2015 +0530
@@ -525,6 +525,7 @@
 c_ang4_mode_32:          db 11, 21, 11, 21, 11, 21, 11, 21, 22, 10, 22, 10, 22, 10, 22, 10, 1, 31, 1, 31, 1, 31, 1, 31, 12, 20, 12, 20, 12, 20, 12, 20
 c_ang4_mode_33:          db 6, 26, 6, 26, 6, 26, 6, 26, 12, 20, 12, 20, 12, 20, 12, 20, 18, 14, 18, 14, 18, 14, 18, 14, 24, 8, 24, 8, 24, 8, 24, 8
 c_ang4_mode_24:          db 5, 27, 5, 27, 5, 27, 5, 27, 10, 22, 10, 22, 10, 22, 10, 22, 15, 17, 15, 17, 15, 17, 15, 17, 20, 12, 20, 12, 20, 12, 20, 12
+c_ang4_mode_25:          db 2, 30, 2, 30, 2, 30, 2, 30, 4, 28, 4, 28, 4, 28, 4, 28, 6, 26, 6, 26, 6, 26, 6, 26, 8, 24, 8, 24, 8, 24, 8, 24
 
 ALIGN 32
 ;; (blkSize - 1 - x)
@@ -15613,3 +15614,19 @@
     movd              [r0], xm0
     pextrd            [r0 + r1], xm0, 1
     RET
+
+INIT_YMM avx2
+cglobal intra_pred_ang4_25, 3, 3, 1
+    vbroadcasti128    m0, [r2]
+    pshufb            m0, [intra_pred_shuff_0_4]
+    pmaddubsw         m0, [c_ang4_mode_25]
+    pmulhrsw          m0, [pw_1024]
+    packuswb          m0, m0
+
+    movd              [r0], xm0
+    pextrd            [r0 + r1], xm0, 1
+    vextracti128      xm0, m0, 1
+    lea               r0, [r0 + 2 * r1]
+    movd              [r0], xm0
+    pextrd            [r0 + r1], xm0, 1
+    RET


More information about the x265-devel mailing list