[x265] [PATCH] asm-avx2: intra_pred_ang8_11, (51.84x)

praveen at multicorewareinc.com praveen at multicorewareinc.com
Fri Mar 6 08:50:38 CET 2015


# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1425628229 -19800
# Node ID 25b01a20389e8e4297e004d500871263ca349d15
# Parent  b48efcbe1b196593d572dbbd4dd220f215f97321
asm-avx2: intra_pred_ang8_11, (51.84x)

intra_ang_8x8[11]       51.84x   295.15          15301.57

diff -r b48efcbe1b19 -r 25b01a20389e source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Mar 06 11:43:53 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Fri Mar 06 13:20:29 2015 +0530
@@ -1512,6 +1512,7 @@
         p.cu[BLOCK_8x8].intra_pred[28] = x265_intra_pred_ang8_28_avx2;
         p.cu[BLOCK_8x8].intra_pred[9] = x265_intra_pred_ang8_9_avx2;
         p.cu[BLOCK_8x8].intra_pred[27] = x265_intra_pred_ang8_27_avx2;
+        p.cu[BLOCK_8x8].intra_pred[11] = x265_intra_pred_ang8_11_avx2;
         p.cu[BLOCK_8x8].intra_pred[25] = x265_intra_pred_ang8_25_avx2;
 
         // copy_sp primitives
diff -r b48efcbe1b19 -r 25b01a20389e source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h	Fri Mar 06 11:43:53 2015 +0530
+++ b/source/common/x86/intrapred.h	Fri Mar 06 13:20:29 2015 +0530
@@ -175,6 +175,7 @@
 void x265_intra_pred_ang8_28_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang8_9_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang8_27_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
+void x265_intra_pred_ang8_11_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_intra_pred_ang8_25_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
 void x265_all_angs_pred_4x4_sse4(pixel *dest, pixel *refPix, pixel *filtPix, int bLuma);
 void x265_all_angs_pred_8x8_sse4(pixel *dest, pixel *refPix, pixel *filtPix, int bLuma);
diff -r b48efcbe1b19 -r 25b01a20389e source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm	Fri Mar 06 11:43:53 2015 +0530
+++ b/source/common/x86/intrapred8.asm	Fri Mar 06 13:20:29 2015 +0530
@@ -33065,6 +33065,53 @@
     movhps            [r0 + r3], xm2
     RET
 
+
+INIT_YMM avx2
+cglobal intra_pred_ang8_11, 3, 5, 6
+    mova              m3, [pw_1024]
+    movu              xm1, [r2 + 16]
+    pinsrb            xm1, [r2], 0
+    vinserti128       m0, m1, xm1, 1
+
+    movu              m5, [c_ang8_src1_9_1_9]
+    pshufb            m0, m5
+
+    lea               r4, [c_ang8_mode_25]
+    pmaddubsw         m1, m0, [r4]
+    pmulhrsw          m1, m3
+    pmaddubsw         m2, m0, [r4 + mmsize]
+    pmulhrsw          m2, m3
+    pmaddubsw         m4, m0, [r4 + 2 * mmsize]
+    pmulhrsw          m4, m3
+    pmaddubsw         m0, [r4 + 3 * mmsize]
+    pmulhrsw          m0, m3
+    packuswb          m1, m2
+    packuswb          m4, m0
+
+    vperm2i128        m2, m1, m4, 00100000b
+    vperm2i128        m1, m1, m4, 00110001b
+    punpcklbw         m4, m2, m1
+    punpckhbw         m2, m1
+    punpcklwd         m1, m4, m2
+    punpckhwd         m4, m2
+    mova              m0, [trans8_shuf]
+    vpermd            m1, m0, m1
+    vpermd            m4, m0, m4
+
+    lea               r3, [3 * r1]
+    movq              [r0], xm1
+    movhps            [r0 + r1], xm1
+    vextracti128      xm2, m1, 1
+    movq              [r0 + 2 * r1], xm2
+    movhps            [r0 + r3], xm2
+    lea               r0, [r0 + 4 * r1]
+    movq              [r0], xm4
+    movhps            [r0 + r1], xm4
+    vextracti128      xm2, m4, 1
+    movq              [r0 + 2 * r1], xm2
+    movhps            [r0 + r3], xm2
+    RET
+
 INIT_YMM avx2
 cglobal intra_pred_ang8_25, 3, 5, 6
     mova              m3, [pw_1024]


More information about the x265-devel mailing list