static void RENAME(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,

                                      long width, long height,

                                      long lumStride, long chromStride, long srcStride)

{

    long y;

    const long chromWidth= -((-width)>>1);



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

        RENAME(extract_even)(src, ydst, width);

        RENAME(extract_odd2)(src, udst, vdst, chromWidth);



        src += srcStride;

        ydst+= lumStride;

        udst+= chromStride;

        vdst+= chromStride;

    }

#if COMPILE_TEMPLATE_MMX

    __asm__(

            EMMS"       \n\t"

            SFENCE"     \n\t"

            ::: "memory"

        );

#endif

}

static void RENAME(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,

                                      long width, long height,

                                      long lumStride, long chromStride, long srcStride)

{

    long y;

    const long chromWidth= -((-width)>>1);



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

        RENAME(extract_even)(src, ydst, width);

        RENAME(extract_odd2)(src, udst, vdst, chromWidth);



        src += srcStride;

        ydst+= lumStride;

        udst+= chromStride;

        vdst+= chromStride;

    }

#if COMPILE_TEMPLATE_MMX

    __asm__(

            EMMS"       \n\t"

            SFENCE"     \n\t"

            ::: "memory"

        );

#endif

}

static void FUNC_0(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,

                                      long width, long height,

                                      long lumStride, long chromStride, long srcStride)

{

    long VAR_0;

    const long VAR_1= -((-width)>>1);



    for (VAR_0=0; VAR_0<height; VAR_0++) {

        FUNC_0(extract_even)(src, ydst, width);

        FUNC_0(extract_odd2)(src, udst, vdst, VAR_1);



        src += srcStride;

        ydst+= lumStride;

        udst+= chromStride;

        vdst+= chromStride;

    }

#if COMPILE_TEMPLATE_MMX

    __asm__(

            EMMS"       \n\t"

            SFENCE"     \n\t"

            ::: "memory"

        );

#endif

}

static void FUNC_0(yuyvtoyuv422)(uint8_t *ydst, uint8_t *udst, uint8_t *vdst, const uint8_t *src,
long width, long height,
long lumStride, long chromStride, long srcStride)
{ long VAR_0; const long VAR_1= -((-width)>>1); for (VAR_0=0; VAR_0<height; VAR_0++) { FUNC_0(extract_even)(src, ydst, width); FUNC_0(extract_odd2)(src, udst, vdst, VAR_1); src += srcStride; ydst+= lumStride; udst+= chromStride; vdst+= chromStride; } #if COMPILE_TEMPLATE_MMX
__asm__(
EMMS"       \n\t"
SFENCE"     \n\t"
::: "memory"
); #endif
}