static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width)

{

#ifdef HAVE_MMX

	asm volatile(

		"movq "MANGLE(bm01010101)", %%mm2\n\t"

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

		"1:				\n\t"

		"movq (%1, %%"REG_a",2), %%mm0	\n\t"

		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t"

		"pand %%mm2, %%mm0		\n\t"

		"pand %%mm2, %%mm1		\n\t"

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

		"movq %%mm0, (%2, %%"REG_a")	\n\t"

		"add $8, %%"REG_a"		\n\t"

		" js 1b				\n\t"

		: : "g" (-width), "r" (src+width*2), "r" (dst+width)

		: "%"REG_a

	);

#else

	int i;

	for(i=0; i<width; i++)

		dst[i]= src[2*i];

#endif

}

static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width)

{

#ifdef HAVE_MMX

	asm volatile(

		"movq "MANGLE(bm01010101)", %%mm2\n\t"

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

		"1:				\n\t"

		"movq (%1, %%"REG_a",2), %%mm0	\n\t"

		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t"

		"pand %%mm2, %%mm0		\n\t"

		"pand %%mm2, %%mm1		\n\t"

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

		"movq %%mm0, (%2, %%"REG_a")	\n\t"

		"add $8, %%"REG_a"		\n\t"

		" js 1b				\n\t"

		: : "g" (-width), "r" (src+width*2), "r" (dst+width)

		: "%"REG_a

	);

#else

	int i;

	for(i=0; i<width; i++)

		dst[i]= src[2*i];

#endif

}

	asm volatile( 		: "%"REG_a 	); 	int i; #endif #endif #endif #endif #endif 	int i; #endif #endif #endif #endif 	int i; #endif #endif #endif #endif #endif 	asm volatile( 		"movq "MANGLE(bm01010101)", %%mm2\n\t" 		"mov %0, %%"REG_a"		\n\t" 		"1:				\n\t" 		"movq (%1, %%"REG_a",2), %%mm0	\n\t" 		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t" 		"pand %%mm2, %%mm0		\n\t" 		"pand %%mm2, %%mm1		\n\t" 		"packuswb %%mm1, %%mm0		\n\t" 		"movq %%mm0, (%2, %%"REG_a")	\n\t" 		"add $8, %%"REG_a"		\n\t" 		" js 1b				\n\t" 		: : "g" (-width), "r" (src+width*2), "r" (dst+width) 		: "%"REG_a 	); 	int i; 	for(i=0; i<width; i++) 		dst[i]= src[2*i]; 	asm volatile( 		"mov %0, %%"REG_a"		\n\t" 		"1:				\n\t" 		"packuswb %%mm1, %%mm0		\n\t" 		" js 1b				\n\t" 		: "%"REG_a 	); 	int i; 	for(i=0; i<width; i++) #endif 	asm volatile( 		"mov %0, %%"REG_a"		\n\t" 		"1:				\n\t" 		"movq (%1, %%"REG_a",2), %%mm0	\n\t" 		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t" 		"packuswb %%mm1, %%mm0		\n\t" 		"movq %%mm0, (%2, %%"REG_a")	\n\t" 		"add $8, %%"REG_a"		\n\t" 		" js 1b				\n\t" 		: : "g" (-width), "r" (src+width*2), "r" (dst+width) 		: "%"REG_a 	); 	int i; 	for(i=0; i<width; i++) 	asm volatile( 		"mov %0, %%"REG_a"		\n\t" 		"1:				\n\t" 		"packuswb %%mm1, %%mm0		\n\t" 		" js 1b				\n\t" 		: "%"REG_a 	); 	int i; 	for(i=0; i<width; i++) #endif 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	asm volatile( 		"1:				\n\t" #endif #endif 		"add $8, %%"REG_a"		\n\t" 		" js 1b				\n\t" 	); 	int i; 	for(i=0; i<width; i++) 	asm volatile( 		"1:				\n\t" #endif #endif #endif #endif 		" js 1b				\n\t" 	); 	int i; 	for(i=0; i<width; i++) #endif 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) 	int i; 	for(i=0; i<width; i++) #endif #endif #endif #endif 	int i; 	int i; #endif #endif #endif 	asm volatile( 		"1:				\n\t" 	int i; 	int i; #endif #endif #endif 	asm volatile( 		"1:				\n\t" 	int i; #endif
static inline void FUNC_0(yuy2ToY)(uint8_t *dst, uint8_t *src, long width)

{

#ifdef HAVE_MMX

	asm volatile(

		"movq "MANGLE(bm01010101)", %%mm2\n\t"

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

		"1:				\n\t"

		"movq (%1, %%"REG_a",2), %%mm0	\n\t"

		"movq 8(%1, %%"REG_a",2), %%mm1	\n\t"

		"pand %%mm2, %%mm0		\n\t"

		"pand %%mm2, %%mm1		\n\t"

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

		"movq %%mm0, (%2, %%"REG_a")	\n\t"

		"add $8, %%"REG_a"		\n\t"

		" js 1b				\n\t"

		: : "g" (-width), "r" (src+width*2), "r" (dst+width)

		: "%"REG_a

	);

#else

	int VAR_0;

	for(VAR_0=0; VAR_0<width; VAR_0++)

		dst[VAR_0]= src[2*VAR_0];

#endif

}

static inline void FUNC_0(yuy2ToY)(uint8_t *dst, uint8_t *src, long width)
{ #ifdef HAVE_MMX
asm volatile(
"movq "MANGLE(bm01010101)", %%mm2\n\t"
"mov %0, %%"REG_a"		\n\t"
"1:				\n\t"
"movq (%1, %%"REG_a",2), %%mm0	\n\t"
"movq 8(%1, %%"REG_a",2), %%mm1	\n\t"
"pand %%mm2, %%mm0		\n\t"
"pand %%mm2, %%mm1		\n\t"
"packuswb %%mm1, %%mm0		\n\t"
"movq %%mm0, (%2, %%"REG_a")	\n\t"
"add $8, %%"REG_a"		\n\t"
" js 1b				\n\t"
: : "g" (-width), "r" (src+width*2), "r" (dst+width)
: "%"REG_a
); #else
int VAR_0; for(VAR_0=0; VAR_0<width; VAR_0++) dst[VAR_0]= src[2*VAR_0]; #endif
}