[x265] [PATCH] asm-intra_pred_ang8_12: improved, 359.01c -> 259.03c over SSE4 asm code
chen
chenm003 at 163.com
Wed Mar 11 23:56:21 CET 2015
right
At 2015-03-11 17:41:30,praveen at multicorewareinc.com wrote:
># HG changeset patch
># User Praveen Tiwari <praveen at multicorewareinc.com>
># Date 1426066681 -19800
># Node ID 5125944d116f37240f785f426e9ec57d0bdc4404
># Parent 2819311e62415b3bec7dd915b74599d305fe5c9b
>asm-intra_pred_ang8_12: improved, 359.01c -> 259.03c over SSE4 asm code
>
>AVX2:
>intra_ang_8x8[12] 12.64x 259.03 3273.33
>
>SSE4:
>intra_ang_8x8[12] 9.31x 359.01 3341.37
>
>diff -r 2819311e6241 -r 5125944d116f source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp Wed Mar 11 14:13:22 2015 +0530
>+++ b/source/common/x86/asm-primitives.cpp Wed Mar 11 15:08:01 2015 +0530
>@@ -1501,6 +1501,7 @@
> 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[25] = x265_intra_pred_ang8_25_avx2;
>+ p.cu[BLOCK_8x8].intra_pred[12] = x265_intra_pred_ang8_12_avx2;
> p.cu[BLOCK_8x8].intra_pred[24] = x265_intra_pred_ang8_24_avx2;
>
> // copy_sp primitives
>diff -r 2819311e6241 -r 5125944d116f source/common/x86/intrapred.h
>--- a/source/common/x86/intrapred.h Wed Mar 11 14:13:22 2015 +0530
>+++ b/source/common/x86/intrapred.h Wed Mar 11 15:08:01 2015 +0530
>@@ -179,6 +179,7 @@
> 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_25_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
>+void x265_intra_pred_ang8_12_avx2(pixel* dst, intptr_t dstStride, const pixel* srcPix, int dirMode, int bFilter);
> void x265_intra_pred_ang8_24_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 2819311e6241 -r 5125944d116f source/common/x86/intrapred8.asm
>--- a/source/common/x86/intrapred8.asm Wed Mar 11 14:13:22 2015 +0530
>+++ b/source/common/x86/intrapred8.asm Wed Mar 11 15:08:01 2015 +0530
>@@ -10323,6 +10323,55 @@
> movhps [r0 + r3], xm2
> RET
>
>+
>+INIT_YMM avx2
>+cglobal intra_pred_ang8_12, 3, 5, 5
>+ mova m3, [pw_1024]
>+ movu xm1, [r2 + 16]
>+ pinsrb xm1, [r2], 0
>+ pshufb xm1, [intra_pred_shuff_0_8]
>+ vinserti128 m0, m1, xm1, 1
>+
>+ lea r4, [c_ang8_mode_24]
>+ pmaddubsw m1, m0, [r4]
>+ pmulhrsw m1, m3
>+ pmaddubsw m2, m0, [r4 + mmsize]
>+ pmulhrsw m2, m3
>+ pmaddubsw m4, m0, [r4 + 2 * mmsize]
>+ pmulhrsw m4, m3
>+ pslldq xm0, 2
>+ pinsrb xm0, [r2 + 6], 0
>+ pinsrb xm0, [r2 + 0], 1
>+ vinserti128 m0, m0, xm0, 1
>+ 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_24, 3, 5, 5
> mova m3, [pw_1024]
>_______________________________________________
>x265-devel mailing list
>x265-devel at videolan.org
>https://mailman.videolan.org/listinfo/x265-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150312/bae01142/attachment.html>
More information about the x265-devel
mailing list