[x265] [PATCH Review Only] chroma_hpp[8x8] for colorspace i420 in avx2: improve 541c->339c

Deepthi Nandakumar deepthi at multicorewareinc.com
Tue Dec 9 01:24:28 CET 2014


The parent doesn't exist in the public repo, so I cannot apply this patch.
Please rebase and send again.

On Mon, Dec 8, 2014 at 3:29 PM, <aasaipriya at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
> # Date 1418032695 -19800
> #      Mon Dec 08 15:28:15 2014 +0530
> # Node ID 040a02e1c463ac87d4dd9000bb6ea6604425c45e
> # Parent  909d343d68b3b0e34a1239085cf6acc4f2ad2f38
> chroma_hpp[8x8] for colorspace i420 in avx2: improve 541c->339c
>
> diff -r 909d343d68b3 -r 040a02e1c463 source/common/x86/asm-primitives.cpp
> --- a/source/common/x86/asm-primitives.cpp      Mon Dec 01 16:43:24 2014
> +0530
> +++ b/source/common/x86/asm-primitives.cpp      Mon Dec 08 15:28:15 2014
> +0530
> @@ -1823,6 +1823,8 @@
>          p.luma_vpp[LUMA_4x4] = x265_interp_8tap_vert_pp_4x4_avx2;
>
>          p.chroma[X265_CSP_I420].filter_hpp[CHROMA_4x4] =
> x265_interp_4tap_horiz_pp_4x4_avx2;
> +        p.chroma[X265_CSP_I420].filter_hpp[CHROMA_8x8] =
> x265_interp_4tap_horiz_pp_8x8_avx2;
> +
>      }
>  #endif // if HIGH_BIT_DEPTH
>  }
> diff -r 909d343d68b3 -r 040a02e1c463 source/common/x86/ipfilter8.asm
> --- a/source/common/x86/ipfilter8.asm   Mon Dec 01 16:43:24 2014 +0530
> +++ b/source/common/x86/ipfilter8.asm   Mon Dec 08 15:28:15 2014 +0530
> @@ -124,6 +124,9 @@
>
>  tab_c_64_n64:   times 8 db 64, -64
>
> +ALIGN 32
> +const interp_4tap_8x8_horiz_shuf,   dd 0, 4, 1, 5, 2, 6, 3, 7
> +
>
>  SECTION .text
>
> @@ -1248,6 +1251,72 @@
>      RET
>
>
> +INIT_YMM avx2
> +cglobal interp_4tap_horiz_pp_8x8, 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
> +    mov               r4d,          2
> +
> +.loop:
> +    ; Row 0
> +    vbroadcasti128    m3,           [r0]                        ; [x x x
> x x A 9 8 7 6 5 4 3 2 1 0]
> +    pshufb            m3,           m1
> +    pmaddubsw         m3,           m0
> +    pmaddwd           m3,           m2
> +
> +    ; Row 1
> +    vbroadcasti128    m4,           [r0 + r1]                        ; [x
> x x x x A 9 8 7 6 5 4 3 2 1 0]
> +    pshufb            m4,           m1
> +    pmaddubsw         m4,           m0
> +    pmaddwd           m4,           m2
> +    packssdw          m3,           m4
> +    pmulhrsw          m3,           [pw_512]
> +    lea               r0,           [r0 + r1 * 2]
> +
> +    ; Row 2
> +    vbroadcasti128    m4,           [r0 ]                        ; [x x x
> x x A 9 8 7 6 5 4 3 2 1 0]
> +    pshufb            m4,           m1
> +    pmaddubsw         m4,           m0
> +    pmaddwd           m4,           m2
> +
> +    ; Row 3
> +    vbroadcasti128    m5,           [r0 + r1]                        ; [x
> x x x x A 9 8 7 6 5 4 3 2 1 0]
> +    pshufb            m5,           m1
> +    pmaddubsw         m5,           m0
> +    pmaddwd           m5,           m2
> +    packssdw          m4,           m5
> +    pmulhrsw          m4,           [pw_512]
> +
> +    packuswb          m3,           m4
> +    mova              m5,           [interp_4tap_8x8_horiz_shuf]
> +    vpermd            m3,           m5,     m3
> +    vextracti128      xm4,          m3,     1
> +    movq              [r2],         xm3
> +    movhps            [r2 + r3],    xm3
> +    lea               r2,           [r2 + r3 * 2]
> +    movq              [r2],         xm4
> +    movhps            [r2 + r3],    xm4
> +    lea               r2,           [r2 + r3 * 2]
> +    lea               r0,           [r0 + r1*2]
> +    dec               r4d
> +    jnz               .loop
> +    RET
>
>
>  ;--------------------------------------------------------------------------------------------------------------
>  ; void interp_8tap_horiz_pp_%1x%2(pixel *src, intptr_t srcStride, pixel
> *dst, intptr_t dstStride, int coeffIdx)
> _______________________________________________
> 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/20141209/ecf085fb/attachment.html>


More information about the x265-devel mailing list