ffmpeg 0.11: make it work with gcc2.

* Assembler code completely disabled for gcc2. Cross platform C code is
used instead, which means this needs more CPU than the 0.10.x branch
with asm enabled. But, at least it works.
* Redone the gcc2 support to make it more well behaved. Things that only
* need to be disabled for gcc2 are under a #if __GNUC__ > 2 check,
instead of #if 0. Also removed a lot of hacks to the configure script
that are not needed anymore.
* Since the patch for gcc2 should not create problems for the gcc4
version, use a single patch. The hack used to decide which patchset to
use did not work, because effectoiveTargetarchitecture was not set yet
when parsing the file to find the PATCHES variable.
* I leave this marked as broken for gcc2, because 0.11.5 was not updated
for years, while the ffmpeg team is still updating the 0.10.x branch
with regular releases. This means 0.10 gets bugfixes in the codecs, and
0.11 doesn't. We better use the latest codecs, even if we don't get the
latest API.
This commit is contained in:
Adrien Destugues
2015-08-30 11:09:57 +02:00
parent 6d8821bd51
commit 4f177d6f8e
4 changed files with 1064 additions and 1570 deletions

View File

@@ -11,18 +11,16 @@ SOURCE_URI="http://www.ffmpeg.org/releases/ffmpeg-0.11.5.tar.bz2"
CHECKSUM_SHA256="9492991f44d6757080f457c0aef83e68884dbfb925666806c7f7ea0389e5b8c0"
REVISION="2"
SOURCE_DIR="ffmpeg-$portVersion"
# WARNING: although this can be built with gcc2, the resulting binaries will
# crash when decoding h263 or h264 videos in MediaPlayer. So gcc2 is stuck with
# ffmpeg version 0.10. Do not unmark this as broken until the runtime issues are
# actually fixed.
# It works for gcc2, but we have to disable ASM optimizations. Moreover, the
# 0.10.x series gets more updates, so the interest of switching to 0.11 is
# very uncertain (we get a somewhat newer API which we don't use, and older
# codecs). So let's keep it "broken" for now, until we have a good reason to
# use APIs introduced in 0.11.
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="!x86_gcc2 !x86"
if [ $effectiveTargetArchitecture == x86_gcc2 ]; then
PATCHES="ffmpeg-0.11.5-gcc2.patch"
else
PATCHES="ffmpeg-0.11.5-gcc4.patch"
fi
PATCHES="ffmpeg-0.11.5.patchset"
PROVIDES="
ffmpeg_legacy$secondaryArchSuffix = $portVersion compat >= 0.11
@@ -64,6 +62,7 @@ REQUIRES_devel="
"
BUILD_REQUIRES="
devel:libbz2$secondaryArchSuffix
devel:libbz2$secondaryArchSuffix
devel:libogg$secondaryArchSuffix
devel:libspeex$secondaryArchSuffix
@@ -77,6 +76,7 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:awk
cmd:cmp
cmd:make
cmd:perl
cmd:pkg_config$secondaryArchSuffix
@@ -95,14 +95,23 @@ PATCH()
ffserver.c \
doc/ffserver.texi
# patch hard-coded paths to perl
sed -i "s,/usr/bin/perl,$portPackageLinksDir/cmd~perl/bin/perl," \
# patch hard-coded paths to perl (used during build only)
sed -i "s,/usr/bin/perl,/system/bin/perl," \
Doxyfile \
doc/texi2pod.pl
}
BUILD()
{
if [ "$effectiveTargetArchitecture" == "x86_gcc2" ]; then
extra_flags="--disable-asm --disable-stripping"
else
extra_flags="--disable-amd3dnow --disable-optimizations --disable-stripping \
--disable-decoder=rv30 --disable-decoder=rv40 --disable-decoder=svq3 \
--disable-decoder=vp8 --disable-decoder=h264 --disable-parser=h264 \
--disable-decoder=h263"
fi
# not an autotools configure
./configure \
--prefix=$prefix \
@@ -118,10 +127,7 @@ BUILD()
--enable-libspeex \
--enable-libtheora \
--enable-libvpx \
--disable-amd3dnow --disable-optimizations --disable-stripping \
--disable-decoder=rv30 --disable-decoder=rv40 --disable-decoder=svq3 \
--disable-decoder=vp8 --disable-decoder=h264 --disable-parser=h264 \
--disable-decoder=h263
$extra_flags
if [ "$effectiveTargetArchitecture" == "x86_64" ]; then
pic=-fPIC

File diff suppressed because it is too large Load Diff

View File

@@ -1,22 +0,0 @@
From c30864d40845001a62a3f160ad2e28b0612399e8 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 24 Oct 2014 11:03:59 +0200
Subject: Fix utf8 in documentation.
diff --git a/doc/filters.texi b/doc/filters.texi
index 324a154..7303a7d 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -2924,7 +2924,7 @@ Tile several successive frames together.
It accepts as argument the tile size (i.e. the number of lines and columns)
in the form "@var{w}x@var{h}".
-For example, produce 8×8 PNG tiles of all keyframes (@option{-skip_frame
+For example, produce 8x8 PNG tiles of all keyframes (@option{-skip_frame
nokey}) in a movie:
@example
ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
--
1.8.3.4

File diff suppressed because it is too large Load Diff