swscale: make filterPos 32bit.
[ffmpeg.git] / libswscale / x86 / yuv2rgb_mmx.c
index 23d4c42..0eaea77 100644 (file)
@@ -72,25 +72,27 @@ SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c)
         c->srcFormat != PIX_FMT_YUVA420P)
         return NULL;
 
-    if (HAVE_MMX2 && cpu_flags & AV_CPU_FLAG_MMX2) {
+#if HAVE_MMX2
+    if (cpu_flags & AV_CPU_FLAG_MMX2) {
         switch (c->dstFormat) {
         case PIX_FMT_RGB24:  return yuv420_rgb24_MMX2;
         case PIX_FMT_BGR24:  return yuv420_bgr24_MMX2;
         }
     }
+#endif
 
-    if (HAVE_MMX && cpu_flags & AV_CPU_FLAG_MMX) {
+    if (cpu_flags & AV_CPU_FLAG_MMX) {
         switch (c->dstFormat) {
             case PIX_FMT_RGB32:
-                if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
-#if HAVE_7REGS
+                if (c->srcFormat == PIX_FMT_YUVA420P) {
+#if HAVE_7REGS && CONFIG_SWSCALE_ALPHA
                     return yuva420_rgb32_MMX;
 #endif
                     break;
                 } else return yuv420_rgb32_MMX;
             case PIX_FMT_BGR32:
-                if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) {
-#if HAVE_7REGS
+                if (c->srcFormat == PIX_FMT_YUVA420P) {
+#if HAVE_7REGS && CONFIG_SWSCALE_ALPHA
                     return yuva420_bgr32_MMX;
 #endif
                     break;