Author: rathann
Update of /cvs/free/rpms/ffmpeg/F-9
In directory se02.es.rpmfusion.net:/tmp/cvs-serv6974
Modified Files:
ffmpeg.spec
Added Files:
ffmpeg-r15415.patch ffmpeg-r16080.patch
Log Message:
* Sun Mar 08 2009 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.51.20080908
- backport support for Dirac in Matroska
- add comments for all patches
- enable yasm on x86_64, fix resulting textrels
- backport av_find_nearest_q_idx() for DVDStyler (bug #398)
- add missing obsoletes for ffmpeg-compat-devel (really fix bug #173)
- drop --disable-optimizations from configure call (loses performance)
- drop obsolete patch
ffmpeg-r15415.patch:
--- NEW FILE ffmpeg-r15415.patch ---
diff -up ffmpeg-20080908/libavutil/avutil.h.r15415 ffmpeg-20080908/libavutil/avutil.h
--- ffmpeg-20080908/libavutil/avutil.h.r15415 2008-09-04 22:39:09.000000000 +0200
+++ ffmpeg-20080908/libavutil/avutil.h 2009-03-08 18:24:13.000000000 +0100
@@ -35,7 +35,7 @@
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
#define LIBAVUTIL_VERSION_MAJOR 49
-#define LIBAVUTIL_VERSION_MINOR 10
+#define LIBAVUTIL_VERSION_MINOR 11
#define LIBAVUTIL_VERSION_MICRO 0
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
diff -up ffmpeg-20080908/libavutil/rational.c.r15415 ffmpeg-20080908/libavutil/rational.c
--- ffmpeg-20080908/libavutil/rational.c.r15415 2007-07-05 12:40:25.000000000 +0200
+++ ffmpeg-20080908/libavutil/rational.c 2009-03-08 18:24:13.000000000 +0100
@@ -101,3 +101,28 @@ AVRational av_d2q(double d, int max){
return a;
}
+
+int av_nearer_q(AVRational q, AVRational q1, AVRational q2)
+{
+ /* n/d is q, a/b is the median between q1 and q2 */
+ int64_t a = q1.num * (int64_t)q2.den + q2.num * (int64_t)q1.den;
+ int64_t b = 2 * (int64_t)q1.den * q2.den;
+
+ /* rnd_up(a*d/b) > n => a*d/b > n */
+ int64_t x_up = av_rescale_rnd(a, q.den, b, AV_ROUND_UP);
+
+ /* rnd_down(a*d/b) < n => a*d/b < n */
+ int64_t x_down = av_rescale_rnd(a, q.den, b, AV_ROUND_DOWN);
+
+ return ((x_up > q.num) - (x_down < q.num)) * av_cmp_q(q2, q1);
+}
+
+int av_find_nearest_q_idx(AVRational q, const AVRational* q_list)
+{
+ int i, nearest_q_idx = 0;
+ for(i=0; q_list[i].den; i++)
+ if (av_nearer_q(q, q_list[i], q_list[nearest_q_idx]) > 0)
+ nearest_q_idx = i;
+
+ return nearest_q_idx;
+}
diff -up ffmpeg-20080908/libavutil/rational.h.r15415 ffmpeg-20080908/libavutil/rational.h
--- ffmpeg-20080908/libavutil/rational.h.r15415 2008-08-31 09:39:47.000000000 +0200
+++ ffmpeg-20080908/libavutil/rational.h 2009-03-08 18:24:13.000000000 +0100
@@ -113,4 +113,17 @@ AVRational av_sub_q(AVRational b, AVRati
*/
AVRational av_d2q(double d, int max) av_const;
+/**
+ * @return 1 if \q1 is nearer to \p q than \p q2, -1 if \p q2 is nearer
+ * than \p q1, 0 if they have the same distance.
+ */
+int av_nearer_q(AVRational q, AVRational q1, AVRational q2);
+
+/**
+ * Finds the nearest value in \p q_list to \p q.
+ * @param q_list an array of rationals terminated by {0, 0}
+ * @return the index of the nearest value found in the array
+ */
+int av_find_nearest_q_idx(AVRational q, const AVRational* q_list);
+
#endif /* AVUTIL_RATIONAL_H */
ffmpeg-r16080.patch:
--- NEW FILE ffmpeg-r16080.patch ---
diff -up ffmpeg-20080908/libavformat/matroska.c.drc
ffmpeg-20080908/libavformat/matroska.c
--- ffmpeg-20080908/libavformat/matroska.c.drc 2008-09-01 17:50:12.000000000 +0200
+++ ffmpeg-20080908/libavformat/matroska.c 2009-02-09 21:09:21.000000000 +0100
@@ -23,6 +23,7 @@
const CodecTags ff_mkv_codec_tags[]={
{"V_UNCOMPRESSED" , CODEC_ID_RAWVIDEO},
+ {"V_DIRAC" , CODEC_ID_DIRAC},
{"V_MPEG4/ISO/ASP" , CODEC_ID_MPEG4},
{"V_MPEG4/ISO/SP" , CODEC_ID_MPEG4},
{"V_MPEG4/ISO/AP" , CODEC_ID_MPEG4},
Index: ffmpeg.spec
===================================================================
RCS file: /cvs/free/rpms/ffmpeg/F-9/ffmpeg.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ffmpeg.spec 4 Feb 2009 18:58:13 -0000 1.5
+++ ffmpeg.spec 8 Mar 2009 22:37:57 -0000 1.6
@@ -6,17 +6,25 @@
Summary: Digital VCR and streaming server
Name: ffmpeg
Version: 0.4.9
-Release: 0.50.%{svn}%{?dist}
+Release: 0.51.%{svn}%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL:
http://ffmpeg.org/
Source0:
http://rpm.greysector.net/livna/%{name}-%{svn}.tar.bz2
Source1: %{name}-snapshot.sh
+# backported .pc files generation fix
Patch0: %{name}-pkgconfig.patch
+# backported unconditional enabling of cmov on x86_64
Patch1: %{name}-cmov.patch
-Patch4: %{name}-asmreg.patch
+# backported support for Dirac in Matroska
+Patch2: %{name}-r16080.patch
+# get rid of textrels on x86_64 in yasm code
+Patch3: %{name}-textrel.patch
+# backported security fixes
Patch10: %{name}-r16802.patch
Patch11: %{name}-r16846.patch
+# backport av_find_nearest_q_idx for dvdstyler
+Patch12: %{name}-r15415.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%{?_with_amr:BuildRequires: amrnb-devel amrwb-devel}
@@ -35,8 +43,7 @@
BuildRequires: x264-devel >= 0.0.0-0.14.20080613
BuildRequires: xvidcore-devel
BuildRequires: zlib-devel
-#don't enable on x86_64 until PIC issues on are fixed (in
libavcodec/i386/fft_mmx.asm)
-%ifarch %{ix86}
+%ifarch %{ix86} x86_64
BuildRequires: yasm
%endif
@@ -65,6 +72,7 @@
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
Requires: pkgconfig
+Obsoletes: ffmpeg-compat-devel < 0.4.9-0.49
%description devel
FFMpeg is a complete and free Internet live audio and video
@@ -103,7 +111,6 @@
--enable-shared \\\
--enable-gpl \\\
--disable-debug \\\
- --disable-optimizations \\\
--disable-stripping
@@ -111,9 +118,11 @@
%setup -q -n %{name}-%{svn}
%patch0 -p1 -b .pkgconfig
%patch1 -p1 -b .cmov
-%patch4 -p1 -b .asmreg
+%patch2 -p1
+%patch3 -p1 -b .textrel
%patch10 -p1
%patch11 -p1
+%patch12 -p1
%build
mkdir generic
@@ -253,6 +262,15 @@
%changelog
+* Sun Mar 08 2009 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.51.20080908
+- backport support for Dirac in Matroska
+- add comments for all patches
+- enable yasm on x86_64, fix resulting textrels
+- backport av_find_nearest_q_idx() for DVDStyler (bug #398)
+- add missing obsoletes for ffmpeg-compat-devel (really fix bug #173)
+- drop --disable-optimizations from configure call (loses performance)
+- drop obsolete patch
+
* Wed Feb 04 2009 Dominik Mierzejewski <rpm at greysector.net> -
0.4.9-0.50.20080908
- fix pkgconfig file generation