[x265] [PATCH] Luma_hpp[16x16] avx2 asm code : improved 2307c->1610c

chen chenm003 at 163.com
Fri Nov 14 17:37:00 CET 2014


please check your ident, your tab is 8 spaces, it affect code style.

At 2014-11-14 18:07:13,aasaipriya at multicorewareinc.com wrote:
># HG changeset patch
># User Aasaipriya Chandran <aasaipriya at multicorewareinc.com>
># Date 1415959529 -19800
>#      Fri Nov 14 15:35:29 2014 +0530
># Node ID adf788fe049487b3f8c70411137da2c741cd8ffd
># Parent  64314f8061f1742c3c1278b455b15554c174b7b8
>Luma_hpp[16x16] avx2 asm code : improved 2307c->1610c
>Modified store instruction
>
>diff -r 64314f8061f1 -r adf788fe0494 source/common/x86/asm-primitives.cpp
>--- a/source/common/x86/asm-primitives.cpp	Thu Nov 13 18:40:35 2014 +0900
>+++ b/source/common/x86/asm-primitives.cpp	Fri Nov 14 15:35:29 2014 +0530
>@@ -1799,6 +1799,7 @@
>         p.transpose[BLOCK_64x64] = x265_transpose64_avx2;
> #endif
>         p.luma_hpp[LUMA_4x4] = x265_interp_8tap_horiz_pp_4x4_avx2;
>+		p.luma_hpp[LUMA_16x16] = x265_interp_8tap_horiz_pp_16x16_avx2;
>         p.luma_vpp[LUMA_4x4] = x265_interp_8tap_vert_pp_4x4_avx2;
>     }
> #endif // if HIGH_BIT_DEPTH
>diff -r 64314f8061f1 -r adf788fe0494 source/common/x86/ipfilter8.asm
>--- a/source/common/x86/ipfilter8.asm	Thu Nov 13 18:40:35 2014 +0900
>+++ b/source/common/x86/ipfilter8.asm	Fri Nov 14 15:35:29 2014 +0530
>@@ -854,6 +854,58 @@
>     RET
> 
> 
>+INIT_YMM avx2
>+cglobal interp_8tap_horiz_pp_16x16, 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
>+    mova            m2, [tab_Tm]
>+    movu            m3, [tab_Tm + 16]
>+    vpbroadcastd    m7, [pw_1]
>+
>+    ; register map
>+    ; m0 , m1 interpolate coeff
>+    ; m2 , m2  shuffle order table
>+    ; m7 - pw_1
>+
>+    mov             r4d,  16
>+.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
>+    vbroadcasti128  m5, [r0 + 8]                    ; second 8 elements in Row0 
>+    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
>+    vpermq          m4, m4, 11011000b
>+    pshufd          xm4, xm4, 11011000b
>+    ;store
>+    movu            [r2], xm4
>+    lea             r0, [r0 + r1]
>+    lea             r2, [r2 + r3]
>+    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/20141115/0bc9ff01/attachment.html>


More information about the x265-devel mailing list