[x265] [PATCH 3 of 3] asm: routines for chroma hps filter functions for 16xN, 24xN and 32xN

Nabajit Deka nabajit at multicorewareinc.com
Tue Nov 12 16:35:05 CET 2013


Function prototype is wrong here, dst should be int16_t *dst.


On Tue, Nov 12, 2013 at 8:36 PM, <nabajit at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Nabajit Deka
> # Date 1384268787 -19800
> #      Tue Nov 12 20:36:27 2013 +0530
> # Node ID 3587c6ea492c0e10403fb07b02c28b4e7fb571d9
> # Parent  676529ca9c45a14e54a1ad0976252b03fdcd9cd2
> asm: routines for chroma hps filter functions for 16xN, 24xN and 32xN.
>
> diff -r 676529ca9c45 -r 3587c6ea492c source/common/x86/ipfilter8.asm
> --- a/source/common/x86/ipfilter8.asm   Tue Nov 12 20:33:07 2013 +0530
> +++ b/source/common/x86/ipfilter8.asm   Tue Nov 12 20:36:27 2013 +0530
> @@ -3648,7 +3648,7 @@
>  add         dstq,        dststrideq
>
>  dec         r5d
> -jnz         .loop
> +jnz        .loop
>
>  RET
>  %endmacro
> @@ -3659,3 +3659,137 @@
>  FILTER_HORIZ_CHROMA_8xN 8, 8
>  FILTER_HORIZ_CHROMA_8xN 8, 16
>  FILTER_HORIZ_CHROMA_8xN 8, 32
> +
> +%macro PROCESS_CHROMA_W16 4
> +    movu        %1, [srcq - 1]
> +    pshufb      %2, %1, Tm0
> +    pmaddubsw   %2, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %2, %1
> +    movu        %1, [srcq - 1 + 8]
> +    pshufb      %4, %1, Tm0
> +    pmaddubsw   %4, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %4, %1
> +    psubw       %2, %3
> +    psubw       %4, %3
> +    movu        [dstq], %2
> +    movu        [dstq + 16], %4
> +%endmacro
> +
> +%macro PROCESS_CHROMA_W24 4
> +    movu        %1, [srcq - 1]
> +    pshufb      %2, %1, Tm0
> +    pmaddubsw   %2, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %2, %1
> +    movu        %1, [srcq - 1 + 8]
> +    pshufb      %4, %1, Tm0
> +    pmaddubsw   %4, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %4, %1
> +    psubw       %2, %3
> +    psubw       %4, %3
> +    movu        [dstq], %2
> +    movu        [dstq + 16], %4
> +    movu        %1, [srcq - 1 + 16]
> +    pshufb      %2, %1, Tm0
> +    pmaddubsw   %2, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %2, %1
> +    psubw       %2, %3
> +    movu        [dstq + 32],     %2
> +%endmacro
> +
> +%macro PROCESS_CHROMA_W32 4
> +    movu        %1, [srcq - 1]
> +    pshufb      %2, %1, Tm0
> +    pmaddubsw   %2, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %2, %1
> +    movu        %1, [srcq - 1 + 8]
> +    pshufb      %4, %1, Tm0
> +    pmaddubsw   %4, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %4, %1
> +    psubw       %2, %3
> +    psubw       %4, %3
> +    movu        [dstq], %2
> +    movu        [dstq + 16], %4
> +    movu        %1, [srcq - 1 + 16]
> +    pshufb      %2, %1, Tm0
> +    pmaddubsw   %2, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %2, %1
> +    movu        %1, [srcq - 1 + 24]
> +    pshufb      %4, %1, Tm0
> +    pmaddubsw   %4, coef2
> +    pshufb      %1, %1, Tm1
> +    pmaddubsw   %1, coef2
> +    phaddw      %4, %1
> +    psubw       %2, %3
> +    psubw       %4, %3
> +    movu        [dstq + 32],      %2
> +    movu        [dstq + 48],      %4
> +%endmacro
> +
>
> +;-----------------------------------------------------------------------------
> +; void interp_4tap_horiz_pp_%1x%2(pixel *src, intptr_t srcStride, pixel
> *dst, intptr_t dstStride, int coeffIdx)
>
> +;-----------------------------------------------------------------------------
> +%macro FILTER_HORIZ_CHROMA_WxN 2
> +INIT_XMM sse4
> +cglobal interp_4tap_horiz_ps_%1x%2, 4, 6, 7, src, srcstride, dst,
> dststride
> +%define coef2       m6
> +%define Tm0         m5
> +%define Tm1         m4
> +%define t3          m3
> +%define t2          m2
> +%define t1          m1
> +%define t0          m0
> +
> +mov         r4d,         r4m
> +add         dststrided, dststrided
> +
> +%ifdef PIC
> +lea         r5,          [tab_ChromaCoeff]
> +movd        coef2,       [r5 + r4 * 4]
> +%else
> +movd        coef2,       [tab_ChromaCoeff + r4 * 4]
> +%endif
> +
> +mov         r5d,          %2
> +
> +pshufd      coef2,       coef2,      0
> +mova        t2,          [tab_c_8192]
> +mova        Tm0,         [tab_Tm]
> +mova        Tm1,         [tab_Tm + 16]
> +
> +.loop
> +PROCESS_CHROMA_W%1   t0, t1, t2, t3
> +add         srcq,        srcstrideq
> +add         dstq,        dststrideq
> +
> +dec         r5d
> +jnz        .loop
> +
> +RET
> +%endmacro
> +
> +FILTER_HORIZ_CHROMA_WxN 16, 4
> +FILTER_HORIZ_CHROMA_WxN 16, 8
> +FILTER_HORIZ_CHROMA_WxN 16, 12
> +FILTER_HORIZ_CHROMA_WxN 16, 16
> +FILTER_HORIZ_CHROMA_WxN 16, 32
> +FILTER_HORIZ_CHROMA_WxN 24, 32
> +FILTER_HORIZ_CHROMA_WxN 32,  8
> +FILTER_HORIZ_CHROMA_WxN 32, 16
> +FILTER_HORIZ_CHROMA_WxN 32, 24
> +FILTER_HORIZ_CHROMA_WxN 32, 32
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131112/5a72c4a0/attachment-0001.html>


More information about the x265-devel mailing list