[x265] [PATCH Review Only] chroma_hpp[4x4] for color space i420 in avx2
chen
chenm003 at 163.com
Mon Dec 1 22:45:04 CET 2014
At 2014-12-01 19:14:39,aasaipriya at multicorewareinc.com wrote:
># HG changeset patch
># User Aasaipriya Chandran aasaipriya at multicorewareinc.com>
># Date 1417432404 -19800
># Mon Dec 01 16:43:24 2014 +0530
># Node ID 909d343d68b3b0e34a1239085cf6acc4f2ad2f38
># Parent ce4394109ae51c377593164d956f6e44b8f0d3df
>chroma_hpp[4x4] for color space i420 in avx2
>
diff -r ce4394109ae5 -r 909d343d68b3 source/common/x86/ipfilter8.asm
>--- a/source/common/x86/ipfilter8.asm Wed Nov 26 11:53:40 2014 +0530
>+++ b/source/common/x86/ipfilter8.asm Mon Dec 01 16:43:24 2014 +0530
>@@ -1195,6 +1195,60 @@
> jnz .loop
> RET
>
>+
>+INIT_YMM avx2
>+cglobal interp_4tap_horiz_pp_4x4, 4,6,6
>+ mov r4d, r4m
>+
>+%ifdef PIC
>+ lea r5, [tab_ChromaCoeff]
>+ vpbroadcastd m0, [r5 + r4 * 4]
>+%else
>+ vpbroadcastd m0, [tab_ChromaCoeff + r4 * 4]
>+%endif
>+
>+ movu m1, [tab_Tm]
>+ vpbroadcastd m2, [pw_1]
>+
>+ ; register map
>+ ; m0 - interpolate coeff
>+ ; m1 - shuffle order table
>+ ; m2 - constant word 1
>+
>+ sub r0, 1
>+ ; Row 0-1
>+ vbroadcasti128 m3, [r0] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
>+ pshufb m3, m1
>+ vbroadcasti128 m4, [r0 + r1] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
>+ pshufb m4, m1
>+ vperm2f128 m3, m3, m4, 00100000b
vperm2i128 for integer, and the algorithm is lower performance, above instruction can reduce by vinseri128
>+ pmaddubsw m3, m0
>+ pmaddwd m3, m2
>+
>+ ; Row 2-3
>+ lea r0, [r0 + r1 * 2]
>+ vbroadcasti128 m4, [r0] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
>+ pshufb m4, m1
>+ vbroadcasti128 m5, [r0 + r1] ; [x x x x x A 9 8 7 6 5 4 3 2 1 0]
>+ pshufb m5, m1
>+ vperm2f128 m4, m4, m5, 00100000b
>+ pmaddubsw m4, m0
>+ pmaddwd m4, m2
>+
>+ packssdw m3, m4
>+ pmulhrsw m3, [pw_512]
>+ vextracti128 xm4, m3, 1
>+ packuswb xm3, xm4
>+
>+ lea r0, [r3 * 3]
>+ movd [r2], xm3
>+ pextrd [r2+r3], xm3, 2
>+ pextrd [r2+r3*2], xm3, 1
>+ pextrd [r2+r0], xm3, 3
>+ RET
>+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20141202/02af39d9/attachment.html>
More information about the x265-devel
mailing list