diff options
author | (no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98> | 2009-03-16 07:55:01 +0000 |
---|---|---|
committer | (no author) <(no author)@4d9a9b59-111c-4e0b-8f7a-7640551abb98> | 2009-03-16 07:55:01 +0000 |
commit | f1e95daae05c57d935b00e611c624c5e75cd21ec (patch) | |
tree | 4065ab51d9e64882d9001a59ede7d9a4e372a4a6 /media-video/ffmpeg |
uploading my overlay ), initial commit
git-svn-id: http://172.18.13.13/svn/sss_overlay@1 4d9a9b59-111c-4e0b-8f7a-7640551abb98
Diffstat (limited to 'media-video/ffmpeg')
19 files changed, 1392 insertions, 0 deletions
diff --git a/media-video/ffmpeg/ChangeLog b/media-video/ffmpeg/ChangeLog new file mode 100644 index 0000000..5278e05 --- /dev/null +++ b/media-video/ffmpeg/ChangeLog @@ -0,0 +1,143 @@ +# ChangeLog for media-video/ffmpeg +# Copyright 2006-2009 Berkano Overlay; distributed under the GPL version 2 + + 26 Jan 2009; Ben de Groot <yngwin@gentoo.org>; + +files/disable-version-rebranding-2009.01.patch, ffmpeg-20099999.ebuild: + Update patch + + 06 Jan 2009; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20099999.ebuild: + Adding X and gsm useflags + + 06 Jan 2009; Ben de Groot <yngwin@gentoo.org>; -ffmpeg-20080908.ebuild, + +ffmpeg-20099999.ebuild: + Add vdpau useflag + + 06 Nov 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999-r1.ebuild: + Remove ffmpeg-shared-gcc4.1.patch from live svn ebuild + + 21 Oct 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999-r1.ebuild: + Rekeywording live svn ebuild, as newer stuff is also unmasked in portage, + and updating the x264 dep. + + 09 Oct 2008; Ben de Groot <yngwin@gentoo.org>; + +files/disable-version-rebranding-2008.10.patch, + files/disable-version-rebranding-2008.patch, ffmpeg-20089999-r1.ebuild: + Restoring patch for 20080908 snapshot version. Renaming current patch for + 20089999 live ebuild. + + 08 Oct 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999-r1.ebuild: + Removing a52 useflag and dep as upstream has dropped support. + + 01 Oct 2008; Ben de Groot <yngwin@gentoo.org>; + files/disable-version-rebranding-2008.patch: + Updating patch + + 16 Sep 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999-r1.ebuild: + Dropping keywords for api/abi breaking version + + 16 Sep 2008; Ben de Groot <yngwin@gentoo.org>; +ffmpeg-20080908.ebuild, + +files/ffmpeg-x86-pic-fix-20080916.patch, -ffmpeg-20089999.ebuild, + +ffmpeg-20089999-r1.ebuild: + Adding ffmpeg-20080908 - latest revision before current API/ABI breakage, + and updating 20089999 with adjusted x86-pic patch. + + 06 Sep 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild, + +files/ffmpeg-icc.patch: + Adding icc patch and useflag + + 06 Sep 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Removing eac3 patching and useflag, as this is now part of the internal ac3 + codec. + + 22 Aug 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Changing eac3 patch to live svn checkout + + 19 Aug 2008; Ben de Groot <yngwin@gentoo.org>; + +files/ffmpeg-eac3_decoder-20080817.patch, ffmpeg-20089999.ebuild: + Adding new eac3 patch, removed the swscaler useflag and enabled swscale by + default. Also (temporarily) adding -D_BSD_SOURCE to fix a compile issue + reported on the forums. + + 10 Jul 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Added schroedinger useflag and dep for dirac support. + + 21 Jun 2008; Ben de Groot <yngwin@gentoo.org>; + files/disable-version-rebranding-2008.patch, ffmpeg-20089999.ebuild: + New versioning stuff as upstream changed things. + + 10 May 2008; Ben de Groot <yngwin@gentoo.org>; + files/ffmpeg-x86-pic-fix.patch, -ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Removing old ebuild, rekeywording the new one. Updated pic-fix patch. + + 18 Apr 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Current svn no longer needs libdir patch, so removed from ebuild. + + 17 Apr 2008; Ben de Groot <yngwin@gentoo.org>; files/ffmpeg-libdir.patch: + Fixing libdir patch for current version + + 12 Apr 2008; Ben de Groot <yngwin@gentoo.org>; + +files/disable-version-rebranding-2008.patch, ffmpeg-20089999.ebuild: + New disable-version-rebranding patch + + 12 Apr 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Adding hardcoded-tables useflag and broken relocations flag. + + 08 Apr 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Adjust x264 dep. + + 29 Mar 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20079999-r2.ebuild, + ffmpeg-20089999.ebuild: + Fix x264 dep to either in old ebuild. Update disable-stripping option in + current ebuild. + + 25 Mar 2008; Ben de Groot <yngwin@gentoo.org>; ffmpeg-20089999.ebuild: + Changing x264 dep to x264 || x264-svn. + + 11 Mar 2008; Ben de Groot <yngwin@gentoo.org>; +ffmpeg-20089999.ebuild: + Changed and added current configure options. Dropping keywords because at this + point most packages that depend on ffmpeg will not build against current svn. + + 17 Nov 2007; Ben de Groot (yngwin) <ben@berkano.net>; + ffmpeg-20079999-r2.ebuild: + Removed no longer valid libogg configure option. Removed ogg useflag. Libogg + is now a dependency with vorbis and theora useflags. Also made a few + cosmetic changes. + + 13 Sep 2007; Ben de Groot (yngwin) <ben@berkano.net>; + -ffmpeg-20069999-r1.ebuild, -ffmpeg-20069999-r2.ebuild, + -ffmpeg-20079999.ebuild, -ffmpeg-20079999-r1.ebuild, + ffmpeg-20079999-r2.ebuild: + Removing older ebuilds. Updating current ebuild with latest changes in + configure options. Adding ipv6 useflag. + + 07 Jun 2007; Ben de Groot; ffmpeg-20079999-r2.ebuild: + Updated renamed configure options for xvid and x264. + + 22 May 2007; Ben de Groot; +ffmpeg-20079999-r2.ebuild: + Removing dts useflag, as internal libavcodec is now used instead of libdts. + + 11 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild, + +files/ffmpeg-x86-pic-fix.patch: + Change x86 PIC fix to a more elegant patch. + + 10 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Adding -fPIC flag for x86 to fix assembly compilation borkage. + + 08 May 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Updated configure flags for libamr-(nb|wb). + + 30 Apr 2007; Ben de Groot; ffmpeg-20079999-r1.ebuild: + Removing no longer needed asm-pic patch from ebuild. + + 30 Apr 2007; Ben de Groot; +ffmpeg-20079999-r1.ebuild: + Recent svn uses external amr libs. Changed ebuild accordingly after adding + those external deps. USE-flag amr now replaced by amrnb and amrwb. + + 11 Apr 2007; torstenvdb; ffmpeg-20079999.ebuild: + Added ~sparc keyword to ffmpeg ebuild. + + 09 Apr 2007; Ben de Groot; ChangeLog: + Fixed ebuild with asm-pic.patch from official tree. + diff --git a/media-video/ffmpeg/Manifest b/media-video/ffmpeg/Manifest new file mode 100644 index 0000000..8acc156 --- /dev/null +++ b/media-video/ffmpeg/Manifest @@ -0,0 +1,18 @@ +AUX cabac-asm.patch 296 RMD160 b021017df231da679b83b9b8780ef7dc25af54a5 SHA1 3a391182010bbdb4c4f9651e4af31f8a63ad83be SHA256 5693364fc558ba94e6fe208954006c6d842d97c9be14ba2373429474dd471066 +AUX disable-version-rebranding-2008.10.patch 360 RMD160 61d5deb702fc05cc220877cab780571d91a65011 SHA1 3288b2e8af07ffcabc8f2b5626f34fb5585ebdf6 SHA256 ddd3a457683a53436bbd7286cfe3c8b9a6ebb3a5a4e0fd987021e668523fe9de +AUX disable-version-rebranding-2008.patch 343 RMD160 a95f4fe8bbfdf4c87948f1c578899a2619a222e0 SHA1 30c1a3656f3c8814fb3a510a3e60e04c519cb7a4 SHA256 b64298ab0e77e2f956e1000b13c62827a492ffd61501c7a273a71abf1da1418a +AUX disable-version-rebranding-2009.01.patch 376 RMD160 b182165b966c42594540da83b13cbcc7bc2d2939 SHA1 bf0ea92498005309809752d30e8d08e4d370ac49 SHA256 708f3e3ba2615242c0518e3f1132dea16d3bf6ed3e979d0b2b6477d761298d18 +AUX disable-version-rebranding.patch 308 RMD160 bdcc55c92302f0ff0f108038a49c09e4e2c8e907 SHA1 b1c319c16a60190ab4f92909b1d3f3b64dcc8834 SHA256 961a5d3c0b9e96f986de7956aa5a178175aa443684dc74167ef249a32e18efee +AUX ffmpeg-amr-64bit.patch 1161 RMD160 c3e17a8e8a3e501ae9ce8b8e455063444d1bc15f SHA1 e4f280a2934e238529ca8b0d8d2abec2638d9fb1 SHA256 f993ac1ad11e254d846fbd0b3f73f81043551fce90438fdd196374ca9ece6c9c +AUX ffmpeg-asm-pic.patch 2111 RMD160 3172d33b3f98933de028a279a55ceea488ab635a SHA1 1a60ea4599324bb29be2de818ee126804203b060 SHA256 a0799a9fda4312c468ec812af67e3a69f7e9f298f877734ce061dfaa4e5b1ce9 +AUX ffmpeg-eac3_decoder-20080817.patch 19284 RMD160 5f50814158a629db213a391c2550baa9fb98f32e SHA1 389dc7bdbfcbb43a9c9e83499366911f0dd5b41b SHA256 9e2eb69baa6e17dfcb151e93fd15a9a92d42cfd2c569ded2b24c82900b615045 +AUX ffmpeg-icc.patch 620 RMD160 9fa3f03b5b1f02f780861e3354907840cb7a885e SHA1 bd8ec19597199b88f4ccc951109bcc40ebf6467f SHA256 84dc49eb291aebf3f2ac1e63c0fee7b9fa7bc72b97e8e24ceb2f60e3dc6f523e +AUX ffmpeg-libdir-pic.patch 6027 RMD160 f66a87d1ea3662c7ab0b9010e0f19af49638161a SHA1 43be5652bf5dc70d46697e3ff6b1b3f30a02d501 SHA256 30b404aaf936f3ed6fe0a1f94d7f03982fef3524c94e4ca2b98d97133347ecc8 +AUX ffmpeg-libdir.patch 305 RMD160 5663aeafb2f8f078a14529f73375446eb5792c95 SHA1 ba0a90d85c4c2434283b60c97ff45dd4a77bff81 SHA256 3bb2f715b9bd15e30f07ee1481badf0631fe9fc42e1d39ea47ec6bce3274657c +AUX ffmpeg-shared-gcc4.1.patch 1667 RMD160 cf0318bcb812ad701e8cd55f10f59ca71933cf6c SHA1 0fd4d860efd8a0240fa66443429d8404d28a27dd SHA256 0bd67ed0cc1ea47c36756f5a66e504af4de85ce072c4b92083fb44065b5a3671 +AUX ffmpeg-soname-symlink.patch 4937 RMD160 3a3c83eb3e4bab26d039cd12bba938cf1a3f4f3b SHA1 77dbb66c84bc76dbb1b10b53b708c49f2d4a4c86 SHA256 0dc937f36d55e4c984dac967e1d0a4c261ebd6871f473dc2633a0a15332c5693 +AUX ffmpeg-unknown-options.patch 414 RMD160 46f7d8e81ab42368dabb6e29dec29a02d780055b SHA1 004e49a8461c5bf5923fd206e14d59a3e6b0ff84 SHA256 eb6f32617a42a9f55408ac64afd62c938aadb40bcf72c060a24ef5c426b4981b +AUX ffmpeg-x86-pic-fix-20080916.patch 349 RMD160 4c5cdce5679f5648f4fba2d997486906ed07d7fa SHA1 c064f92b3f89f8a55c50043ed39db67eb1614221 SHA256 a820a255b398b5d86e66c65defc82037bf17eafa5b7fa43f2e9cfc378a613195 +AUX ffmpeg-x86-pic-fix.patch 281 RMD160 61d334ed06f04836f5e1823e339117ab0c4b4db2 SHA1 27644f0320bb8a89f5ed9fcaedb339eef998173f SHA256 091f94eefa8ffa8cc370e512d362eb8d08338e14cca13f3776c785294d314286 +EBUILD ffmpeg-20099999.ebuild 6010 RMD160 8f54f86fe33a4bd225fb060a486fa6488795a1ec SHA1 f71569b685f57fc024aa3c28ab2a3a5419ff4673 SHA256 09bd40afd193cd3cf706a701954a5a90ef75149dc256bc3b55f14fe4b4028a42 +MISC ChangeLog 5881 RMD160 c96772a6c8180e3e44b11ce554490463c34ce4f5 SHA1 6881e2802771c4dd950e840cdb2c209e0d0df133 SHA256 98131cb6d000177ccddd87a9701539ffa734f36f2ca0da0a65f8d49bbe661e0b diff --git a/media-video/ffmpeg/ffmpeg-20099999.ebuild b/media-video/ffmpeg/ffmpeg-20099999.ebuild new file mode 100644 index 0000000..163aa36 --- /dev/null +++ b/media-video/ffmpeg/ffmpeg-20099999.ebuild @@ -0,0 +1,187 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="1" +inherit subversion eutils flag-o-matic multilib toolchain-funcs + +ESVN_REPO_URI="svn://svn.mplayerhq.hu/ffmpeg/trunk" +DESCRIPTION="Complete solution to record, convert and stream audio and video (source from SVN)" +HOMEPAGE="http://ffmpeg.org/" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc64 ~sparc ~x86" +IUSE="+aac altivec amrnb amrwb -bindist -debug dirac doc gsm + +hardcoded-tables icc ieee1394 imlib ipv6 mmx +mp3 network oss schroedinger + sdl test theora +threads +truetype v4l vdpau +vorbis X +x264 +xvid +zlib" + +RDEPEND="aac? ( media-libs/faad2 media-libs/faac ) + !bindist? ( + amrnb? ( media-libs/amrnb ) + amrwb? ( media-libs/amrwb ) + ) + dirac? ( media-video/dirac ) + gsm? ( >=media-sound/gsm-1.0.12-r1 ) + ieee1394? ( media-libs/libdc1394 + sys-libs/libraw1394 ) + imlib? ( media-libs/imlib2 ) + mp3? ( media-sound/lame ) + schroedinger? ( media-libs/schroedinger ) + sdl? ( >=media-libs/libsdl-1.2.10 ) + theora? ( media-libs/libtheora media-libs/libogg ) + truetype? ( >=media-libs/freetype-2 ) + vdpau? ( >=x11-drivers/nvidia-drivers-180.08 ) + vorbis? ( media-libs/libvorbis media-libs/libogg ) + X? ( x11-libs/libX11 x11-libs/libXext ) + x264? ( >=media-libs/x264-0.0.20081006 ) + xvid? ( >=media-libs/xvid-1.1.0 ) + zlib? ( sys-libs/zlib )" + +DEPEND="${RDEPEND} + doc? ( app-text/texi2html ) + mmx? ( dev-lang/yasm ) + test? ( net-misc/wget ) + v4l? ( sys-kernel/linux-headers )" + +S=${WORKDIR}/${PN} + +src_unpack() { + subversion_src_unpack + + # For Version Branding + cd "${ESVN_STORE_DIR}/${ESVN_CO_DIR}/${ESVN_PROJECT}/${ESVN_REPO_URI##*/}" + ./version.sh . version.h + mv version.h "${S}" + cd "${S}" + + # disable version rebranding +# epatch "${FILESDIR}/disable-version-rebranding-2009.01.patch" + + # Make it use pic always since we don't need textrels + sed -i -e "s:LIBOBJFLAGS=\"\":LIBOBJFLAGS=\'\$\(PIC\)\':" configure + + # To make sure the ffserver test will work + sed -i -e "s:-e debug=off::" tests/server-regression.sh + + epatch "${FILESDIR}"/ffmpeg-x86-pic-fix-20080916.patch + use icc && epatch "${FILESDIR}"/ffmpeg-icc.patch +} + +src_compile() { + #Note; library makefiles don't propogate flags from config.mak so + #use specified CFLAGS are only used in executables + replace-flags -O0 -O2 + #x86, what a wonderful arch.... + replace-flags -O1 -O2 + + # Append -fomit-frame-pointer to avoid some common issues + use debug || append-flags "-fomit-frame-pointer" + + # Append -DBROKEN_RELOCATIONS to build for bug 179872. + append-flags "-DBROKEN_RELOCATIONS" + + # temporary fix for bug reported at http://forums.gentoo.org/viewtopic-p-5186627.html#5186627 + append-flags "-D_BSD_SOURCE" + + local myconf="${EXTRA_ECONF}" + + # disable mmx accelerated code if not requested, or if PIC is required + # as the provided asm decidedly is not PIC. + if ( gcc-specs-pie || ! use mmx ) && ( ! use amd64 ); then + myconf="${myconf} --disable-mmx --disable-mmx2" + fi + + if use elibc_FreeBSD; then + myconf="${myconf} --enable-memalign-hack" + fi + + use amd64 && myconf="${myconf} --arch=x86_64 --cpu=athlon64" + + # enabled by default + use altivec || myconf="${myconf} --disable-altivec" + use debug || myconf="${myconf} --disable-debug" + use network || myconf="${myconf} --disable-network" + use ipv6 || myconf="${myconf} --disable-ipv6" + use zlib || myconf="${myconf} --disable-zlib" + use sdl || myconf="${myconf} --disable-ffplay" + + # disabled by default + use mp3 && myconf="${myconf} --enable-libmp3lame" + use ieee1394 && myconf="${myconf} --enable-libdc1394" + use threads && myconf="${myconf} --enable-pthreads" + use xvid && myconf="${myconf} --enable-libxvid" + use vorbis && myconf="${myconf} --enable-libvorbis" + use x264 && myconf="${myconf} --enable-libx264" + use theora && myconf="${myconf} --enable-libtheora" + use aac && myconf="${myconf} --enable-libfaad --enable-libfaac" + use hardcoded-tables && myconf="${myconf} --enable-hardcoded-tables" + use dirac && myconf="${myconf} --enable-libdirac" + use schroedinger && myconf="${myconf} --enable-libschroedinger" + use vdpau && myconf="${myconf} --enable-vdpau" + use X && myconf="${myconf} --enable-x11grab" + if use gsm; then + myconf="${myconf} --enable-libgsm" + append-flags -I/usr/include/gsm + fi + + if ! use bindist ; then + use amrnb && myconf="${myconf} --enable-libamr-nb --enable-nonfree" + use amrwb && myconf="${myconf} --enable-libamr-wb --enable-nonfree" + fi + + myconf="${myconf} --enable-gpl --enable-postproc --disable-stripping" + myconf="${myconf} --enable-avfilter --enable-avfilter-lavf" + + tc-is-cross-compiler && myconf="${myconf} --cross-compile --arch=$(tc-arch-kernel)" + + # Specific workarounds for too-few-registers arch... + if [[ $(tc-arch) == "x86" ]]; then + filter-flags -fforce-addr -momit-leaf-frame-pointer + append-flags -fomit-frame-pointer + is-flag -O? || append-flags -O2 + if use debug; then + # no need to warn about debug if not using debug flag + ewarn "" + ewarn "Debug information will be almost useless as the frame pointer is omitted." + ewarn "This makes debugging harder, so crashes that has no fixed behavior are" + ewarn "difficult to fix. Please have that in mind." + ewarn "" + fi + fi + + cd "${S}" + ./configure \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir) \ + --shlibdir=/usr/$(get_libdir) \ + --mandir=/usr/share/man \ + --enable-static --enable-shared \ + "--cc=$(tc-getCC)" \ + ${myconf} || die "configure failed" + + emake -j1 depend || die "depend failed" + emake || die "make failed" +} + +src_install() { + emake -j1 LDCONFIG=true DESTDIR=${D} install || die "Install Failed" + + use doc && emake -j1 documentation + dodoc Changelog README INSTALL + dodoc doc/* +} + +# Never die for now... +src_test() { + cd "${S}/tests" + for t in "codectest libavtest test-server" ; do + make ${t} || ewarn "Some tests in ${t} failed" + done +} + +pkg_postinst() { + echo + ewarn "ffmpeg may have had ABI changes, if ffmpeg based programs" + ewarn "like xine-lib or vlc stop working, please rebuild them." + echo +} diff --git a/media-video/ffmpeg/files/cabac-asm.patch b/media-video/ffmpeg/files/cabac-asm.patch new file mode 100755 index 0000000..8bbf3a9 --- /dev/null +++ b/media-video/ffmpeg/files/cabac-asm.patch @@ -0,0 +1,11 @@ +--- libavcodec/cabac.h.orig 2006-11-19 15:38:01.000000000 +0000 ++++ libavcodec/cabac.h 2006-11-19 15:48:57.000000000 +0000 +@@ -659,7 +659,7 @@ + + :"+c"(val) + :"r"(c) +- : "%eax", "%"REG_b, "%edx", "memory" ++ : "%eax", "%edx", "memory" + ); + return val; + #else diff --git a/media-video/ffmpeg/files/disable-version-rebranding-2008.10.patch b/media-video/ffmpeg/files/disable-version-rebranding-2008.10.patch new file mode 100644 index 0000000..ee7e948 --- /dev/null +++ b/media-video/ffmpeg/files/disable-version-rebranding-2008.10.patch @@ -0,0 +1,12 @@ +--- src/common.mak.orig 2008-06-22 00:25:48.000000000 +0200 ++++ src/common.mak 2008-06-22 00:28:54.000000000 +0200 +@@ -45,9 +45,6 @@ + $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) + endif + +-$(BUILD_ROOT_REL)/version.h: +- $(SRC_PATH)/version.sh $(SRC_PATH) $@ $(EXTRA_VERSION) +- + install: install-libs install-headers + + uninstall: uninstall-libs uninstall-headers diff --git a/media-video/ffmpeg/files/disable-version-rebranding-2008.patch b/media-video/ffmpeg/files/disable-version-rebranding-2008.patch new file mode 100644 index 0000000..d3a9461 --- /dev/null +++ b/media-video/ffmpeg/files/disable-version-rebranding-2008.patch @@ -0,0 +1,12 @@ +--- src/common.mak.orig 2008-06-22 00:25:48.000000000 +0200 ++++ src/common.mak 2008-06-22 00:28:54.000000000 +0200 +@@ -45,9 +45,6 @@ + $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) + endif + +-$(BUILD_ROOT_REL)/version.h: +- $(SRC_PATH)/version.sh $(SRC_PATH) $@ +- + install: install-libs install-headers + + uninstall: uninstall-libs uninstall-headers diff --git a/media-video/ffmpeg/files/disable-version-rebranding-2009.01.patch b/media-video/ffmpeg/files/disable-version-rebranding-2009.01.patch new file mode 100644 index 0000000..9cd7366 --- /dev/null +++ b/media-video/ffmpeg/files/disable-version-rebranding-2009.01.patch @@ -0,0 +1,12 @@ +--- ffmpeg/common.mak.orig 2009-01-26 20:24:53.000000000 +0100 ++++ ffmpeg/common.mak 2009-01-26 20:25:54.000000000 +0100 +@@ -48,9 +48,6 @@ + $(BUILD_ROOT_REL)/version.h: $(SVN_ENTRIES) + endif + +-$(BUILD_ROOT_REL)/version.h: $(SRC_PATH_BARE)/version.sh +- $< $(SRC_PATH) $@ $(EXTRA_VERSION) +- + install: install-libs install-headers + + uninstall: uninstall-libs uninstall-headers diff --git a/media-video/ffmpeg/files/disable-version-rebranding.patch b/media-video/ffmpeg/files/disable-version-rebranding.patch new file mode 100755 index 0000000..3763df5 --- /dev/null +++ b/media-video/ffmpeg/files/disable-version-rebranding.patch @@ -0,0 +1,12 @@ +--- Makefile.orig 2006-11-08 00:18:09.000000000 +0000 ++++ Makefile 2006-11-08 00:19:46.000000000 +0000 +@@ -90,9 +90,6 @@ + cp -p $< $@ + $(STRIP) $@ + +-version.h: +- $(SRC_PATH)/version.sh $(SRC_PATH) +- + output_example$(EXESUF): output_example.o .libs + $(CC) $(LDFLAGS) -o $@ output_example.o $(EXTRALIBS) + diff --git a/media-video/ffmpeg/files/ffmpeg-amr-64bit.patch b/media-video/ffmpeg/files/ffmpeg-amr-64bit.patch new file mode 100755 index 0000000..540ef94 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-amr-64bit.patch @@ -0,0 +1,27 @@ +diff --exclude-from=/home/dang/.diffrc -u -ruN ffmpeg-0.4.9-p20060302.orig/libavcodec/amr_float/typedef.h ffmpeg-0.4.9-p20060302/libavcodec/amr_float/typedef.h +--- ffmpeg-0.4.9-p20060302.orig/libavcodec/amr_float/typedef.h 2003-03-26 14:15:42.000000000 -0500 ++++ ffmpeg-0.4.9-p20060302/libavcodec/amr_float/typedef.h 2006-04-19 18:39:20.000000000 -0400 +@@ -16,7 +16,7 @@ + typedef char Word8;
+ typedef unsigned char UWord8;
+ typedef short Word16;
+-typedef long Word32;
++typedef int Word32;
+ typedef float Float32;
+ typedef double Float64;
+
+diff --exclude-from=/home/dang/.diffrc -u -ruN ffmpeg-0.4.9-p20060302.orig/libavcodec/amrwb_float/typedef.h ffmpeg-0.4.9-p20060302/libavcodec/amrwb_float/typedef.h +--- ffmpeg-0.4.9-p20060302.orig/libavcodec/amrwb_float/typedef.h 2003-02-18 00:00:02.000000000 -0500 ++++ ffmpeg-0.4.9-p20060302/libavcodec/amrwb_float/typedef.h 2006-04-19 18:37:30.000000000 -0400 +@@ -11,8 +11,8 @@ + typedef unsigned char UWord8;
+ typedef short Word16;
+ typedef unsigned short UWord16;
+-typedef long Word32;
++typedef int Word32;
+ typedef double Float64;
+ typedef float Float32;
+
+-#endif +\ No newline at end of file ++#endif
diff --git a/media-video/ffmpeg/files/ffmpeg-asm-pic.patch b/media-video/ffmpeg/files/ffmpeg-asm-pic.patch new file mode 100644 index 0000000..0cf16c3 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-asm-pic.patch @@ -0,0 +1,35 @@ +Index: ffmpeg/libavcodec/cabac.h +=================================================================== +--- ffmpeg.orig/libavcodec/cabac.h ++++ ffmpeg/libavcodec/cabac.h +@@ -376,7 +376,7 @@ static int av_always_inline get_cabac_in + #define BYTE "16" + #define BYTEEND "20" + #endif +-#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) ++#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) && !(defined(PIC) && defined(__GNUC__)) + int bit; + + #ifndef BRANCHLESS_CABAC_DECODER +@@ -680,7 +680,7 @@ static av_always_inline int get_cabac_by + + //FIXME the x86 code from this file should be moved into i386/h264 or cabac something.c/h (note ill kill you if you move my code away from under my fingers before iam finished with it!) + //FIXME use some macros to avoid duplicatin get_cabac (cant be done yet as that would make optimization work hard) +-#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) ++#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) && !(defined(PIC) && defined(__GNUC__)) + static int decode_significance_x86(CABACContext *c, int max_coeff, uint8_t *significant_coeff_ctx_base, int *index){ + void *end= significant_coeff_ctx_base + max_coeff - 1; + int minusstart= -(int)significant_coeff_ctx_base; +Index: ffmpeg/libavcodec/h264.c +=================================================================== +--- ffmpeg.orig/libavcodec/h264.c ++++ ffmpeg/libavcodec/h264.c +@@ -6111,7 +6111,7 @@ static int decode_cabac_residual( H264Co + index[coeff_count++] = last;\ + } + const uint8_t *sig_off = significant_coeff_flag_offset_8x8[MB_FIELD]; +-#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) ++#if defined(ARCH_X86) && defined(CONFIG_7REGS) && defined(CONFIG_EBX_AVAILABLE) && !(defined(PIC) && defined(__GNUC__)) + coeff_count= decode_significance_8x8_x86(CC, significant_coeff_ctx_base, index, sig_off); + } else { + coeff_count= decode_significance_x86(CC, max_coeff, significant_coeff_ctx_base, index); diff --git a/media-video/ffmpeg/files/ffmpeg-eac3_decoder-20080817.patch b/media-video/ffmpeg/files/ffmpeg-eac3_decoder-20080817.patch new file mode 100644 index 0000000..366414b --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-eac3_decoder-20080817.patch @@ -0,0 +1,506 @@ +Index: libavcodec/ac3dec.c +=================================================================== +--- libavcodec/ac3dec.c (revision 14819) ++++ libavcodec/ac3dec.c (working copy) +@@ -1,8 +1,10 @@ + /* + * AC-3 Audio Decoder +- * This code is developed as part of Google Summer of Code 2006 Program. ++ * This code was developed as part of Google Summer of Code 2006. ++ * E-AC-3 support was added as part of Google Summer of Code 2007. + * + * Copyright (c) 2006 Kartikey Mahendra BHATT (bhattkm at gmail dot com). ++ * Copyright (c) 2007-2008 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com> + * Copyright (c) 2007 Justin Ruggles <justin.ruggles@gmail.com> + * + * Portions of this code are derived from liba52 +@@ -37,8 +39,8 @@ + #include "ac3dec.h" + #include "ac3dec_data.h" + +-/** Maximum possible frame size when the specification limit is ignored */ +-#define AC3_MAX_FRAME_SIZE 21695 ++/** Large enough for maximum possible frame size when the specification limit is ignored */ ++#define AC3_FRAME_BUFFER_SIZE 32768 + + /** + * table for ungrouping 3 values in 7 bits. +@@ -215,7 +217,7 @@ + + /* allocate context input buffer */ + if (avctx->error_resilience >= FF_ER_CAREFUL) { +- s->input_buffer = av_mallocz(AC3_MAX_FRAME_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); ++ s->input_buffer = av_mallocz(AC3_FRAME_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); + if (!s->input_buffer) + return AVERROR_NOMEM; + } +@@ -302,10 +304,22 @@ + s->channel_in_cpl[s->lfe_ch] = 0; + } + +- if(hdr.bitstream_id > 10) +- return AC3_PARSE_ERROR_BSID; +- ++ if (hdr.bitstream_id <= 10) { ++ s->eac3 = 0; ++ s->snr_offset_strategy = 2; ++ s->block_switch_syntax = 1; ++ s->dither_flag_syntax = 1; ++ s->bit_allocation_syntax = 1; ++ s->fast_gain_syntax = 0; ++ s->first_cpl_leak = 0; ++ s->dba_syntax = 1; ++ s->skip_syntax = 1; ++ memset(s->channel_uses_aht, 0, sizeof(s->channel_uses_aht)); + return ac3_parse_header(s); ++ } else { ++ s->eac3 = 1; ++ return ff_eac3_parse_header(s); ++ } + } + + /** +@@ -428,7 +442,7 @@ + * Get the transform coefficients for a particular channel + * reference: Section 7.3 Quantization and Decoding of Mantissas + */ +-static void get_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_groups *m) ++static void ac3_get_transform_coeffs_ch(AC3DecodeContext *s, int ch_index, mant_groups *m) + { + GetBitContext *gbc = &s->gbc; + int i, gcode, tbap, start, end; +@@ -533,10 +547,27 @@ + } + } + ++static void get_transform_coeffs_ch(AC3DecodeContext *s, int blk, int ch, ++ mant_groups *m) ++{ ++ if (!s->channel_uses_aht[ch]) { ++ ac3_get_transform_coeffs_ch(s, ch, m); ++ } else { ++ /* if AHT is used, mantissas for all blocks are encoded in the first ++ block of the frame. */ ++ int bin; ++ if (!blk) ++ ff_eac3_get_transform_coeffs_aht_ch(s, ch); ++ for (bin = s->start_freq[ch]; bin < s->end_freq[ch]; bin++) { ++ s->fixed_coeffs[ch][bin] = s->pre_mantissa[ch][bin][blk] >> s->dexps[ch][bin]; ++ } ++ } ++} ++ + /** + * Get the transform coefficients. + */ +-static void get_transform_coeffs(AC3DecodeContext *s) ++static void get_transform_coeffs(AC3DecodeContext *s, int blk) + { + int ch, end; + int got_cplchan = 0; +@@ -546,12 +577,12 @@ + + for (ch = 1; ch <= s->channels; ch++) { + /* transform coefficients for full-bandwidth channel */ +- get_transform_coeffs_ch(s, ch, &m); ++ get_transform_coeffs_ch(s, blk, ch, &m); + /* tranform coefficients for coupling channel come right after the + coefficients for the first coupled channel*/ + if (s->channel_in_cpl[ch]) { + if (!got_cplchan) { +- get_transform_coeffs_ch(s, CPL_CH, &m); ++ get_transform_coeffs_ch(s, blk, CPL_CH, &m); + calc_transform_coeffs_cpl(s); + got_cplchan = 1; + } +@@ -657,7 +688,7 @@ + */ + static void ac3_upmix_delay(AC3DecodeContext *s) + { +- int channel_data_size = 128*sizeof(float); ++ int channel_data_size = sizeof(s->delay[0]); + switch(s->channel_mode) { + case AC3_CHMODE_DUALMONO: + case AC3_CHMODE_STEREO: +@@ -698,19 +729,23 @@ + + /* block switch flags */ + different_transforms = 0; ++ if (s->block_switch_syntax) { + for (ch = 1; ch <= fbw_channels; ch++) { + s->block_switch[ch] = get_bits1(gbc); + if(ch > 1 && s->block_switch[ch] != s->block_switch[1]) + different_transforms = 1; + } ++ } + + /* dithering flags */ ++ if (s->dither_flag_syntax) { + s->dither_all = 1; + for (ch = 1; ch <= fbw_channels; ch++) { + s->dither_flag[ch] = get_bits1(gbc); + if(!s->dither_flag[ch]) + s->dither_all = 0; + } ++ } + + /* dynamic range */ + i = !(s->channel_mode); +@@ -723,9 +758,23 @@ + } + } while(i--); + ++ /* spectral extension strategy */ ++ if (s->eac3 && (!blk || get_bits1(gbc))) { ++ if (get_bits1(gbc)) { ++ av_log_missing_feature(s->avctx, "Spectral extension", 1); ++ return -1; ++ } ++ /* TODO: parse spectral extension strategy info */ ++ } ++ ++ /* TODO: spectral extension coordinates */ ++ + /* coupling strategy */ +- if (get_bits1(gbc)) { ++ if (!s->eac3) ++ s->cpl_strategy_exists[blk] = get_bits1(gbc); ++ if (s->cpl_strategy_exists[blk]) { + memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); ++ if (!s->eac3) + s->cpl_in_use[blk] = get_bits1(gbc); + if (s->cpl_in_use[blk]) { + /* coupling in use */ +@@ -736,15 +785,28 @@ + return -1; + } + ++ /* check for enhanced coupling */ ++ if (s->eac3 && get_bits1(gbc)) { ++ /* TODO: parse enhanced coupling strategy info */ ++ av_log_missing_feature(s->avctx, "Enhanced coupling", 1); ++ return -1; ++ } ++ + /* determine which channels are coupled */ ++ if (s->eac3 && s->channel_mode == AC3_CHMODE_STEREO) { ++ s->channel_in_cpl[1] = 1; ++ s->channel_in_cpl[2] = 1; ++ } else { + for (ch = 1; ch <= fbw_channels; ch++) + s->channel_in_cpl[ch] = get_bits1(gbc); ++ } + + /* phase flags in use */ + if (channel_mode == AC3_CHMODE_STEREO) + s->phase_flags_in_use = get_bits1(gbc); + +- /* coupling frequency range and band structure */ ++ /* coupling frequency range */ ++ /* TODO: modify coupling end freq if spectral extension is used */ + cpl_begin_freq = get_bits(gbc, 4); + cpl_end_freq = get_bits(gbc, 4); + if (3 + cpl_end_freq - cpl_begin_freq < 0) { +@@ -754,24 +816,40 @@ + s->num_cpl_bands = s->num_cpl_subbands = 3 + cpl_end_freq - cpl_begin_freq; + s->start_freq[CPL_CH] = cpl_begin_freq * 12 + 37; + s->end_freq[CPL_CH] = cpl_end_freq * 12 + 73; ++ ++ /* coupling band structure */ ++ if (!s->eac3 || get_bits1(gbc)) { + for (bnd = 0; bnd < s->num_cpl_subbands - 1; bnd++) { +- if (get_bits1(gbc)) { +- s->cpl_band_struct[bnd] = 1; +- s->num_cpl_bands--; ++ s->cpl_band_struct[bnd] = get_bits1(gbc); + } ++ } else if (!blk) { ++ for (bnd = 0; bnd < s->num_cpl_subbands - 1; bnd++) { ++ s->cpl_band_struct[bnd] = ff_eac3_default_cpl_band_struct[bnd+cpl_begin_freq+1]; ++ } + } + s->cpl_band_struct[s->num_cpl_subbands-1] = 0; ++ ++ /* calculate number of coupling bands based on band structure */ ++ for (bnd = 0; bnd < s->num_cpl_subbands-1; bnd++) { ++ s->num_cpl_bands -= s->cpl_band_struct[bnd]; ++ } + } else { + /* coupling not in use */ +- for (ch = 1; ch <= fbw_channels; ch++) ++ for (ch = 1; ch <= fbw_channels; ch++) { + s->channel_in_cpl[ch] = 0; ++ s->first_cpl_coords[ch] = 1; ++ } ++ s->first_cpl_leak = 1; ++ s->phase_flags_in_use = 0; + } +- } else if (!blk) { ++ } else if (!s->eac3) { ++ if(!blk) { + av_log(s->avctx, AV_LOG_ERROR, "new coupling strategy must be present in block 0\n"); + return -1; + } else { + s->cpl_in_use[blk] = s->cpl_in_use[blk-1]; + } ++ } + cpl_in_use = s->cpl_in_use[blk]; + + /* coupling coordinates */ +@@ -780,7 +858,17 @@ + + for (ch = 1; ch <= fbw_channels; ch++) { + if (s->channel_in_cpl[ch]) { +- if (get_bits1(gbc)) { ++ int new_cpl_coords = 0; ++ ++ /* determine if coupling coordinates are new or reused */ ++ if (s->eac3 && s->first_cpl_coords[ch]) { ++ new_cpl_coords = 1; ++ s->first_cpl_coords[ch] = 0; ++ } else { ++ new_cpl_coords = get_bits1(gbc); ++ } ++ ++ if (new_cpl_coords) { + int master_cpl_coord, cpl_coord_exp, cpl_coord_mant; + cpl_coords_exist = 1; + master_cpl_coord = 3 * get_bits(gbc, 2); +@@ -797,6 +885,9 @@ + av_log(s->avctx, AV_LOG_ERROR, "new coupling coordinates must be present in block 0\n"); + return -1; + } ++ } else { ++ /* channel not in coupling */ ++ s->first_cpl_coords[ch] = 1; + } + } + /* phase flags */ +@@ -809,7 +900,7 @@ + + /* stereo rematrixing strategy and band structure */ + if (channel_mode == AC3_CHMODE_STEREO) { +- if (get_bits1(gbc)) { ++ if ((s->eac3 && !blk) || get_bits1(gbc)) { + s->num_rematrixing_bands = 4; + if(cpl_in_use && s->start_freq[CPL_CH] <= 61) + s->num_rematrixing_bands -= 1 + (s->start_freq[CPL_CH] == 37); +@@ -822,10 +913,14 @@ + } + + /* exponent strategies for each channel */ +- s->exp_strategy[blk][CPL_CH] = EXP_REUSE; +- s->exp_strategy[blk][s->lfe_ch] = EXP_REUSE; ++ if (!s->eac3) { ++ for (ch = !cpl_in_use; ch <= s->channels; ch++) { ++ s->exp_strategy[blk][ch] = get_bits(gbc, 2 - (ch == s->lfe_ch)); ++ } ++ } ++ ++ /* check exponent strategies to set bit allocation stages */ + for (ch = !cpl_in_use; ch <= s->channels; ch++) { +- s->exp_strategy[blk][ch] = get_bits(gbc, 2 - (ch == s->lfe_ch)); + if(s->exp_strategy[blk][ch] != EXP_REUSE) + bit_alloc_stages[ch] = 3; + } +@@ -852,7 +947,7 @@ + memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); + } + } +- if (cpl_in_use && s->exp_strategy[blk][CPL_CH] != EXP_REUSE) { ++ if (cpl_in_use) { + s->num_exp_groups[CPL_CH] = (s->end_freq[CPL_CH] - s->start_freq[CPL_CH]) / + (3 << (s->exp_strategy[blk][CPL_CH] - 1)); + } +@@ -870,6 +965,7 @@ + } + + /* bit allocation information */ ++ if (s->bit_allocation_syntax) { + if (get_bits1(gbc)) { + s->bit_alloc_params.slow_decay = ff_ac3_slow_decay_tab[get_bits(gbc, 2)] >> s->bit_alloc_params.sr_shift; + s->bit_alloc_params.fast_decay = ff_ac3_fast_decay_tab[get_bits(gbc, 2)] >> s->bit_alloc_params.sr_shift; +@@ -882,35 +978,78 @@ + av_log(s->avctx, AV_LOG_ERROR, "new bit allocation info must be present in block 0\n"); + return -1; + } ++ } + + /* signal-to-noise ratio offsets and fast gains (signal-to-mask ratios) */ +- if (get_bits1(gbc)) { ++ if (s->snr_offset_strategy && (!s->eac3 || !blk) && get_bits1(gbc)) { ++ int snr = 0; + int csnr; + csnr = (get_bits(gbc, 6) - 15) << 4; +- for (ch = !cpl_in_use; ch <= s->channels; ch++) { /* snr offset and fast gain */ +- s->snr_offset[ch] = (csnr + get_bits(gbc, 4)) << 2; +- s->fast_gain[ch] = ff_ac3_fast_gain_tab[get_bits(gbc, 3)]; ++ for (i = ch = !cpl_in_use; ch <= s->channels; ch++) { ++ /* snr offset */ ++ if (ch == i || s->snr_offset_strategy == 2) ++ snr = (csnr + get_bits(gbc, 4)) << 2; ++ /* run at least last bit allocation stage if snr offset changes */ ++ if(blk && s->snr_offset[ch] != snr) { ++ bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 1); ++ } ++ s->snr_offset[ch] = snr; ++ ++ /* fast gain (normal AC-3 only) */ ++ if (!s->eac3) { ++ int prev = s->fast_gain[ch]; ++ s->fast_gain[ch] = ff_ac3_fast_gain_tab[get_bits(gbc, 3)]; ++ /* run last 2 bit allocation stages if fast gain changes */ ++ if(blk && prev != s->fast_gain[ch]) ++ bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); ++ } + } +- memset(bit_alloc_stages, 3, AC3_MAX_CHANNELS); +- } else if (!blk) { ++ } else if (!s->eac3 && !blk) { + av_log(s->avctx, AV_LOG_ERROR, "new snr offsets must be present in block 0\n"); + return -1; + } + ++ /* fast gain (E-AC-3 only) */ ++ if (s->fast_gain_syntax && get_bits1(gbc)) { ++ for (ch = !cpl_in_use; ch <= s->channels; ch++) { ++ int prev = s->fast_gain[ch]; ++ s->fast_gain[ch] = ff_ac3_fast_gain_tab[get_bits(gbc, 3)]; ++ /* run last 2 bit allocation stages if fast gain changes */ ++ if(blk && prev != s->fast_gain[ch]) ++ bit_alloc_stages[ch] = FFMAX(bit_alloc_stages[ch], 2); ++ } ++ } else if (s->eac3 && !blk) { ++ for (ch = !cpl_in_use; ch <= s->channels; ch++) ++ s->fast_gain[ch] = ff_ac3_fast_gain_tab[4]; ++ } ++ ++ /* E-AC-3 to AC-3 converter SNR offset */ ++ if (s->frame_type == EAC3_FRAME_TYPE_INDEPENDENT && get_bits1(gbc)) { ++ skip_bits(gbc, 10); // skip converter snr offset ++ } ++ + /* coupling leak information */ + if (cpl_in_use) { +- if (get_bits1(gbc)) { ++ if (s->first_cpl_leak || get_bits1(gbc)) { ++ int prev_fl = s->bit_alloc_params.cpl_fast_leak; ++ int prev_sl = s->bit_alloc_params.cpl_slow_leak; + s->bit_alloc_params.cpl_fast_leak = get_bits(gbc, 3); + s->bit_alloc_params.cpl_slow_leak = get_bits(gbc, 3); ++ /* run last 2 bit allocation stages for coupling channel if ++ coupling leak changes */ ++ if(blk && (prev_fl != s->bit_alloc_params.cpl_fast_leak || ++ prev_sl != s->bit_alloc_params.cpl_slow_leak)) { + bit_alloc_stages[CPL_CH] = FFMAX(bit_alloc_stages[CPL_CH], 2); +- } else if (!blk) { ++ } ++ } else if (!s->eac3 && !blk) { + av_log(s->avctx, AV_LOG_ERROR, "new coupling leak info must be present in block 0\n"); + return -1; + } ++ s->first_cpl_leak = 0; + } + + /* delta bit allocation information */ +- if (get_bits1(gbc)) { ++ if (s->dba_syntax && get_bits1(gbc)) { + /* delta bit allocation exists (strategy) */ + for (ch = !cpl_in_use; ch <= fbw_channels; ch++) { + s->dba_mode[ch] = get_bits(gbc, 2); +@@ -959,16 +1098,18 @@ + } + if(bit_alloc_stages[ch] > 0) { + /* Compute bit allocation */ ++ const uint8_t *bap_tab = s->channel_uses_aht[ch] ? ++ ff_eac3_hebap_tab : ff_ac3_bap_tab; + ff_ac3_bit_alloc_calc_bap(s->mask[ch], s->psd[ch], + s->start_freq[ch], s->end_freq[ch], + s->snr_offset[ch], + s->bit_alloc_params.floor, +- ff_ac3_bap_tab, s->bap[ch]); ++ bap_tab, s->bap[ch]); + } + } + + /* unused dummy data */ +- if (get_bits1(gbc)) { ++ if (s->skip_syntax && get_bits1(gbc)) { + int skipl = get_bits(gbc, 9); + while(skipl--) + skip_bits(gbc, 8); +@@ -976,8 +1117,12 @@ + + /* unpack the transform coefficients + this also uncouples channels if coupling is in use. */ +- get_transform_coeffs(s); ++ get_transform_coeffs(s, blk); + ++ /* TODO: generate enhanced coupling coordinates and uncouple */ ++ ++ /* TODO: apply spectral extension */ ++ + /* recover coefficients if rematrixing is in use */ + if(s->channel_mode == AC3_CHMODE_STEREO) + do_rematrixing(s); +@@ -1042,7 +1187,7 @@ + if (s->input_buffer) { + /* copy input buffer to decoder context to avoid reading past the end + of the buffer, which can be caused by a damaged input stream. */ +- memcpy(s->input_buffer, buf, FFMIN(buf_size, AC3_MAX_FRAME_SIZE)); ++ memcpy(s->input_buffer, buf, FFMIN(buf_size, AC3_FRAME_BUFFER_SIZE)); + init_get_bits(&s->gbc, s->input_buffer, buf_size * 8); + } else { + init_get_bits(&s->gbc, buf, buf_size * 8); +@@ -1161,5 +1306,5 @@ + .init = ac3_decode_init, + .close = ac3_decode_end, + .decode = ac3_decode_frame, +- .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 / AC-3"), ++ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 (AC-3, E-AC-3)"), + }; +Index: libavcodec/ac3dec.h +=================================================================== +--- libavcodec/ac3dec.h (revision 14819) ++++ libavcodec/ac3dec.h (working copy) +@@ -168,4 +168,16 @@ + ///@} + } AC3DecodeContext; + ++/** ++ * Parse the E-AC-3 frame header. ++ * This parses both the bit stream info and audio frame header. ++ */ ++int ff_eac3_parse_header(AC3DecodeContext *s); ++ ++/** ++ * Decode mantissas in a single channel for the entire frame. ++ * This is used when AHT mode is enabled. ++ */ ++void ff_eac3_get_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch); ++ + #endif /* FFMPEG_AC3DEC_H */ +Index: libavcodec/Makefile +=================================================================== +--- libavcodec/Makefile (revision 14819) ++++ libavcodec/Makefile (working copy) +@@ -26,7 +26,7 @@ + OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o + + OBJS-$(CONFIG_AASC_DECODER) += aasc.o +-OBJS-$(CONFIG_AC3_DECODER) += ac3dec.o ac3tab.o ac3dec_data.o ac3.o mdct.o fft.o ++OBJS-$(CONFIG_AC3_DECODER) += eac3dec.o ac3dec.o ac3tab.o ac3dec_data.o ac3.o mdct.o fft.o + OBJS-$(CONFIG_AC3_ENCODER) += ac3enc.o ac3tab.o ac3.o + OBJS-$(CONFIG_ALAC_DECODER) += alac.o + OBJS-$(CONFIG_AMV_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o +Index: libavcodec/ac3enc.c +=================================================================== +--- libavcodec/ac3enc.c (revision 14819) ++++ libavcodec/ac3enc.c (working copy) +@@ -1365,5 +1365,5 @@ + AC3_encode_close, + NULL, + .sample_fmts = (enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE}, +- .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 / AC-3"), ++ .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52 (AC-3, E-AC-3)"), + }; diff --git a/media-video/ffmpeg/files/ffmpeg-icc.patch b/media-video/ffmpeg/files/ffmpeg-icc.patch new file mode 100644 index 0000000..18be12a --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-icc.patch @@ -0,0 +1,14 @@ +Index: libswscale/yuv2rgb.c +=================================================================== +--- libswscale/yuv2rgb.c (Revision 27482) ++++ libswscale/yuv2rgb.c (Arbeitskopie) +@@ -157,6 +157,9 @@ + + // The volatile is required because gcc otherwise optimizes some writes away + // not knowing that these are read in the ASM block. ++#ifdef __ICC ++#define static ++#endif + static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; + static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; + static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; diff --git a/media-video/ffmpeg/files/ffmpeg-libdir-pic.patch b/media-video/ffmpeg/files/ffmpeg-libdir-pic.patch new file mode 100755 index 0000000..7a0e42d --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-libdir-pic.patch @@ -0,0 +1,169 @@ +Index: configure +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v +retrieving revision 1.164 +diff -u -b -B -u -r1.164 configure +--- configure 9 Mar 2005 03:04:55 -0000 1.164 ++++ configure 15 Mar 2005 23:40:10 -0000 +@@ -13,6 +13,7 @@ + echo "Standard options:" + echo " --help print this message" + echo " --prefix=PREFIX install in PREFIX [$prefix]" ++echo " --libdir=DIR install libs in DIR [PREFIX/lib]" + echo " --mandir=DIR man documentation in DIR [PREFIX/man]" + echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]" + echo " --enable-ogg enable ogg support via libogg [default=no]" +@@ -91,6 +92,7 @@ + + # default parameters + prefix="/usr/local" ++libdir="" + mandir="" + bindir="" + cross_prefix="" +@@ -376,6 +378,8 @@ + case "$opt" in + --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` + ;; ++ --libdir=*) libdir=`echo $opt | cut -d '=' -f 2` ++ ;; + --mandir=*) mandir=`echo $opt | cut -d '=' -f 2` + ;; + --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` +@@ -1062,6 +1066,10 @@ + bindir="${prefix}/bin" + fi + ++if test x"$libdir" = x""; then ++libdir="${prefix}/lib" ++fi ++ + if test x"$mandir" = x""; then + mandir="${prefix}/man" + fi +@@ -1138,6 +1146,7 @@ + echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH + + echo "prefix=$prefix" >> config.mak ++echo "libdir=$libdir" >> config.mak + echo "bindir=$bindir" >> config.mak + echo "mandir=$mandir" >> config.mak + echo "MAKE=$make" >> config.mak +Index: libavcodec/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v +retrieving revision 1.177 +diff -u -b -B -u -r1.177 Makefile +--- libavcodec/Makefile 9 Mar 2005 19:46:31 -0000 1.177 ++++ libavcodec/Makefile 15 Mar 2005 23:40:10 -0000 +@@ -302,9 +302,9 @@ + ifeq ($(CONFIG_WIN32),yes) + install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)" + else +- install -d $(prefix)/lib +- install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavcodec-$(VERSION).so +- ln -sf libavcodec-$(VERSION).so $(prefix)/lib/libavcodec.so ++ install -d $(libdir) ++ install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavcodec-$(VERSION).so ++ ln -sf libavcodec-$(VERSION).so $(libdir)/libavcodec.so + ldconfig || true + endif + ifeq ($(CONFIG_PP),yes) +@@ -315,7 +315,7 @@ + endif + + installlib: all install-headers +- install -m 644 $(LIB) "$(prefix)/lib" ++ install -m 644 $(LIB) "$(libdir)" + + install-headers: + mkdir -p "$(prefix)/include/ffmpeg" +Index: libavcodec/libpostproc/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/libpostproc/Makefile,v +retrieving revision 1.19 +diff -u -b -B -u -r1.19 Makefile +--- libavcodec/libpostproc/Makefile 4 Feb 2005 03:29:50 -0000 1.19 ++++ libavcodec/libpostproc/Makefile 15 Mar 2005 23:40:11 -0000 +@@ -54,9 +54,9 @@ + ifeq ($(CONFIG_WIN32),yes) + install $(INSTALLSTRIP) -m 755 $(SPPLIB) "$(prefix)" + else +- install -d $(prefix)/lib +- install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(prefix)/lib/$(SPPLIB).$(SPPVERSION) +- ln -sf $(SPPLIB).$(SPPVERSION) $(prefix)/lib/$(SPPLIB) ++ install -d $(libdir) ++ install $(INSTALLSTRIP) -m 755 $(SPPLIB) $(libdir)/$(SPPLIB).$(SPPVERSION) ++ ln -sf $(SPPLIB).$(SPPVERSION) $(libdir)/$(SPPLIB) + ldconfig || true + endif + endif +Index: libavformat/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v +retrieving revision 1.84 +diff -u -b -B -u -r1.84 Makefile +--- libavformat/Makefile 15 Mar 2005 12:37:39 -0000 1.84 ++++ libavformat/Makefile 15 Mar 2005 23:40:11 -0000 +@@ -108,9 +108,9 @@ + ifeq ($(CONFIG_WIN32),yes) + install $(INSTALLSTRIP) -m 755 $(SLIB) "$(prefix)" + else +- install -d $(prefix)/lib +- install $(INSTALLSTRIP) -m 755 $(SLIB) $(prefix)/lib/libavformat-$(VERSION).so +- ln -sf libavformat-$(VERSION).so $(prefix)/lib/libavformat.so ++ install -d $(libdir) ++ install $(INSTALLSTRIP) -m 755 $(SLIB) $(libdir)/libavformat-$(VERSION).so ++ ln -sf libavformat-$(VERSION).so $(libdir)/libavformat.so + ldconfig || true + endif + else +@@ -118,7 +118,7 @@ + endif + + installlib: all install-headers +- install -m 644 $(LIB) "$(prefix)/lib" ++ install -m 644 $(LIB) "$(libdir)" + + install-headers: + mkdir -p "$(prefix)/include/ffmpeg" +Index: vhook/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/vhook/Makefile,v +retrieving revision 1.19 +diff -u -b -B -u -r1.19 Makefile +--- vhook/Makefile 25 Feb 2005 22:22:20 -0000 1.19 ++++ vhook/Makefile 15 Mar 2005 23:40:11 -0000 +@@ -26,8 +26,8 @@ + $(CC) -MM $(CFLAGS) $^ 1>.depend + + install: +- install -d "$(prefix)/lib/vhook" +- install -m 755 $(HOOKS) "$(prefix)/lib/vhook" ++ install -d "$(libdir)/vhook" ++ install -m 755 $(HOOKS) "$(libdir)/vhook" + + imlib2.so: imlib2.o + $(CC) -g -o $@ $(SHFLAGS) $< -lImlib2 +--- libavcodec/Makefile.orig 2005-03-18 06:10:21.000000000 +0900 ++++ libavcodec/Makefile 2005-03-18 06:17:04.000000000 +0900 +@@ -7,7 +7,7 @@ + VPATH=$(SRC_PATH)/libavcodec + + # NOTE: -I.. is needed to include config.h +-CFLAGS=$(OPTFLAGS) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE ++CFLAGS=$(OPTFLAGS) $(PIC) -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE + + OBJS= bitstream.o utils.o mem.o allcodecs.o \ + mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o\ +--- libavformat/Makefile.orig 2005-02-25 00:18:02.000000000 +0900 ++++ libavformat/Makefile 2005-03-18 06:17:22.000000000 +0900 +@@ -6,7 +6,7 @@ + + VPATH=$(SRC_PATH)/libavformat + +-CFLAGS=$(OPTFLAGS) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE ++CFLAGS=$(OPTFLAGS) $(PIC) -I.. -I$(SRC_PATH) -I$(SRC_PATH)/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE + + OBJS= utils.o cutils.o os_support.o allformats.o + PPOBJS= diff --git a/media-video/ffmpeg/files/ffmpeg-libdir.patch b/media-video/ffmpeg/files/ffmpeg-libdir.patch new file mode 100755 index 0000000..82b8838 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-libdir.patch @@ -0,0 +1,11 @@ +--- configure.orig 2007-01-20 10:18:40.000000000 -0800 ++++ configure 2007-01-20 10:20:31.000000000 -0800 +@@ -2093,7 +2093,7 @@ + cat <<EOF >$name.pc + prefix=$prefix + exec_prefix=\${prefix} +-libdir=\${exec_prefix}/lib ++libdir=\${exec_prefix}/GENTOOLIBDIR + includedir=\${prefix}/include + + Name: $name diff --git a/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch new file mode 100755 index 0000000..680c755 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-shared-gcc4.1.patch @@ -0,0 +1,40 @@ +--- ffmpeg.orig/libavcodec/i386/dsputil_mmx.c 2006-03-04 07:50:27.000000000 +0100 ++++ ffmpeg/libavcodec/i386/dsputil_mmx.c 2006-03-04 07:49:04.000000000 +0100 +@@ -619,10 +619,22 @@ + + static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){ + asm volatile( //FIXME could save 1 instruction if done as 8x4 ... +- "movd %4, %%mm0 \n\t" +- "movd %5, %%mm1 \n\t" +- "movd %6, %%mm2 \n\t" +- "movd %7, %%mm3 \n\t" ++ "movd %0, %%mm0 \n\t" ++ "movd %1, %%mm1 \n\t" ++ "movd %2, %%mm2 \n\t" ++ ++ : ++ : "m" (*(uint32_t*)(src + 0*src_stride)), ++ "m" (*(uint32_t*)(src + 1*src_stride)), ++ "m" (*(uint32_t*)(src + 2*src_stride)) ++ ); ++ asm volatile( //FIXME could save 1 instruction if done as 8x4 ... ++ "movd %0, %%mm3 \n\t" ++ ++ : ++ : "m" (*(uint32_t*)(src + 3*src_stride)) ++ ); ++ asm volatile( //FIXME could save 1 instruction if done as 8x4 ... + "punpcklbw %%mm1, %%mm0 \n\t" + "punpcklbw %%mm3, %%mm2 \n\t" + "movq %%mm0, %%mm1 \n\t" +@@ -639,10 +651,6 @@ + "=m" (*(uint32_t*)(dst + 1*dst_stride)), + "=m" (*(uint32_t*)(dst + 2*dst_stride)), + "=m" (*(uint32_t*)(dst + 3*dst_stride)) +- : "m" (*(uint32_t*)(src + 0*src_stride)), +- "m" (*(uint32_t*)(src + 1*src_stride)), +- "m" (*(uint32_t*)(src + 2*src_stride)), +- "m" (*(uint32_t*)(src + 3*src_stride)) + ); + } + diff --git a/media-video/ffmpeg/files/ffmpeg-soname-symlink.patch b/media-video/ffmpeg/files/ffmpeg-soname-symlink.patch new file mode 100755 index 0000000..9fd7713 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-soname-symlink.patch @@ -0,0 +1,146 @@ +Index: configure +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v +retrieving revision 1.219 +diff -u -r1.219 configure +--- configure 11 Dec 2005 00:45:33 -0000 1.219 ++++ configure 13 Dec 2005 16:16:02 -0000 +@@ -215,12 +215,12 @@ + dlfcn="no" + dlopen="no" + mpegaudio_hp="yes" +-SHFLAGS='-shared -Wl,-soname,$@.$(LIBVERSION)' ++SHFLAGS='-shared -Wl,-soname,$@.$(LIBMAJOR)' + netserver="no" + need_inet_aton="no" + ffserver="yes" + ffplay="yes" +-LIBOBJFLAGS="" ++LIBOBJFLAGS='$(PIC)' + LDFLAGS=-Wl,--warn-common + FFSLDFLAGS=-Wl,-E + LDCONFIG="ldconfig" +@@ -228,6 +228,8 @@ + LIBSUF=".a" + SLIBPREF="lib" + SLIBSUF=".so" ++SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)' ++SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)' + EXESUF="" + BUILDSUF="" + amr_nb="no" +@@ -339,6 +341,8 @@ + installstrip="" + LDFLAGS="-Wl,-dynamic,-search_paths_first" + SLIBSUF=".dylib" ++SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)' ++SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)' + FFSLDFLAGS=-Wl,-bind_at_load + ;; + MINGW32*) +@@ -1465,6 +1467,8 @@ + echo "LAVFVERSION=$lavf_version" >> config.mak + echo "LAVUMAJOR=${lavu_version/.*/}" >> config.mak + echo "LAVUVERSION=$lavu_version" >> config.mak ++ echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak ++ echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak + fi + echo "EXTRALIBS=$extralibs" >> config.mak + version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" | +Index: libavcodec/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/Makefile,v +retrieving revision 1.215 +diff -u -r1.215 Makefile +--- libavcodec/Makefile 10 Dec 2005 17:14:23 -0000 1.215 ++++ libavcodec/Makefile 13 Dec 2005 16:16:03 -0000 +@@ -488,14 +488,20 @@ + $(CC) -o $@ $^ $(LIBAVUTIL) -lm + + ifeq ($(BUILD_SHARED),yes) +-LIBVERSION=$(LAVCMAJOR) ++LIBVERSION=$(LAVCVERSION) ++LIBMAJOR=$(LAVCMAJOR) ++NAME=avcodec + install: all install-headers + ifeq ($(CONFIG_WIN32),yes) + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" + else + install -d $(libdir) +- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavcodec-$(VERSION)$(SLIBSUF) +- ln -sf libavcodec-$(VERSION)$(SLIBSUF) $(libdir)/libavcodec$(SLIBSUF) ++ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ ++ $(libdir)/$(SLIBNAME_WITH_VERSION) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME_WITH_MAJOR) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME) + $(LDCONFIG) || true + endif + ifeq ($(CONFIG_PP),yes) +Index: libavformat/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/Makefile,v +retrieving revision 1.103 +diff -u -r1.103 Makefile +--- libavformat/Makefile 10 Dec 2005 17:14:23 -0000 1.103 ++++ libavformat/Makefile 13 Dec 2005 16:16:03 -0000 +@@ -80,7 +80,9 @@ + + LIB= $(LIBPREF)avformat$(LIBSUF) + ifeq ($(BUILD_SHARED),yes) +-LIBVERSION=$(LAVFMAJOR) ++LIBVERSION=$(LAVFVERSION) ++LIBMAJOR=$(LAVFMAJOR) ++NAME=avformat + SLIBNAME= $(SLIBPREF)avformat$(SLIBSUF) + AVCLIBS+=-lavcodec$(BUILDSUF) -L../libavcodec -lavutil$(BUILDSUF) -L../libavutil + ifeq ($(CONFIG_DARWIN),yes) +@@ -114,8 +116,12 @@ + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" + else + install -d $(libdir) +- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/$(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) +- ln -sf $(SLIBPREF)avformat-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) ++ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ ++ $(libdir)/$(SLIBNAME_WITH_VERSION) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME_WITH_MAJOR) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME) + $(LDCONFIG) || true + endif + else +Index: libavutil/Makefile +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/libavutil/Makefile,v +retrieving revision 1.5 +diff -u -r1.5 Makefile +--- libavutil/Makefile 10 Dec 2005 17:14:24 -0000 1.5 ++++ libavutil/Makefile 13 Dec 2005 16:16:05 -0000 +@@ -22,7 +22,9 @@ + + LIB= $(LIBPREF)avutil$(LIBSUF) + ifeq ($(BUILD_SHARED),yes) +-LIBVERSION=$(LAVUMAJOR) ++LIBVERSION=$(LAVUVERSION) ++LIBMAJOR=$(LAVUMAJOR) ++NAME=avutil + SLIBNAME= $(SLIBPREF)avutil$(SLIBSUF) + ifeq ($(CONFIG_DARWIN),yes) + SHFLAGS += -Wl,-install_name,$(libdir)/$(SLIBNAME),-current_version,$(SPPVERSION),-compatibility_version,$(SPPVERSION) +@@ -65,8 +67,12 @@ + install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)" + else + install -d $(libdir) +- install $(INSTALLSTRIP) -m 755 $(SLIBNAME) $(libdir)/libavutil-$(VERSION)$(SLIBSUF) +- ln -sf libavutil-$(VERSION)$(SLIBSUF) $(libdir)/$(SLIBNAME) ++ install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \ ++ $(libdir)/$(SLIBNAME_WITH_VERSION) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME_WITH_MAJOR) ++ ln -sf $(SLIBNAME_WITH_VERSION) \ ++ $(libdir)/$(SLIBNAME) + $(LDCONFIG) || true + endif + else diff --git a/media-video/ffmpeg/files/ffmpeg-unknown-options.patch b/media-video/ffmpeg/files/ffmpeg-unknown-options.patch new file mode 100755 index 0000000..ca02e9b --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-unknown-options.patch @@ -0,0 +1,16 @@ +Index: configure +=================================================================== +RCS file: /cvsroot/ffmpeg/ffmpeg/configure,v +retrieving revision 1.215 +diff -u -r1.215 configure +--- configure 22 Oct 2005 19:17:39 -0000 1.215 ++++ configure 20 Nov 2005 17:07:53 -0000 +@@ -580,8 +580,6 @@ + ;; + *) + echo "Unknown option \"$opt\"." +- echo "See $0 --help for available options." +- exit 1 + ;; + esac + done diff --git a/media-video/ffmpeg/files/ffmpeg-x86-pic-fix-20080916.patch b/media-video/ffmpeg/files/ffmpeg-x86-pic-fix-20080916.patch new file mode 100644 index 0000000..58799b9 --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-x86-pic-fix-20080916.patch @@ -0,0 +1,11 @@ +--- orig/libavcodec/cabac.h 2008-09-16 21:49:38.000000000 +0200 ++++ ffmpeg/libavcodec/cabac.h 2008-09-16 21:49:03.000000000 +0200 +@@ -32,7 +32,7 @@ + //#undef NDEBUG + #include <assert.h> + #include "libavutil/x86_cpu.h" +- ++#define BROKEN_RELOCATIONS 1 + #define CABAC_BITS 16 + #define CABAC_MASK ((1<<CABAC_BITS)-1) + #define BRANCHLESS_CABAC_DECODER 1 diff --git a/media-video/ffmpeg/files/ffmpeg-x86-pic-fix.patch b/media-video/ffmpeg/files/ffmpeg-x86-pic-fix.patch new file mode 100644 index 0000000..8bcda2a --- /dev/null +++ b/media-video/ffmpeg/files/ffmpeg-x86-pic-fix.patch @@ -0,0 +1,10 @@ +--- orig/libavcodec/cabac.h 2008-05-10 17:28:08.000000000 +0200 ++++ ffmpeg/libavcodec/cabac.h 2008-05-10 17:29:24.000000000 +0200 +@@ -33,6 +33,7 @@ + #include <assert.h> + #ifdef ARCH_X86 + #include "libavutil/x86_cpu.h" ++#define BROKEN_RELOCATIONS 1 + #endif + + #define CABAC_BITS 16 |