[x265] [PATCH Review Only] Luma_hpp[16x16] Avx2 asm code

chen chenm003 at 163.com
Tue Nov 11 22:24:15 CET 2014


The patch combin 8x8 and 16x16 and need modify many positions.
So I write a new demo for you, please reference and modify it
 
Cycles 640c -> 448c
 
 
INIT_YMM avx2
cglobal interp_8tap_horiz_pp_8x8, 4,6,8
    sub             r0, 3
    mov             r4d, r4m
%ifdef PIC
    lea             r5, [tab_LumaCoeff]
    vpbroadcastd    m0, [r5 + r4 * 8]
    vpbroadcastd    m1, [r5 + r4 * 8 + 4]
%else
    vpbroadcastd    m0, [tab_LumaCoeff + r4 * 8]
    vpbroadcastd    m1, [tab_LumaCoeff + r4 * 8 + 4]
%endif
    ; use this table to avoid phadd
    mova            m2, [tab_Tm]
    movu            m3, [tab_Tm + 16]
    vpbroadcastd    m7, [pw_1]
    ; register map
    ; m0 \ interpolate coeff
    ; m1 /
    ;
    ; m2 \ shuffle order table
    ; m3 /
    ;
    ; m7 - pw_1
    mov             r4d,  8/2
.loop:
    ; Row 0
    vbroadcasti128  m4, [r0]                        ; [x E D C B A 9 8 7 6 5 4 3 2 1 0]
    pshufb          m5, m4, m3
    pshufb          m4, m2
    pmaddubsw       m4, m0
    pmaddubsw       m5, m1
    paddw           m4, m5
    pmaddwd         m4, m7
    ; Row 1
    vbroadcasti128  m5, [r0 + r1]                   ; [x E D C B A 9 8 7 6 5 4 3 2 1 0]
    pshufb          m6, m5, m3
    pshufb          m5, m2
    pmaddubsw       m5, m0
    pmaddubsw       m6, m1
    paddw           m5, m6
    pmaddwd         m5, m7
    packssdw        m4, m5                          ; [17 16 15 14 07 06 05 04 13 12 11 10 03 02 01 00]
    pmulhrsw        m4, [pw_512]
    packuswb        m4, m4
    ; store
    vpermq          m4, m4, 11011000b
    pshufd          xm4, xm4, 11011000b
    ;vextracti128    xm5, m4, 1
    ;punpckldq       xm4, xm5
    movq            [r2], xm4
    movhps          [r2 + r3], xm4
    lea             r0, [r0 + r1 * 2]
    lea             r2, [r2 + r3 * 2]
    dec             r4d
    jnz             .loop
    RET




At 2014-11-11 20:12:54,aasaipriya at multicorewareinc.com wrote:
># HG changeset patch
># User maheshpittala
># Date 1415707607 -19800
>#      Tue Nov 11 17:36:47 2014 +0530
># Node ID c92edd8bf12b369b4da460241c9c1ca0fcd40932
># Parent  32513a4c3bd435757347e729dc14b5a1c1c6ceef
>Luma_hpp[16x16] Avx2 asm code
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20141112/e915d1a7/attachment.html>


More information about the x265-devel mailing list