changeset 29011:cb5e58bff64b

Simpler and more elegant fix to the x86_32/OSX+PIC build failure
author sdrik
date Tue, 24 Mar 2009 07:09:19 +0000
parents 48ec993fc291
children 8273eda1388c
files libswscale/yuv2rgb.c libswscale/yuv2rgb_template.c
diffstat 2 files changed, 4 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libswscale/yuv2rgb.c	Tue Mar 24 00:22:51 2009 +0000
+++ b/libswscale/yuv2rgb.c	Tue Mar 24 07:09:19 2009 +0000
@@ -508,11 +508,8 @@
         switch (c->dstFormat) {
         case PIX_FMT_RGB32:
             if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
-#if HAVE_7REGS
-                return yuva420_rgb32_MMX2;
-#else
+                if (HAVE_7REGS) return yuva420_rgb32_MMX2;
                 break;
-#endif
             }else return yuv420_rgb32_MMX2;
         case PIX_FMT_BGR24:  return yuv420_rgb24_MMX2;
         case PIX_FMT_RGB565: return yuv420_rgb16_MMX2;
@@ -523,11 +520,8 @@
         switch (c->dstFormat) {
         case PIX_FMT_RGB32:
             if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
-#if HAVE_7REGS
-                return yuva420_rgb32_MMX;
-#else
+                if (HAVE_7REGS) return yuva420_rgb32_MMX;
                 break;
-#endif
             }else return yuv420_rgb32_MMX;
         case PIX_FMT_BGR24:  return yuv420_rgb24_MMX;
         case PIX_FMT_RGB565: return yuv420_rgb16_MMX;
--- a/libswscale/yuv2rgb_template.c	Tue Mar 24 00:22:51 2009 +0000
+++ b/libswscale/yuv2rgb_template.c	Tue Mar 24 07:09:19 2009 +0000
@@ -465,9 +465,9 @@
     YUV2RGB_OPERANDS
 }
 
-#if HAVE_7REGS
 static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
                                         int srcSliceH, uint8_t* dst[], int dstStride[]){
+#if HAVE_7REGS
     int y, h_size;
 
     YUV2RGB_LOOP(4)
@@ -480,5 +480,5 @@
 
     YUV2RGB_ENDLOOP(4)
     YUV2RGB_OPERANDS_ALPHA
+#endif
 }
-#endif