Fix build failure on x86_32 Mac OS X with PIC enabled
authorCédric Schieli <cschieli@gmail.com>
Sat, 21 Mar 2009 12:16:32 +0000 (12:16 +0000)
committerCédric Schieli <cschieli@gmail.com>
Sat, 21 Mar 2009 12:16:32 +0000 (12:16 +0000)
Originally committed as revision 29022 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/yuv2rgb.c
libswscale/yuv2rgb_template.c

index 00ed99b79ab9415dce5940a50afceb1c4538e88f..dbdf9d99b21bd9798536a70334bd3132342c7ffb 100644 (file)
@@ -508,7 +508,11 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
         switch (c->dstFormat) {
         case PIX_FMT_RGB32:
             if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
-                if (HAVE_7REGS) return yuva420_rgb32_MMX2;
+#if HAVE_7REGS
+                return yuva420_rgb32_MMX2;
+#else
+                break;
+#endif
             }else return yuv420_rgb32_MMX2;
         case PIX_FMT_BGR24:  return yuv420_rgb24_MMX2;
         case PIX_FMT_RGB565: return yuv420_rgb16_MMX2;
@@ -519,7 +523,11 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
         switch (c->dstFormat) {
         case PIX_FMT_RGB32:
             if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P){
-                if (HAVE_7REGS) return yuva420_rgb32_MMX;
+#if HAVE_7REGS
+                return yuva420_rgb32_MMX;
+#else
+                break;
+#endif
             }else return yuv420_rgb32_MMX;
         case PIX_FMT_BGR24:  return yuv420_rgb24_MMX;
         case PIX_FMT_RGB565: return yuv420_rgb16_MMX;
index 29d6cb73712c21e29ab242822cd14dce67f8a088..ec5aa0d263b9ab683171db496951685145e706e2 100644 (file)
@@ -465,6 +465,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
     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[]){
     int y, h_size;
@@ -480,3 +481,4 @@ static inline int RENAME(yuva420_rgb32)(SwsContext *c, uint8_t* src[], int srcSt
     YUV2RGB_ENDLOOP(4)
     YUV2RGB_OPERANDS_ALPHA
 }
+#endif