[x265] [PATCH] asm: interp_4tap_horiz_ps sse3

dave dtyx265 at gmail.com
Fri May 22 04:11:38 CEST 2015


On 05/21/2015 07:07 PM, chen wrote:
> lea         srcq,   [srcq + srcstrideq]
> why not ADD?
That's carried over from the sse4 code.  I can change it to add if that 
is what you want.
> At 2015-05-22 09:27:57,dtyx265 at gmail.com wrote:
> ># HG changeset patch
> ># User David T Yuen <dtyx265 at gmail.com>
> ># Date 1432258035 25200
> ># Node ID 4e79322b066536eed735a7aafd296b07e9195296
> ># Parent  234bc93bd51698801fad77cc861177ed019f5113
> >asm: interp_4tap_horiz_ps sse3
> >
> >This replaces c code for all of interp_4tap_horiz_ps for sse3
> >
> >diff -r 234bc93bd516 -r 4e79322b0665 source/common/x86/asm-primitives.cpp
> >--- a/source/common/x86/asm-primitives.cpp	Thu May 21 16:34:48 2015 +0530
> >+++ b/source/common/x86/asm-primitives.cpp	Thu May 21 18:27:15 2015 -0700
> >@@ -1614,6 +1614,9 @@
> >         ALL_CHROMA_420_PU(filter_hpp, interp_4tap_horiz_pp, sse3);
> >         ALL_CHROMA_422_PU(filter_hpp, interp_4tap_horiz_pp, sse3);
> >         ALL_CHROMA_444_PU(filter_hpp, interp_4tap_horiz_pp, sse3);
> >+        ALL_CHROMA_420_PU(filter_hps, interp_4tap_horiz_ps, sse3);
> >+        ALL_CHROMA_422_PU(filter_hps, interp_4tap_horiz_ps, sse3);
> >+        ALL_CHROMA_444_PU(filter_hps, interp_4tap_horiz_ps, sse3);
> >     }
> >     if (cpuMask & X265_CPU_SSSE3)
> >     {
> >diff -r 234bc93bd516 -r 4e79322b0665 source/common/x86/ipfilter8.asm
> >--- a/source/common/x86/ipfilter8.asm	Thu May 21 16:34:48 2015 +0530
> >+++ b/source/common/x86/ipfilter8.asm	Thu May 21 18:27:15 2015 -0700
> >@@ -641,6 +641,123 @@
> >     IPFILTER_CHROMA_sse3 48, 64
> >     IPFILTER_CHROMA_sse3 64, 16
> >
> >+%macro FILTER_2 2
> >+    movd        m3,     [srcq + %1]
> >+    movd        m4,     [srcq + 1 + %1]
> >+    punpckldq   m3,     m4
> >+    punpcklbw   m3,     m0
> >+    pmaddwd     m3,     m1
> >+    packssdw    m3,     m3
> >+    pshuflw     m4,     m3, q2301
> >+    paddw       m3,     m4
> >+    psrldq      m3,     2
> >+    psubw       m3,     m2
> >+    movd        [dstq + %2], m3
> >+%endmacro
> >+
> >+%macro FILTER_4 2
> >+    movd        m3,     [srcq + %1]
> >+    movd        m4,     [srcq + 1 + %1]
> >+    punpckldq   m3,     m4
> >+    punpcklbw   m3,     m0
> >+    pmaddwd     m3,     m1
> >+    movd        m4,     [srcq + 2 + %1]
> >+    movd        m5,     [srcq + 3 + %1]
> >+    punpckldq   m4,     m5
> >+    punpcklbw   m4,     m0
> >+    pmaddwd     m4,     m1
> >+    packssdw    m3,     m4
> >+    pshuflw     m4,     m3, q2301
> >+    pshufhw     m4,     m4, q2301
> >+    paddw       m3,     m4
> >+    psrldq      m3,     2
> >+    pshufd      m3,     m3,     q3120
> >+    psubw       m3,     m2
> >+    movh        [dstq + %2], m3
> >+%endmacro
> >+
> >+%macro FILTER_4TAP_HPS_sse3 2
> >+INIT_XMM sse3
> >+cglobal interp_4tap_horiz_ps_%1x%2, 4, 7, 6, src, srcstride, dst, dststride
> >+    mov         r4d,    r4m
> >+    add         dststrided, dststrided
> >+    mova        m2,     [pw_2000]
> >+    pxor        m0,     m0
> >+
> >+%ifdef PIC
> >+    lea         r6,     [tabw_ChromaCoeff]
> >+    movddup     m1,     [r6 + r4 * 8]
> >+%else
> >+    movddup     m1,     [tabw_ChromaCoeff + r4 * 8]
> >+%endif
> >+
> >+    mov        r4d,     %2
> >+    cmp        r5m,     byte 0
> >+    je         .loopH
> >+    sub        srcq,    srcstrideq
> >+    add        r4d, 3
> >+
> >+.loopH:
> >+%assign x -1
> >+%assign y 0
> >+%rep %1/4
> >+    FILTER_4 x,y
> >+%assign x x+4
> >+%assign y y+8
> >+%endrep
> >+%rep (%1 % 4)/2
> >+    FILTER_2 x,y
> >+%endrep
> >+    lea         srcq,   [srcq + srcstrideq]
> >+    lea         dstq,   [dstq + dststrideq]
> >+
> >+    dec         r4d
> >+    jnz         .loopH
> >+    RET
> >+
> >+%endmacro
> >+
> >+    FILTER_4TAP_HPS_sse3 2, 4
> >+    FILTER_4TAP_HPS_sse3 2, 8
> >+    FILTER_4TAP_HPS_sse3 2, 16
> >+    FILTER_4TAP_HPS_sse3 4, 2
> >+    FILTER_4TAP_HPS_sse3 4, 4
> >+    FILTER_4TAP_HPS_sse3 4, 8
> >+    FILTER_4TAP_HPS_sse3 4, 16
> >+    FILTER_4TAP_HPS_sse3 4, 32
> >+    FILTER_4TAP_HPS_sse3 6, 8
> >+    FILTER_4TAP_HPS_sse3 6, 16
> >+    FILTER_4TAP_HPS_sse3 8, 2
> >+    FILTER_4TAP_HPS_sse3 8, 4
> >+    FILTER_4TAP_HPS_sse3 8, 6
> >+    FILTER_4TAP_HPS_sse3 8, 8
> >+    FILTER_4TAP_HPS_sse3 8, 12
> >+    FILTER_4TAP_HPS_sse3 8, 16
> >+    FILTER_4TAP_HPS_sse3 8, 32
> >+    FILTER_4TAP_HPS_sse3 8, 64
> >+    FILTER_4TAP_HPS_sse3 12, 16
> >+    FILTER_4TAP_HPS_sse3 12, 32
> >+    FILTER_4TAP_HPS_sse3 16, 4
> >+    FILTER_4TAP_HPS_sse3 16, 8
> >+    FILTER_4TAP_HPS_sse3 16, 12
> >+    FILTER_4TAP_HPS_sse3 16, 16
> >+    FILTER_4TAP_HPS_sse3 16, 24
> >+    FILTER_4TAP_HPS_sse3 16, 32
> >+    FILTER_4TAP_HPS_sse3 16, 64
> >+    FILTER_4TAP_HPS_sse3 24, 32
> >+    FILTER_4TAP_HPS_sse3 24, 64
> >+    FILTER_4TAP_HPS_sse3 32,  8
> >+    FILTER_4TAP_HPS_sse3 32, 16
> >+    FILTER_4TAP_HPS_sse3 32, 24
> >+    FILTER_4TAP_HPS_sse3 32, 32
> >+    FILTER_4TAP_HPS_sse3 32, 48
> >+    FILTER_4TAP_HPS_sse3 32, 64
> >+    FILTER_4TAP_HPS_sse3 48, 64
> >+    FILTER_4TAP_HPS_sse3 64, 16
> >+    FILTER_4TAP_HPS_sse3 64, 32
> >+    FILTER_4TAP_HPS_sse3 64, 48
> >+    FILTER_4TAP_HPS_sse3 64, 64
> >+
> > %macro FILTER_H8_W8_sse2 0
> >     movh        m1, [r0 + x - 3]
> >     movh        m4, [r0 + x - 2]
> >diff -r 234bc93bd516 -r 4e79322b0665 source/common/x86/ipfilter8.h
> >--- a/source/common/x86/ipfilter8.h	Thu May 21 16:34:48 2015 +0530
> >+++ b/source/common/x86/ipfilter8.h	Thu May 21 18:27:15 2015 -0700
> >@@ -854,6 +854,47 @@
> > void x265_interp_4tap_horiz_pp_64x32_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
> > void x265_interp_4tap_horiz_pp_64x48_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
> > void x265_interp_4tap_horiz_pp_64x64_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
> >+void x265_interp_4tap_horiz_ps_2x4_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_2x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_2x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_4x2_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_4x4_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_4x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_4x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_4x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_6x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_6x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x2_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x4_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x6_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x12_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_8x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_12x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_12x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_12x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x4_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x12_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x24_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_16x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_24x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_24x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x8_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x24_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x48_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_32x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_64x16_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_64x32_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_64x48_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_64x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> >+void x265_interp_4tap_horiz_ps_48x64_sse3(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride, int coeffIdx, int isRowExt);
> > void x265_interp_8tap_horiz_pp_4x4_sse2(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
> > void x265_interp_8tap_horiz_pp_4x8_sse2(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
> > void x265_interp_8tap_horiz_pp_4x16_sse2(const 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
>
>
> _______________________________________________
> 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/20150521/05df2de3/attachment.html>


More information about the x265-devel mailing list