void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,

                                 int dstWidth, const uint8_t *src1,

                                 const uint8_t *src2, int srcW, int xInc)

{

    int32_t *filterPos = c->hChrFilterPos;

    int16_t *filter    = c->hChrFilter;

    void    *mmxextFilterCode = c->chrMmxextFilterCode;

    int i;

#if ARCH_X86_64

    DECLARE_ALIGNED(8, uint64_t, retsave);

#else

#if defined(PIC)

    DECLARE_ALIGNED(8, uint64_t, ebxsave);

#endif

#endif

    __asm__ volatile(

#if ARCH_X86_64

        "mov          -8(%%rsp), %%"FF_REG_a"    \n\t"

        "mov       %%"FF_REG_a", %7              \n\t"  // retsave

#else

#if defined(PIC)

        "mov       %%"FF_REG_b", %7              \n\t"  // ebxsave

#endif

#endif

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

        "mov                 %0, %%"FF_REG_c"    \n\t"

        "mov                 %1, %%"FF_REG_D"    \n\t"

        "mov                 %2, %%"FF_REG_d"    \n\t"

        "mov                 %3, %%"FF_REG_b"    \n\t"

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" // i

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" // i

        "mov                    %5, %%"FF_REG_c" \n\t" // src2

        "mov                    %6, %%"FF_REG_D" \n\t" // dst2

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE



#if ARCH_X86_64

        "mov                    %7, %%"FF_REG_a" \n\t"

        "mov          %%"FF_REG_a", -8(%%rsp)    \n\t"

#else

#if defined(PIC)

        "mov %7, %%"FF_REG_b"    \n\t"

#endif

#endif

        :: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),

           "m" (mmxextFilterCode), "m" (src2), "m"(dst2)

#if ARCH_X86_64

          ,"m"(retsave)

#else

#if defined(PIC)

          ,"m" (ebxsave)

#endif

#endif

        : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D

#if ARCH_X86_64 || !defined(PIC)

         ,"%"FF_REG_b

#endif

    );



    for (i=dstWidth-1; (i*xInc)>>16 >=srcW-1; i--) {

        dst1[i] = src1[srcW-1]*128;

        dst2[i] = src2[srcW-1]*128;

    }

}

void ff_hcscale_fast_mmxext(SwsContext *c, int16_t *dst1, int16_t *dst2,

                                 int dstWidth, const uint8_t *src1,

                                 const uint8_t *src2, int srcW, int xInc)

{

    int32_t *filterPos = c->hChrFilterPos;

    int16_t *filter    = c->hChrFilter;

    void    *mmxextFilterCode = c->chrMmxextFilterCode;

    int i;

#if ARCH_X86_64

    DECLARE_ALIGNED(8, uint64_t, retsave);

#else

#if defined(PIC)

    DECLARE_ALIGNED(8, uint64_t, ebxsave);

#endif

#endif

    __asm__ volatile(

#if ARCH_X86_64

        "mov          -8(%%rsp), %%"FF_REG_a"    \n\t"

        "mov       %%"FF_REG_a", %7              \n\t"  

#else

#if defined(PIC)

        "mov       %%"FF_REG_b", %7              \n\t"  

#endif

#endif

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

        "mov                 %0, %%"FF_REG_c"    \n\t"

        "mov                 %1, %%"FF_REG_D"    \n\t"

        "mov                 %2, %%"FF_REG_d"    \n\t"

        "mov                 %3, %%"FF_REG_b"    \n\t"

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" 

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" 

        "mov                    %5, %%"FF_REG_c" \n\t" 

        "mov                    %6, %%"FF_REG_D" \n\t" 

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE



#if ARCH_X86_64

        "mov                    %7, %%"FF_REG_a" \n\t"

        "mov          %%"FF_REG_a", -8(%%rsp)    \n\t"

#else

#if defined(PIC)

        "mov %7, %%"FF_REG_b"    \n\t"

#endif

#endif

        :: "m" (src1), "m" (dst1), "m" (filter), "m" (filterPos),

           "m" (mmxextFilterCode), "m" (src2), "m"(dst2)

#if ARCH_X86_64

          ,"m"(retsave)

#else

#if defined(PIC)

          ,"m" (ebxsave)

#endif

#endif

        : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D

#if ARCH_X86_64 || !defined(PIC)

         ,"%"FF_REG_b

#endif

    );



    for (i=dstWidth-1; (i*xInc)>>16 >=srcW-1; i--) {

        dst1[i] = src1[srcW-1]*128;

        dst2[i] = src2[srcW-1]*128;

    }

}

#if defined(PIC) #if defined(PIC) #if defined(PIC) #if defined(PIC) #if ARCH_X86_64 || !defined(PIC) #if defined(PIC) #if defined(PIC) #if defined(PIC) #if defined(PIC) #if ARCH_X86_64 || !defined(PIC)
void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int16_t *VAR_2,

                                 int VAR_3, const uint8_t *VAR_4,

                                 const uint8_t *VAR_5, int VAR_6, int VAR_7)

