[x265] [PATCH] asm: chroma_hps[32x8, 32x16, 32x24] for i420 avx2 - improved 1843c->1210c, 3149c->2001c, 4440c->2906c

chen chenm003 at 163.com
Fri Mar 13 02:49:04 CET 2015


right

At 2015-03-12 16:30:21,aasaipriya at multicorewareinc.com wrote:
># HG changeset patch
># User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
># Date 1426149013 -19800
>#      Thu Mar 12 14:00:13 2015 +0530
># Node ID e47f62bd260f86a90c942001c99034fe0ce7e455
># Parent  d78714dc5cb537d480550ba507c320f9e9a0cc9d
>asm: chroma_hps[32x8, 32x16, 32x24] for i420 avx2 - improved 1843c->1210c, 3149c->2001c, 4440c->2906c
>
>diff -r d78714dc5cb5 -r e47f62bd260f source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp	Thu Mar 12 13:55:24 2015 +0530
>+++ b/source/common/x86/asm-primitives.cpp	Thu Mar 12 14:00:13 2015 +0530
>@@ -1596,6 +1596,10 @@
>         p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].filter_hps = x265_interp_4tap_horiz_ps_16x8_avx2;
>         p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].filter_hps = x265_interp_4tap_horiz_ps_16x4_avx2;
> 
>+        p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].filter_hps = x265_interp_4tap_horiz_ps_32x16_avx2;
>+        p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].filter_hps = x265_interp_4tap_horiz_ps_32x24_avx2;
>+        p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].filter_hps = x265_interp_4tap_horiz_ps_32x8_avx2;
>+
>         p.chroma[X265_CSP_I422].pu[CHROMA_422_4x4].filter_vpp = x265_interp_4tap_vert_pp_4x4_avx2;
> 
>         p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].filter_vpp = x265_interp_4tap_vert_pp_4x4_avx2;
>diff -r d78714dc5cb5 -r e47f62bd260f source/common/x86/ipfilter8.asm
>--- a/source/common/x86/ipfilter8.asm	Thu Mar 12 13:55:24 2015 +0530
>+++ b/source/common/x86/ipfilter8.asm	Thu Mar 12 14:00:13 2015 +0530
>@@ -14829,6 +14829,81 @@
>     IPFILTER_CHROMA_PS_16xN_AVX2  16 , 12
>     IPFILTER_CHROMA_PS_16xN_AVX2  16 , 8
>     IPFILTER_CHROMA_PS_16xN_AVX2  16 , 4
>+
>+;-----------------------------------------------------------------------------------------------------------------------------
>+; void interp_4tap_horiz_ps_32xN(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx, int isRowExt)
>+;-----------------------------------------------------------------------------------------------------------------------------
>+%macro IPFILTER_CHROMA_PS_32xN_AVX2 2
>+INIT_YMM avx2 
>+cglobal interp_4tap_horiz_ps_%1x%2, 4,7,6
>+    mov                r4d,          r4m
>+    mov                r5d,          r5m
>+    add                r3d,          r3d
>+
>+%ifdef PIC
>+    lea                r6,           [tab_ChromaCoeff]
>+    vpbroadcastd       m0,           [r6 + r4 * 4]
>+%else
>+    vpbroadcastd       m0,           [tab_ChromaCoeff + r4 * 4]
>+%endif
>+
>+    vbroadcasti128     m2,           [pw_1]
>+    vbroadcasti128     m5,           [pw_2000]
>+    mova               m1,           [tab_Tm]
>+
>+    ; register map
>+    ; m0 - interpolate coeff
>+    ; m1 - shuffle order table
>+    ; m2 - constant word 1
>+    mov                r6d,          %2
>+    dec                r0
>+    test               r5d,          r5d
>+    je                 .loop
>+    sub                r0 ,          r1
>+    add                r6d ,         3
>+
>+.loop
>+    ; Row 0
>+    vbroadcasti128     m3,           [r0]
>+    pshufb             m3,           m1
>+    pmaddubsw          m3,           m0
>+    pmaddwd            m3,           m2
>+    vbroadcasti128     m4,           [r0 + 8]
>+    pshufb             m4,           m1
>+    pmaddubsw          m4,           m0
>+    pmaddwd            m4,           m2
>+
>+    packssdw           m3,           m4
>+    psubw              m3,           m5
>+
>+    vpermq             m3,           m3,          11011000b
>+    movu              [r2],          m3
>+
>+    vbroadcasti128     m3,           [r0 + 16]
>+    pshufb             m3,           m1
>+    pmaddubsw          m3,           m0
>+    pmaddwd            m3,           m2
>+    vbroadcasti128     m4,           [r0 + 24]
>+    pshufb             m4,           m1
>+    pmaddubsw          m4,           m0
>+    pmaddwd            m4,           m2
>+
>+    packssdw           m3,           m4
>+    psubw              m3,           m5
>+
>+    vpermq             m3,           m3,          11011000b
>+    movu               [r2 + 32],    m3
>+
>+    add                r2,           r3
>+    add                r0,           r1
>+    dec                r6d
>+    jnz                .loop
>+    RET
>+%endmacro
>+
>+IPFILTER_CHROMA_PS_32xN_AVX2  32 , 16
>+IPFILTER_CHROMA_PS_32xN_AVX2  32 , 24
>+IPFILTER_CHROMA_PS_32xN_AVX2  32 , 8
> ;-----------------------------------------------------------------------------------------------------------------------------
> ; void interp_4tap_horiz_ps_4x4(pixel *src, intptr_t srcStride, int16_t *dst, intptr_t dstStride, int coeffIdx, int isRowExt)
> ;-----------------------------------------------------------------------------------------------------------------------------
>_______________________________________________
>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/20150313/93525a41/attachment.html>


More information about the x265-devel mailing list