From 0540882011119471d96071af22590705e07bd295 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 22 Jan 2013 20:37:35 +0100 Subject: [PATCH] - added utvideo patch (fixes build with utvideo 12) - enabled soxr support --- ffmpeg-utvideo.patch | 33 +++++++++++++++++++++++++++++++++ ffmpeg.spec | 11 +++++++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 ffmpeg-utvideo.patch diff --git a/ffmpeg-utvideo.patch b/ffmpeg-utvideo.patch new file mode 100644 index 0000000..90ed618 --- /dev/null +++ b/ffmpeg-utvideo.patch @@ -0,0 +1,33 @@ +--- ffmpeg-1.1/libavcodec/libutvideodec.cpp.orig 2013-01-06 22:53:29.000000000 +0100 ++++ ffmpeg-1.1/libavcodec/libutvideodec.cpp 2013-01-22 20:20:53.825406063 +0100 +@@ -61,11 +61,11 @@ static av_cold int utvideo_decode_init(A + break; + case MKTAG('U', 'L', 'R', 'G'): + avctx->pix_fmt = AV_PIX_FMT_BGR24; +- format = UTVF_RGB24_WIN; ++ format = UTVF_NFCC_BGR_BU; + break; + case MKTAG('U', 'L', 'R', 'A'): + avctx->pix_fmt = AV_PIX_FMT_RGB32; +- format = UTVF_RGB32_WIN; ++ format = UTVF_NFCC_BGRA_BU; + break; + default: + av_log(avctx, AV_LOG_ERROR, +--- ffmpeg-1.1/libavcodec/libutvideoenc.cpp.orig 2013-01-06 22:53:29.000000000 +0100 ++++ ffmpeg-1.1/libavcodec/libutvideoenc.cpp 2013-01-22 20:21:17.268738905 +0100 +@@ -51,12 +51,12 @@ static av_cold int utvideo_encode_init(A + avctx->codec_tag = MKTAG('U', 'L', 'Y', '2'); + break; + case AV_PIX_FMT_BGR24: +- in_format = UTVF_RGB24_WIN; ++ in_format = UTVF_NFCC_BGR_BU; + avctx->bits_per_coded_sample = 24; + avctx->codec_tag = MKTAG('U', 'L', 'R', 'G'); + break; + case AV_PIX_FMT_RGB32: +- in_format = UTVF_RGB32_WIN; ++ in_format = UTVF_NFCC_BGRA_BU; + avctx->bits_per_coded_sample = 32; + avctx->codec_tag = MKTAG('U', 'L', 'R', 'A'); + break; diff --git a/ffmpeg.spec b/ffmpeg.spec index bc53315..7dc8341 100644 --- a/ffmpeg.spec +++ b/ffmpeg.spec @@ -1,4 +1,3 @@ -# TODO: libsoxr [libsoxr, soxr.h] # # How to deal with ffmpeg/opencv checken-egg problem: # 1. make-request -r --without opencv ffmpeg.spec @@ -17,6 +16,7 @@ %bcond_without openal # OpenAL 1.1 capture support %bcond_without opencv # OpenCV video filtering %bcond_without pulseaudio # PulseAudio input support +%bcond_without soxr # SoX Resampler support %bcond_without x264 # x264 encoder %bcond_without utvideo # Ut Video decoder %bcond_without va # VAAPI (Video Acceleration API) @@ -41,6 +41,7 @@ Source3: ffserver.conf Patch0: %{name}-gsm.patch Patch1: %{name}-opencv24.patch Patch2: %{name}-cdio-paranoia.patch +Patch3: %{name}-utvideo.patch URL: http://www.ffmpeg.org/ %{?with_openal:BuildRequires: OpenAL-devel >= 1.1} BuildRequires: SDL-devel >= 1.2.1 @@ -97,12 +98,13 @@ BuildRequires: pkgconfig %{?with_pulseaudio:BuildRequires: pulseaudio-devel} BuildRequires: rpmbuild(macros) >= 1.470 BuildRequires: schroedinger-devel +%{?with_soxr:BuildRequires: soxr-devel} BuildRequires: speex-devel >= 1:1.2-rc1 %{?with_doc:BuildRequires: tetex} %{?with_doc:BuildRequires: texi2html} %{?with_doc:BuildRequires: texinfo} BuildRequires: twolame-devel -%{?with_utvideo:BuildRequires: utvideo-devel} +%{?with_utvideo:BuildRequires: utvideo-devel >= 12} BuildRequires: vo-aacenc-devel BuildRequires: vo-amrwbenc-devel %{?with_ilbc:BuildRequires: webrtc-libilbc-devel} @@ -117,6 +119,7 @@ BuildRequires: zlib-devel # overflows maximum hash table size BuildConflicts: pdksh < 5.2.14-57 Requires: %{name}-libs = %{version}-%{release} +%{?with_utvideo:Requires: utvideo >= 12} %{?with_ilbc:Requires: webrtc-libilbc} Requires: xvid >= 1:1.1.0 Obsoletes: libpostproc @@ -206,8 +209,10 @@ Requires: opencore-amr-devel %{?with_opencv:Requires: opencv-devel} Requires: openjpeg-devel >= 1.5 Requires: schroedinger-devel +%{?with_soxr:Requires: soxr-devel} Requires: speex-devel >= 1:1.2-rc1 Requires: twolame-devel +%{?with_utvideo:Requires: utvideo-devel >= 12} Requires: vo-aacenc-devel Requires: vo-amrwbenc-devel %{?with_ilbc:Requires: webrtc-libilbc-devel} @@ -278,6 +283,7 @@ dużej przestrzeni na dane skonfigurowanej w ffserver.conf). %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 # package the grep result for mplayer, the result formatted as ./mplayer/configure cat < ffmpeg-avconfig @@ -379,6 +385,7 @@ EOF %{?with_pulseaudio:--enable-libpulse} \ --enable-librtmp \ --enable-libschroedinger \ + %{?with_soxr:--enable-libsoxr} \ --enable-libspeex \ --enable-libtheora \ --enable-libtwolame \ -- 2.44.0