{

    int32_t *filterPos = VAR_0->hChrFilterPos;

    int16_t *filter    = VAR_0->hChrFilter;

    void    *VAR_8 = VAR_0->chrMmxextFilterCode;

    int VAR_9;

#if ARCH_X86_64

    DECLARE_ALIGNED(8, uint64_t, retsave);

#else

#if defined(PIC)

    DECLARE_ALIGNED(8, uint64_t, ebxsave);

#endif

#endif

    __asm__ volatile(

#if ARCH_X86_64

        "mov          -8(%%rsp), %%"FF_REG_a"    \n\t"

        "mov       %%"FF_REG_a", %7              \n\t"  

#else

#if defined(PIC)

        "mov       %%"FF_REG_b", %7              \n\t"  

#endif

#endif

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

        "mov                 %0, %%"FF_REG_c"    \n\t"

        "mov                 %1, %%"FF_REG_D"    \n\t"

        "mov                 %2, %%"FF_REG_d"    \n\t"

        "mov                 %3, %%"FF_REG_b"    \n\t"

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" 

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        "xor          %%"FF_REG_a", %%"FF_REG_a" \n\t" 

        "mov                    %5, %%"FF_REG_c" \n\t" 

        "mov                    %6, %%"FF_REG_D" \n\t" 

        PREFETCH"   (%%"FF_REG_c")               \n\t"

        PREFETCH" 32(%%"FF_REG_c")               \n\t"

        PREFETCH" 64(%%"FF_REG_c")               \n\t"



        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE

        CALL_MMXEXT_FILTER_CODE



#if ARCH_X86_64

        "mov                    %7, %%"FF_REG_a" \n\t"

        "mov          %%"FF_REG_a", -8(%%rsp)    \n\t"

#else

#if defined(PIC)

        "mov %7, %%"FF_REG_b"    \n\t"

#endif

#endif

        :: "m" (VAR_4), "m" (VAR_1), "m" (filter), "m" (filterPos),

           "m" (VAR_8), "m" (VAR_5), "m"(VAR_2)

#if ARCH_X86_64

          ,"m"(retsave)

#else

#if defined(PIC)

          ,"m" (ebxsave)

#endif

#endif

        : "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D

#if ARCH_X86_64 || !defined(PIC)

         ,"%"FF_REG_b

#endif

    );



    for (VAR_9=VAR_3-1; (VAR_9*VAR_7)>>16 >=VAR_6-1; VAR_9--) {

        VAR_1[VAR_9] = VAR_4[VAR_6-1]*128;

        VAR_2[VAR_9] = VAR_5[VAR_6-1]*128;

    }

}

void FUNC_0(SwsContext *VAR_0, int16_t *VAR_1, int16_t *VAR_2,
int VAR_3, const uint8_t *VAR_4,
const uint8_t *VAR_5, int VAR_6, int VAR_7)
{ int32_t *filterPos = VAR_0->hChrFilterPos; int16_t *filter    = VAR_0->hChrFilter; void    *VAR_8 = VAR_0->chrMmxextFilterCode; int VAR_9; #if ARCH_X86_64
DECLARE_ALIGNED(8, uint64_t, retsave); #else
#if defined(PIC)
DECLARE_ALIGNED(8, uint64_t, ebxsave); #endif
#endif
__asm__ volatile(
#if ARCH_X86_64
"mov          -8(%%rsp), %%"FF_REG_a"    \n\t"
"mov       %%"FF_REG_a", %7              \n\t"
#else
#if defined(PIC)
"mov       %%"FF_REG_b", %7              \n\t"
#endif
#endif
"pxor             %%mm7, %%mm7           \n\t"
"mov                 %0, %%"FF_REG_c"    \n\t"
"mov                 %1, %%"FF_REG_D"    \n\t"
"mov                 %2, %%"FF_REG_d"    \n\t"
"mov                 %3, %%"FF_REG_b"    \n\t"
"xor          %%"FF_REG_a", %%"FF_REG_a" \n\t"
PREFETCH"   (%%"FF_REG_c")               \n\t"
PREFETCH" 32(%%"FF_REG_c")               \n\t"
PREFETCH" 64(%%"FF_REG_c")               \n\t"
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
"xor          %%"FF_REG_a", %%"FF_REG_a" \n\t"
"mov                    %5, %%"FF_REG_c" \n\t"
"mov                    %6, %%"FF_REG_D" \n\t"
PREFETCH"   (%%"FF_REG_c")               \n\t"
PREFETCH" 32(%%"FF_REG_c")               \n\t"
PREFETCH" 64(%%"FF_REG_c")               \n\t"
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
CALL_MMXEXT_FILTER_CODE
#if ARCH_X86_64
"mov                    %7, %%"FF_REG_a" \n\t"
"mov          %%"FF_REG_a", -8(%%rsp)    \n\t"
#else
#if defined(PIC)
"mov %7, %%"FF_REG_b"    \n\t"
#endif
#endif
:: "m" (VAR_4), "m" (VAR_1), "m" (filter), "m" (filterPos),
"m" (VAR_8), "m" (VAR_5), "m"(VAR_2)
#if ARCH_X86_64
,"m"(retsave)
#else
#if defined(PIC)
,"m" (ebxsave)
#endif
#endif
: "%"FF_REG_a, "%"FF_REG_c, "%"FF_REG_d, "%"FF_REG_S, "%"FF_REG_D
#if ARCH_X86_64 || !defined(PIC)
,"%"FF_REG_b
#endif
); for (VAR_9=VAR_3-1; (VAR_9*VAR_7)>>16 >=VAR_6-1; VAR_9--) { VAR_1[VAR_9] = VAR_4[VAR_6-1]*128; VAR_2[VAR_9] = VAR_5[VAR_6-1]*128; } }