Index: libswscale/yuv2rgb.c =================================================================== --- libswscale/yuv2rgb.c (Revision 23528) +++ libswscale/yuv2rgb.c (Arbeitskopie) @@ -179,23 +179,39 @@ 0x0602060206020602LL, 0x0004000400040004LL,}; +#if defined(RUNTIME_CPUDETECT) || !defined (MPLAYER_CONFIG_H) +#define COMPILE_MMX +#define COMPILE_MMX2 +#else +#ifdef HAVE_MMX +#define COMPILE_MMX +#endif +#ifdef HAVE_MMX2 +#define COMPILE_MMX2 +#endif +#endif + #undef HAVE_MMX //MMX versions +#ifdef COMPILE_MMX #undef RENAME #define HAVE_MMX #undef HAVE_MMX2 #undef HAVE_3DNOW #define RENAME(a) a ## _MMX #include "yuv2rgb_template.c" +#endif //MMX2 versions +#ifdef COMPILE_MMX2 #undef RENAME #define HAVE_MMX #define HAVE_MMX2 #undef HAVE_3DNOW #define RENAME(a) a ## _MMX2 #include "yuv2rgb_template.c" +#endif #endif /* defined(ARCH_X86) */ @@ -613,7 +629,7 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c) { -#if defined(HAVE_MMX2) || defined(HAVE_MMX) +#ifdef COMPILE_MMX2 if (c->flags & SWS_CPU_CAPS_MMX2){ switch(c->dstFormat){ case PIX_FMT_RGB32: return yuv420_rgb32_MMX2; @@ -622,6 +638,8 @@ case PIX_FMT_BGR555: return yuv420_rgb15_MMX2; } } +#endif +#ifdef COMPILE_MMX if (c->flags & SWS_CPU_CAPS_MMX){ switch(c->dstFormat){ case PIX_FMT_RGB32: return yuv420_rgb32_MMX; Index: libswscale/rgb2rgb.c =================================================================== --- libswscale/rgb2rgb.c (Revision 23528) +++ libswscale/rgb2rgb.c (Arbeitskopie) @@ -163,6 +163,22 @@ #define RU ((int)(-0.148*(1<