]> git.sesse.net Git - vlc/commitdiff
Compile FFmpeg on PowerPC-based machines without AltiVec support until it is fixed.
authorFelix Paul Kühne <fkuehne@videolan.org>
Thu, 24 Apr 2008 14:28:57 +0000 (16:28 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Thu, 24 Apr 2008 14:29:20 +0000 (16:29 +0200)
The attached patches fixed --disable-altivec for libswscale oO

extras/contrib/src/Makefile
extras/contrib/src/Patches/ffmpeg-fix-noaltivec.patch [new file with mode: 0644]

index efe23606447721f7865ab9bd33c7b725677367dc..f894366673075ee745fa54fde2e3e421b159f366 100644 (file)
@@ -151,6 +151,8 @@ ifdef HAVE_DARWIN_OS
 X264CONF += --enable-pic
 ifdef HAVE_DARWIN_OS_ON_INTEL
 FFMPEG_CFLAGS += -DHAVE_LRINTF
+else
+FFMPEGCONF += --disable-altivec
 endif
 endif
 
@@ -1050,6 +1052,7 @@ ifdef HAVE_BEOS
 endif
 ifdef HAVE_DARWIN_OS
        (cd $@; patch -p0 < ../Patches/ffmpeg-macosx-intel-mmx.patch)
+       (cd $@/libswscale; patch -p0 < ../../Patches/ffmpeg-fix-noaltivec.patch)
 endif
 ifdef NO_TEXT_RELOCATION
        (cd $@; patch -p1 < ../Patches/ffmpeg-svn-mmx_removal-darwin9.patch)
diff --git a/extras/contrib/src/Patches/ffmpeg-fix-noaltivec.patch b/extras/contrib/src/Patches/ffmpeg-fix-noaltivec.patch
new file mode 100644 (file)
index 0000000..8f79780
--- /dev/null
@@ -0,0 +1,27 @@
+Index: swscale.c
+===================================================================
+--- swscale.c  (revision 26515)
++++ swscale.c  (working copy)
+@@ -880,7 +880,7 @@
+ #endif
+ #ifdef ARCH_POWERPC
+-#if (defined (HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)) && defined (CONFIG_GPL)
++#if (defined (HAVE_ALTIVEC)) && defined (CONFIG_GPL)
+ #define COMPILE_ALTIVEC
+ #endif //HAVE_ALTIVEC
+ #endif //ARCH_POWERPC
+@@ -1553,11 +1553,13 @@
+ #else
+ #ifdef ARCH_POWERPC
++#ifdef COMPILE_ALTIVEC
+     if (flags & SWS_CPU_CAPS_ALTIVEC)
+         return swScale_altivec;
+     else
+         return swScale_C;
+ #endif
++#endif
+     return swScale_C;
+ #endif /* defined(ARCH_X86) */
+ #else //RUNTIME_CPUDETECT