static inline void ff_h264_biweight_WxH_mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets, int w, int h)

{

    int x, y;

    int offset = ((offsets + offsetd + 1) | 1) << log2_denom;

    asm volatile(

        "movd    %0, %%mm3        \n\t"

        "movd    %1, %%mm4        \n\t"

        "movd    %2, %%mm5        \n\t"

        "movd    %3, %%mm6        \n\t"

        "pshufw  $0, %%mm3, %%mm3 \n\t"

        "pshufw  $0, %%mm4, %%mm4 \n\t"

        "pshufw  $0, %%mm5, %%mm5 \n\t"

        "pxor    %%mm7, %%mm7     \n\t"

        :: "g"(weightd), "g"(weights), "g"(offset), "g"(log2_denom+1)

    );

    for(y=0; y<h; y++){

        for(x=0; x<w; x+=4){

            asm volatile(

                "movd      %0,    %%mm0 \n\t"

                "movd      %1,    %%mm1 \n\t"

                "punpcklbw %%mm7, %%mm0 \n\t"

                "punpcklbw %%mm7, %%mm1 \n\t"

                "pmullw    %%mm3, %%mm0 \n\t"

                "pmullw    %%mm4, %%mm1 \n\t"

                "paddw     %%mm5, %%mm0 \n\t"

                "paddw     %%mm1, %%mm0 \n\t"

                "psraw     %%mm6, %%mm0 \n\t"

                "packuswb  %%mm0, %%mm0 \n\t"

                "movd      %%mm0, %0    \n\t"

                : "+m"(*(uint32_t*)(dst+x))

                :  "m"(*(uint32_t*)(src+x))

            );

        }

        src += stride;

        dst += stride;

    }

}

static inline void ff_h264_biweight_WxH_mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets, int w, int h)

{

    int x, y;

    int offset = ((offsets + offsetd + 1) | 1) << log2_denom;

    asm volatile(

        "movd    %0, %%mm3        \n\t"

        "movd    %1, %%mm4        \n\t"

        "movd    %2, %%mm5        \n\t"

        "movd    %3, %%mm6        \n\t"

        "pshufw  $0, %%mm3, %%mm3 \n\t"

        "pshufw  $0, %%mm4, %%mm4 \n\t"

        "pshufw  $0, %%mm5, %%mm5 \n\t"

        "pxor    %%mm7, %%mm7     \n\t"

        :: "g"(weightd), "g"(weights), "g"(offset), "g"(log2_denom+1)

    );

    for(y=0; y<h; y++){

        for(x=0; x<w; x+=4){

            asm volatile(

                "movd      %0,    %%mm0 \n\t"

                "movd      %1,    %%mm1 \n\t"

                "punpcklbw %%mm7, %%mm0 \n\t"

                "punpcklbw %%mm7, %%mm1 \n\t"

                "pmullw    %%mm3, %%mm0 \n\t"

                "pmullw    %%mm4, %%mm1 \n\t"

                "paddw     %%mm5, %%mm0 \n\t"

                "paddw     %%mm1, %%mm0 \n\t"

                "psraw     %%mm6, %%mm0 \n\t"

                "packuswb  %%mm0, %%mm0 \n\t"

                "movd      %%mm0, %0    \n\t"

                : "+m"(*(uint32_t*)(dst+x))

                :  "m"(*(uint32_t*)(src+x))

            );

        }

        src += stride;

        dst += stride;

    }

}

                "paddw     %%mm5, %%mm0 \n\t"                 "paddw     %%mm5, %%mm0 \n\t"                 "paddw     %%mm1, %%mm0 \n\t"
static inline void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9)

{

    int VAR_10, VAR_11;

    int VAR_12 = ((VAR_7 + VAR_6 + 1) | 1) << VAR_3;

    asm volatile(

        "movd    %0, %%mm3        \n\t"

        "movd    %1, %%mm4        \n\t"

        "movd    %2, %%mm5        \n\t"

        "movd    %3, %%mm6        \n\t"

        "pshufw  $0, %%mm3, %%mm3 \n\t"

        "pshufw  $0, %%mm4, %%mm4 \n\t"

        "pshufw  $0, %%mm5, %%mm5 \n\t"

        "pxor    %%mm7, %%mm7     \n\t"

        :: "g"(VAR_4), "g"(VAR_5), "g"(VAR_12), "g"(VAR_3+1)

    );

    for(VAR_11=0; VAR_11<VAR_9; VAR_11++){

        for(VAR_10=0; VAR_10<VAR_8; VAR_10+=4){

            asm volatile(

                "movd      %0,    %%mm0 \n\t"

                "movd      %1,    %%mm1 \n\t"

                "punpcklbw %%mm7, %%mm0 \n\t"

                "punpcklbw %%mm7, %%mm1 \n\t"

                "pmullw    %%mm3, %%mm0 \n\t"

                "pmullw    %%mm4, %%mm1 \n\t"

                "paddw     %%mm5, %%mm0 \n\t"

                "paddw     %%mm1, %%mm0 \n\t"

                "psraw     %%mm6, %%mm0 \n\t"

                "packuswb  %%mm0, %%mm0 \n\t"

                "movd      %%mm0, %0    \n\t"

                : "+m"(*(uint32_t*)(VAR_0+VAR_10))

                :  "m"(*(uint32_t*)(VAR_1+VAR_10))

            );

        }

        VAR_1 += VAR_2;

        VAR_0 += VAR_2;

    }

}

static inline void FUNC_0(uint8_t *VAR_0, uint8_t *VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5, int VAR_6, int VAR_7, int VAR_8, int VAR_9)
{ int VAR_10, VAR_11; int VAR_12 = ((VAR_7 + VAR_6 + 1) | 1) << VAR_3; asm volatile(
"movd    %0, %%mm3        \n\t"
"movd    %1, %%mm4        \n\t"
"movd    %2, %%mm5        \n\t"
"movd    %3, %%mm6        \n\t"
"pshufw  $0, %%mm3, %%mm3 \n\t"
"pshufw  $0, %%mm4, %%mm4 \n\t"
"pshufw  $0, %%mm5, %%mm5 \n\t"
"pxor    %%mm7, %%mm7     \n\t"
:: "g"(VAR_4), "g"(VAR_5), "g"(VAR_12), "g"(VAR_3+1)
); for(VAR_11=0; VAR_11<VAR_9; VAR_11++){ for(VAR_10=0; VAR_10<VAR_8; VAR_10+=4){ asm volatile(
"movd      %0,    %%mm0 \n\t"
"movd      %1,    %%mm1 \n\t"
"punpcklbw %%mm7, %%mm0 \n\t"
"punpcklbw %%mm7, %%mm1 \n\t"
"pmullw    %%mm3, %%mm0 \n\t"
"pmullw    %%mm4, %%mm1 \n\t"
"paddw     %%mm5, %%mm0 \n\t"
"paddw     %%mm1, %%mm0 \n\t"
"psraw     %%mm6, %%mm0 \n\t"
"packuswb  %%mm0, %%mm0 \n\t"
"movd      %%mm0, %0    \n\t"
: "+m"(*(uint32_t*)(VAR_0+VAR_10))
:  "m"(*(uint32_t*)(VAR_1+VAR_10))
); } VAR_1 += VAR_2; VAR_0 += VAR_2; } }