[x265] [PATCH] asm: routines for chroma vps filter functions for 2x4 and 2x8 block sizes

Steve Borho steve at borho.org
Thu Nov 14 15:12:50 CET 2013


On Thu, Nov 14, 2013 at 5:00 AM, <nabajit at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Nabajit Deka
> # Date 1384426801 -19800
> #      Thu Nov 14 16:30:01 2013 +0530
> # Node ID 373fa609f3309420e5d5a9b3227d41757d315ac5
> # Parent  5683ee5b793cca5956f1e44e4e0bb3d6be70e942
> asm: routines for chroma vps filter functions for 2x4 and 2x8 block sizes
>

already queued, thanks


> diff -r 5683ee5b793c -r 373fa609f330 source/common/x86/ipfilter8.asm
> --- a/source/common/x86/ipfilter8.asm   Wed Nov 13 13:53:13 2013 +0000
> +++ b/source/common/x86/ipfilter8.asm   Thu Nov 14 16:30:01 2013 +0530
> @@ -1401,6 +1401,164 @@
>
>  RET
>
>
> +;------------------------------------------------------------------------------------------------------------
> +;void interp_4tap_vert_ps_2x4(pixel *src, intptr_t srcStride, int16_t
> *dst, intptr_t dstStride, int coeffIdx)
>
> +;------------------------------------------------------------------------------------------------------------
> +INIT_XMM sse4
> +cglobal interp_4tap_vert_ps_2x4, 4, 7, 8
> +
> +    mov         r4d, r4m
> +    sub         r0, r1
> +    add         r3d, r3d
> +
> +%ifdef PIC
> +    lea         r5, [tab_ChromaCoeff]
> +    movd        m0, [r5 + r4 * 4]
> +%else
> +    movd        m0, [tab_ChromaCoeff + r4 * 4]
> +%endif
> +
> +    pshufb      m0, [tab_Cm]
> +
> +    mova        m1, [tab_c_8192]
> +
> +    movd        m2, [r0]
> +    movd        m3, [r0 + r1]
> +    movd        m4, [r0 + 2 * r1]
> +    lea         r5, [r0 + 2 * r1]
> +    movd        m5, [r5 + r1]
> +
> +    punpcklbw   m2, m3
> +    punpcklbw   m6, m4, m5
> +    punpcklbw   m2, m6
> +
> +    pmaddubsw   m2, m0
> +
> +    movd        m6, [r0 + 4 * r1]
> +
> +    punpcklbw   m3, m4
> +    punpcklbw   m7, m5, m6
> +    punpcklbw   m3, m7
> +
> +    pmaddubsw   m3, m0
> +    phaddw      m2, m3
> +    psubw       m2, m1
> +
> +    movd        [r2], m2
> +    movhlps     m2, m2
> +    movd        [r2 + r3], m2
> +
> +    lea         r5, [r0 + 4 * r1]
> +    movd        m2, [r5 + r1]
> +
> +    punpcklbw   m4, m5
> +    punpcklbw   m3, m6, m2
> +    punpcklbw   m4, m3
> +
> +    pmaddubsw   m4, m0
> +
> +    movd        m3, [r5 + 2 * r1]
> +
> +    punpcklbw   m5, m6
> +    punpcklbw   m2, m3
> +    punpcklbw   m5, m2
> +
> +    pmaddubsw   m5, m0
> +    phaddw      m4, m5
> +    psubw       m4, m1
> +
> +    movd        [r2 + 2 * r3], m4
> +    movhlps     m4, m4
> +    lea         r6, [r2 + 2 * r3]
> +    movd        [r6 + r3], m4
> +
> +    RET
> +
>
> +;-------------------------------------------------------------------------------------------------------------
> +; void interp_4tap_vert_ps_2x8(pixel *src, intptr_t srcStride, int16_t
> *dst, intptr_t dstStride, int coeffIdx)
>
> +;-------------------------------------------------------------------------------------------------------------
> +INIT_XMM sse4
> +cglobal interp_4tap_vert_ps_2x8, 4, 7, 8
> +
> +    mov         r4d, r4m
> +    sub         r0, r1
> +    add         r3d, r3d
> +
> +%ifdef PIC
> +    lea         r5, [tab_ChromaCoeff]
> +    movd        m0, [r5 + r4 * 4]
> +%else
> +    movd        m0, [tab_ChromaCoeff + r4 * 4]
> +%endif
> +
> +    pshufb      m0, [tab_Cm]
> +
> +    mova        m1, [tab_c_8192]
> +
> +    mov         r4d, 2
> +.loop
> +    movd        m2, [r0]
> +    movd        m3, [r0 + r1]
> +    movd        m4, [r0 + 2 * r1]
> +    lea         r5, [r0 + 2 * r1]
> +    movd        m5, [r5 + r1]
> +
> +    punpcklbw   m2, m3
> +    punpcklbw   m6, m4, m5
> +    punpcklbw   m2, m6
> +
> +    pmaddubsw   m2, m0
> +
> +    movd        m6, [r0 + 4 * r1]
> +
> +    punpcklbw   m3, m4
> +    punpcklbw   m7, m5, m6
> +    punpcklbw   m3, m7
> +
> +    pmaddubsw   m3, m0
> +
> +    phaddw      m2, m3
> +    psubw       m2, m1
> +
> +
> +    movd        [r2], m2
> +    movhlps     m2, m2
> +    movd        [r2 + r3], m2
> +
> +    lea         r5, [r0 + 4 * r1]
> +    movd        m2, [r5 + r1]
> +
> +    punpcklbw   m4, m5
> +    punpcklbw   m3, m6, m2
> +    punpcklbw   m4, m3
> +
> +    pmaddubsw   m4, m0
> +
> +    movd        m3, [r5 + 2 * r1]
> +
> +    punpcklbw   m5, m6
> +    punpcklbw   m2, m3
> +    punpcklbw   m5, m2
> +
> +    pmaddubsw   m5, m0
> +
> +    phaddw      m4, m5
> +
> +    psubw       m4, m1
> +
> +    movd        [r2 + 2 * r3], m4
> +    lea         r6, [r2 + 2 * r3]
> +    movhlps     m4, m4
> +    movd        [r6 + r3], m4
> +
> +    lea         r0, [r0 + 4 * r1]
> +    lea         r2, [r2 + 4 * r3]
> +
> +    dec         r4d
> +    jnz        .loop
> +
> +RET
> +
>
>  ;-------------------------------------------------------------------------------------------------------------
>  ; void interp_4tap_vert_ps_4x2(pixel *src, intptr_t srcStride, int16_t
> *dst, intptr_t dstStride, int coeffIdx)
>
>  ;-------------------------------------------------------------------------------------------------------------
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>



-- 
Steve Borho
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131114/30daed0e/attachment-0001.html>


More information about the x265-devel mailing list