From 527ff746d3933bc574f3e2f85d28c6f2b8a69a39 Mon Sep 17 00:00:00 2001 From: Dominik Mierzejewski Date: Sat, 16 Jan 2010 17:20:07 +0000 Subject: [PATCH] =?UTF-8?q?*=20Sat=20Jan=2016=202010=20Dominik=20Mierzejew?= =?UTF-8?q?ski=20=20-=200.5-6.20100116svn=20-?= =?UTF-8?q?=2020100116=20snapshot,=20requires=20recent=20x264=20-=20fix=20?= =?UTF-8?q?textrels=20on=20x86=5F64=20in=20a=20different=20way=20(patch=20?= =?UTF-8?q?by=20Reimar=20D=C3=B6ffinger)=20-=20use=20-mlongcall=20instead?= =?UTF-8?q?=20of=20-fPIC=20to=20fix=20rfbz#804,=20it's=20faster?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- ffmpeg-ppc-pic.patch | 18 ------------------ ffmpeg-snapshot.sh | 13 +++++++------ ffmpeg-textrel.patch | 45 ++++++++++++++++++++++++++++++++++++-------- ffmpeg.spec | 18 ++++++++++++------ sources | 2 +- 6 files changed, 58 insertions(+), 40 deletions(-) delete mode 100644 ffmpeg-ppc-pic.patch diff --git a/.gitignore b/.gitignore index 14bc52e..cfc044b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -ffmpeg-20091026.tar.bz2 +ffmpeg-20100116.tar.bz2 diff --git a/ffmpeg-ppc-pic.patch b/ffmpeg-ppc-pic.patch deleted file mode 100644 index 2ccbce1..0000000 --- a/ffmpeg-ppc-pic.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -up ffmpeg-20091026/configure~ ffmpeg-20091026/configure ---- ffmpeg-20091026/configure~ 2009-10-24 19:24:25.000000000 +0200 -+++ ffmpeg-20091026/configure 2009-11-07 16:35:15.000000000 +0100 -@@ -1805,12 +1805,14 @@ case "$arch" in - "Power Macintosh"|ppc|powerpc) - arch="ppc" - enable fast_unaligned -+ spic=$shared - ;; - ppc64) - arch="ppc" - subarch="ppc64" - enable fast_64bit - enable fast_unaligned -+ spic=$shared - ;; - s390|s390x) - arch="s390" diff --git a/ffmpeg-snapshot.sh b/ffmpeg-snapshot.sh index c3b8cb8..244654d 100644 --- a/ffmpeg-snapshot.sh +++ b/ffmpeg-snapshot.sh @@ -12,18 +12,19 @@ cleanup() { unset CDPATH pwd=$(pwd) -svn=$(date +%Y%m%d) -svn=20091019 +date=$(date +%Y%m%d) +svn={$date} +svn=HEAD cd "$tmp" -svn checkout -r {$svn} svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-$svn -cd ffmpeg-$svn +svn checkout -r $svn svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg-$date +cd ffmpeg-$date pushd libswscale -svn update -r {$svn} libswscale +svn update -r $svn libswscale popd ./version.sh . version.h find . -type d -name .svn -print0 | xargs -0r rm -rf sed -i -e '/^\.PHONY: version\.h$/d' Makefile cd .. -tar jcf "$pwd"/ffmpeg-$svn.tar.bz2 ffmpeg-$svn +tar jcf "$pwd"/ffmpeg-$date.tar.bz2 ffmpeg-$date cd - >/dev/null diff --git a/ffmpeg-textrel.patch b/ffmpeg-textrel.patch index ca37bf0..dccb046 100644 --- a/ffmpeg-textrel.patch +++ b/ffmpeg-textrel.patch @@ -1,12 +1,41 @@ -diff -up ffmpeg-0.5/libavcodec/x86/fft_mmx.asm.textrel ffmpeg-0.5/libavcodec/x86/fft_mmx.asm ---- ffmpeg-0.5/libavcodec/x86/fft_mmx.asm.textrel 2009-02-13 01:57:22.000000000 +0100 -+++ ffmpeg-0.5/libavcodec/x86/fft_mmx.asm 2009-03-10 22:09:16.000000000 +0100 -@@ -448,6 +448,8 @@ fft %+ n %+ %3%2: +diff -up ffmpeg-20100116/libavcodec/x86/fft_mmx.asm.textrel ffmpeg-20100116/libavcodec/x86/fft_mmx.asm +--- ffmpeg-20100116/libavcodec/x86/fft_mmx.asm.textrel 2010-01-16 14:24:37.000000000 +0100 ++++ ffmpeg-20100116/libavcodec/x86/fft_mmx.asm 2010-01-16 15:36:17.000000000 +0100 +@@ -419,18 +419,23 @@ DECL_PASS pass_interleave_3dn, PASS_BIG + %define pass_3dn2 pass_3dn + %define pass_interleave_3dn2 pass_interleave_3dn - %ifidn __OUTPUT_FORMAT__,macho64 - section .rodata ++%ifdef PIC ++%define SECTION_REL - $$ +%else -+section .data ++%define SECTION_REL ++%endif + + %macro DECL_FFT 2-3 ; nbits, cpu, suffix +-%xdefine list_of_fft fft4%2, fft8%2 ++%xdefine list_of_fft fft4%2 SECTION_REL, fft8%2 SECTION_REL + %if %1==5 +-%xdefine list_of_fft list_of_fft, fft16%2 ++%xdefine list_of_fft list_of_fft, fft16%2 SECTION_REL %endif - align 8 + %assign n 1<<%1 + %rep 17-%1 + %assign n2 n/2 + %assign n4 n/4 +-%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2 ++%xdefine list_of_fft list_of_fft, fft %+ n %+ %3%2 SECTION_REL + + align 16 + fft %+ n %+ %3%2: +@@ -462,6 +467,10 @@ section .text + cglobal fft_dispatch%3%2, 2,5,8, z, nbits + lea r2, [dispatch_tab%3%2 GLOBAL] + mov r2, [r2 + (nbitsq-2)*gprsize] ++%ifdef PIC ++ lea r3, [$$ GLOBAL] ++ add r2, r3 ++%endif + call r2 + RET + %endmacro ; DECL_FFT diff --git a/ffmpeg.spec b/ffmpeg.spec index 1e59841..247d971 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -1,12 +1,12 @@ # TODO: add make test to %%check section -%global svn 20091026 +%global svn 20100116 %global faad2min 1:2.6.1 Summary: Digital VCR and streaming server Name: ffmpeg Version: 0.5 -Release: 5.%{svn}svn%{?dist} +Release: 6.%{svn}svn%{?dist} %if 0%{?_with_opencore_amr:1} License: GPLv3+ %else @@ -18,8 +18,6 @@ Source0: http://rpms.kwizart.net/fedora/SOURCES/%{name}-%{svn}.tar.bz2 Source1: ffmpeg-snapshot.sh # get rid of textrels on x86_64 in yasm code Patch0: %{name}-textrel.patch -# compile with -fPIC on ppc/ppc64 (rf804) -Patch1: %{name}-ppc-pic.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bzip2-devel @@ -40,7 +38,7 @@ BuildRequires: schroedinger-devel BuildRequires: SDL-devel BuildRequires: speex-devel BuildRequires: texi2html -BuildRequires: x264-devel >= 0.0.0-0.26.20091026 +BuildRequires: x264-devel >= 0.0.0-0.27 BuildRequires: xvidcore-devel BuildRequires: zlib-devel %ifarch %{ix86} x86_64 @@ -122,9 +120,12 @@ This package contains development files for %{name} %prep %setup -q -n %{name}-%{svn} %patch0 -p1 -b .textrel -%patch1 -p1 -b .ppc-pic %build +%ifarch ppc ppc64 +# compile with -mlongcall on ppc/ppc64 (rf804) +export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -mlongcall" +%endif mkdir generic pushd generic %{ff_configure}\ @@ -227,6 +228,11 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Jan 16 2010 Dominik Mierzejewski - 0.5-6.20100116svn +- 20100116 snapshot, requires recent x264 +- fix textrels on x86_64 in a different way (patch by Reimar Döffinger) +- use -mlongcall instead of -fPIC to fix rfbz#804, it's faster + * Sat Nov 7 2009 Hans de Goede - 0.5-5.20091026svn - Add -fPIC -dPIC when compiling on ppc (rf804) diff --git a/sources b/sources index 00e81d9..d71fe6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d58be64ecdae72a659344133c50b7c1d ffmpeg-20091026.tar.bz2 +97e2c04175c6613810399ce65c4c3914 ffmpeg-20100116.tar.bz2