[FFmpeg-cvslog] swscale: Fix compilation with --disable-mmx2.

Diego Biurrun git at videolan.org
Thu Jun 16 04:53:59 CEST 2011


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Wed Jun 15 00:52:43 2011 +0200| [97e057ff814c253c770f011736e33c0b65c9c663] | committer: Diego Biurrun

swscale: Fix compilation with --disable-mmx2.

Some MMX2 functions were being referenced without proper #ifdefs.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97e057ff814c253c770f011736e33c0b65c9c663
---

 libswscale/x86/swscale_mmx.c |    2 ++
 libswscale/x86/yuv2rgb_mmx.c |    4 +++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/libswscale/x86/swscale_mmx.c b/libswscale/x86/swscale_mmx.c
index c86f75d..f855a75 100644
--- a/libswscale/x86/swscale_mmx.c
+++ b/libswscale/x86/swscale_mmx.c
@@ -182,6 +182,8 @@ void ff_sws_init_swScale_mmx(SwsContext *c)
 
     if (cpu_flags & AV_CPU_FLAG_MMX)
         sws_init_swScale_MMX(c);
+#if HAVE_MMX2
     if (cpu_flags & AV_CPU_FLAG_MMX2)
         sws_init_swScale_MMX2(c);
+#endif
 }
diff --git a/libswscale/x86/yuv2rgb_mmx.c b/libswscale/x86/yuv2rgb_mmx.c
index 439482b..50f475a 100644
--- a/libswscale/x86/yuv2rgb_mmx.c
+++ b/libswscale/x86/yuv2rgb_mmx.c
@@ -72,12 +72,14 @@ 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) {
         switch (c->dstFormat) {



More information about the ffmpeg-cvslog mailing list