[x265] [PATCH 5 of 7] asm: intra_pred_ang4_28 improved by ~38% over SSE4, 152.87c -> 94.98c
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Thu Apr 2 06:44:26 CEST 2015
# HG changeset patch
# User Praveen Tiwari <praveen at multicorewareinc.com>
# Date 1427888805 -19800
# Wed Apr 01 17:16:45 2015 +0530
# Node ID 3369c2892450268d0c4d55adcddba65e5be20887
# Parent aa58202ff26fd43f930a1b48cd1389af6c8bf31e
asm: intra_pred_ang4_28 improved by ~38% over SSE4, 152.87c -> 94.98c
diff -r aa58202ff26f -r 3369c2892450 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Wed Apr 01 17:06:42 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Wed Apr 01 17:16:45 2015 +0530
@@ -1607,6 +1607,7 @@
// intra_pred functions
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_8x8].intra_pred[3] = x265_intra_pred_ang8_3_avx2;
p.cu[BLOCK_8x8].intra_pred[33] = x265_intra_pred_ang8_33_avx2;
p.cu[BLOCK_8x8].intra_pred[4] = x265_intra_pred_ang8_4_avx2;
diff -r aa58202ff26f -r 3369c2892450 source/common/x86/intrapred.h
--- a/source/common/x86/intrapred.h Wed Apr 01 17:06:42 2015 +0530
+++ b/source/common/x86/intrapred.h Wed Apr 01 17:16:45 2015 +0530
@@ -175,6 +175,7 @@
#undef DECL_ANG
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_ang8_3_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
void x265_intra_pred_ang8_33_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
void x265_intra_pred_ang8_4_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
diff -r aa58202ff26f -r 3369c2892450 source/common/x86/intrapred8.asm
--- a/source/common/x86/intrapred8.asm Wed Apr 01 17:06:42 2015 +0530
+++ b/source/common/x86/intrapred8.asm Wed Apr 01 17:16:45 2015 +0530
@@ -514,6 +514,7 @@
intra_pred_shuff_0_4: times 4 db 0, 1, 1, 2, 2, 3, 3, 4
c_ang4_mode_27: db 30, 2, 30, 2, 30, 2, 30, 2, 28, 4, 28, 4, 28, 4, 28, 4, 26, 6, 26, 6, 26, 6, 26, 6, 24, 8, 24, 8, 24, 8, 24, 8
+c_ang4_mode_28: db 27, 5, 27, 5, 27, 5, 27, 5, 22, 10, 22, 10, 22, 10, 22, 10, 17, 15, 17, 15, 17, 15, 17, 15, 12, 20, 12, 20, 12, 20, 12, 20
ALIGN 32
;; (blkSize - 1 - x)
@@ -15490,3 +15491,19 @@
movd [r0], xm0
pextrd [r0 + r1], xm0, 1
RET
+
+INIT_YMM avx2
+cglobal intra_pred_ang4_28, 3, 3, 1
+ vbroadcasti128 m0, [r2 + 1]
+ pshufb m0, [intra_pred_shuff_0_4]
+ pmaddubsw m0, [c_ang4_mode_28]
+ 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