diff options
author | konablend <[email protected]> | 2009-06-02 17:31:09 +0000 |
---|---|---|
committer | konablend <[email protected]> | 2009-06-02 17:31:09 +0000 |
commit | 9441e2cfde9537e00d5d192740bc7cf55b56d2b3 (patch) | |
tree | e903617680fc5dd0e6023d8aafff79fb0d0d955d /contrib | |
parent | b1fcb3154f5c09a81e0cf712fad9d22f4e8e89bc (diff) |
FFMPEG.
- bump ffmpeg from 0.5 (approx r17887) to r19067 (thanks van).
- fixed latm patch; latmaac input no longer crashes.
- removed P02-darwin-h264-dsp-crash.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2469 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ffmpeg/A00-latm.patch | 117 | ||||
-rw-r--r-- | contrib/ffmpeg/A01-mpegleak.patch | 18 | ||||
-rw-r--r-- | contrib/ffmpeg/P02-darwin-h264dsp-crash.patch | 13 | ||||
-rw-r--r-- | contrib/ffmpeg/module.defs | 7 |
4 files changed, 64 insertions, 91 deletions
diff --git a/contrib/ffmpeg/A00-latm.patch b/contrib/ffmpeg/A00-latm.patch index a286f4c19..b17c1145f 100644 --- a/contrib/ffmpeg/A00-latm.patch +++ b/contrib/ffmpeg/A00-latm.patch @@ -1,7 +1,7 @@ -diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile ---- ffmpeg.orig/libavcodec/Makefile 2008-12-01 01:40:36.000000000 -0500 -+++ ffmpeg/libavcodec/Makefile 2009-02-21 08:25:13.000000000 -0500 -@@ -338,7 +338,7 @@ +diff -Naur ffmpeg-r19067.orig/libavcodec/Makefile ffmpeg-r19067/libavcodec/Makefile +--- ffmpeg-r19067.orig/libavcodec/Makefile 2009-05-25 18:19:35.000000000 -0400 ++++ ffmpeg-r19067/libavcodec/Makefile 2009-06-01 12:39:48.000000000 -0400 +@@ -382,7 +382,7 @@ OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o OBJS-$(CONFIG_LIBFAAC) += libfaac.o @@ -9,8 +9,8 @@ diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile +OBJS-$(CONFIG_LIBFAAD) += libfaad.o latmaac.o OBJS-$(CONFIG_LIBGSM) += libgsm.o OBJS-$(CONFIG_LIBMP3LAME) += libmp3lame.o - OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o libschroedinger.o libdirac_libschro.o -@@ -350,7 +350,7 @@ + OBJS-$(CONFIG_LIBOPENJPEG) += libopenjpeg.o +@@ -395,7 +395,7 @@ OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o # parsers @@ -19,10 +19,10 @@ diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o aac_ac3_parser.o OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o -diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c ---- ffmpeg.orig/libavcodec/allcodecs.c 2008-12-01 01:40:36.000000000 -0500 -+++ ffmpeg/libavcodec/allcodecs.c 2009-02-21 08:25:13.000000000 -0500 -@@ -291,6 +291,7 @@ +diff -Naur ffmpeg-r19067.orig/libavcodec/allcodecs.c ffmpeg-r19067/libavcodec/allcodecs.c +--- ffmpeg-r19067.orig/libavcodec/allcodecs.c 2009-05-12 15:56:48.000000000 -0400 ++++ ffmpeg-r19067/libavcodec/allcodecs.c 2009-06-01 12:39:48.000000000 -0400 +@@ -306,6 +306,7 @@ REGISTER_ENCDEC (LIBDIRAC, libdirac); REGISTER_ENCODER (LIBFAAC, libfaac); REGISTER_DECODER (LIBFAAD, libfaad); @@ -30,7 +30,7 @@ diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c REGISTER_ENCDEC (LIBGSM, libgsm); REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms); REGISTER_ENCODER (LIBMP3LAME, libmp3lame); -@@ -303,6 +304,7 @@ +@@ -319,6 +320,7 @@ /* parsers */ REGISTER_PARSER (AAC, aac); @@ -38,10 +38,10 @@ diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c REGISTER_PARSER (AC3, ac3); REGISTER_PARSER (CAVSVIDEO, cavsvideo); REGISTER_PARSER (DCA, dca); -diff -Naur ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h ---- ffmpeg.orig/libavcodec/avcodec.h 2008-12-01 01:40:36.000000000 -0500 -+++ ffmpeg/libavcodec/avcodec.h 2009-02-21 08:25:13.000000000 -0500 -@@ -264,6 +264,7 @@ +diff -Naur ffmpeg-r19067.orig/libavcodec/avcodec.h ffmpeg-r19067/libavcodec/avcodec.h +--- ffmpeg-r19067.orig/libavcodec/avcodec.h 2009-05-31 02:51:18.000000000 -0400 ++++ ffmpeg-r19067/libavcodec/avcodec.h 2009-06-01 12:39:48.000000000 -0400 +@@ -271,6 +271,7 @@ CODEC_ID_MP2= 0x15000, CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3 CODEC_ID_AAC, @@ -49,9 +49,9 @@ diff -Naur ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h CODEC_ID_AC3, CODEC_ID_DTS, CODEC_ID_VORBIS, -diff -Naur ffmpeg.orig/libavcodec/latm_parser.c ffmpeg/libavcodec/latm_parser.c ---- ffmpeg.orig/libavcodec/latm_parser.c 1969-12-31 19:00:00.000000000 -0500 -+++ ffmpeg/libavcodec/latm_parser.c 2009-02-21 08:25:13.000000000 -0500 +diff -Naur ffmpeg-r19067.orig/libavcodec/latm_parser.c ffmpeg-r19067/libavcodec/latm_parser.c +--- ffmpeg-r19067.orig/libavcodec/latm_parser.c 1969-12-31 19:00:00.000000000 -0500 ++++ ffmpeg-r19067/libavcodec/latm_parser.c 2009-06-01 12:39:48.000000000 -0400 @@ -0,0 +1,128 @@ +/* + * LATM parser @@ -181,9 +181,9 @@ diff -Naur ffmpeg.orig/libavcodec/latm_parser.c ffmpeg/libavcodec/latm_parser.c + ff_parse_close, + latm_split, +}; -diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c ---- ffmpeg.orig/libavcodec/latmaac.c 1969-12-31 19:00:00.000000000 -0500 -+++ ffmpeg/libavcodec/latmaac.c 2009-02-21 08:25:13.000000000 -0500 +diff -Naur ffmpeg-r19067.orig/libavcodec/latmaac.c ffmpeg-r19067/libavcodec/latmaac.c +--- ffmpeg-r19067.orig/libavcodec/latmaac.c 1969-12-31 19:00:00.000000000 -0500 ++++ ffmpeg-r19067/libavcodec/latmaac.c 2009-06-01 12:39:48.000000000 -0400 @@ -0,0 +1,624 @@ +/* + * copyright (c) 2008 Paul Kendall <[email protected]> @@ -217,7 +217,8 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c +#include <sys/types.h> + +#include "parser.h" -+#include "bitstream.h" ++#include "get_bits.h" ++#include "put_bits.h" +#include "mpeg4audio.h" +#include "neaacdec.h" + @@ -778,13 +779,13 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c + +static int faac_decode_frame(AVCodecContext *avctx, + void *data, int *data_size, -+ uint8_t *buf, int buf_size) ++ AVPacket *avpkt) +{ + FAACContext *s = avctx->priv_data; + int ret; + + if (s->decoder == NULL) faac_decode_init(avctx); -+ ret = aac_filter_receive(s->decoder, data, data_size, buf, buf_size); ++ ret = aac_filter_receive(s->decoder, data, data_size, avpkt->data, avpkt->size); + aac_filter_getinfo(s->decoder, &(avctx->sample_rate), &(avctx->channels)); + return ret; +} @@ -808,11 +809,10 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c + .decode = faac_decode_frame, + .long_name = "AAC over LATM", +}; -+ -diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c ---- ffmpeg.orig/libavformat/mpeg.c 2008-10-02 12:03:00.000000000 -0400 -+++ ffmpeg/libavformat/mpeg.c 2009-02-21 08:25:13.000000000 -0500 -@@ -281,7 +281,7 @@ +diff -Naur ffmpeg-r19067.orig/libavformat/mpeg.c ffmpeg-r19067/libavformat/mpeg.c +--- ffmpeg-r19067.orig/libavformat/mpeg.c 2009-04-17 14:08:39.000000000 -0400 ++++ ffmpeg-r19067/libavformat/mpeg.c 2009-06-01 12:39:48.000000000 -0400 +@@ -279,7 +279,7 @@ /* find matching stream */ if (!((startcode >= 0x1c0 && startcode <= 0x1df) || (startcode >= 0x1e0 && startcode <= 0x1ef) || @@ -821,7 +821,7 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c goto redo; if (ppos) { *ppos = url_ftell(s->pb) - 4; -@@ -441,6 +441,9 @@ +@@ -446,6 +446,9 @@ } else if(es_type == STREAM_TYPE_AUDIO_AAC){ codec_id = CODEC_ID_AAC; type = CODEC_TYPE_AUDIO; @@ -831,9 +831,9 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){ codec_id = CODEC_ID_MPEG4; type = CODEC_TYPE_VIDEO; -diff -Naur ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h ---- ffmpeg.orig/libavformat/mpeg.h 2008-08-31 03:39:47.000000000 -0400 -+++ ffmpeg/libavformat/mpeg.h 2009-02-21 08:25:13.000000000 -0500 +diff -Naur ffmpeg-r19067.orig/libavformat/mpeg.h ffmpeg-r19067/libavformat/mpeg.h +--- ffmpeg-r19067.orig/libavformat/mpeg.h 2009-01-19 10:46:40.000000000 -0500 ++++ ffmpeg-r19067/libavformat/mpeg.h 2009-06-01 12:39:48.000000000 -0400 @@ -53,6 +53,7 @@ #define STREAM_TYPE_PRIVATE_DATA 0x06 #define STREAM_TYPE_AUDIO_AAC 0x0f @@ -842,41 +842,30 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h #define STREAM_TYPE_VIDEO_H264 0x1b #define STREAM_TYPE_AUDIO_AC3 0x81 -diff -Naur ffmpeg.orig/libavformat/mpegts.c ffmpeg/libavformat/mpegts.c ---- ffmpeg.orig/libavformat/mpegts.c 2008-10-02 12:28:58.000000000 -0400 -+++ ffmpeg/libavformat/mpegts.c 2009-02-21 08:25:13.000000000 -0500 -@@ -625,6 +625,7 @@ - case STREAM_TYPE_VIDEO_VC1: - case STREAM_TYPE_VIDEO_DIRAC: - case STREAM_TYPE_AUDIO_AAC: -+ case STREAM_TYPE_AUDIO_AAC_LATM: - case STREAM_TYPE_AUDIO_AC3: - case STREAM_TYPE_AUDIO_DTS: - case STREAM_TYPE_AUDIO_HDMV_DTS: -@@ -847,7 +848,7 @@ - code = pes->header[3] | 0x100; - if (!((code >= 0x1c0 && code <= 0x1df) || +diff -Naur ffmpeg-r19067.orig/libavformat/mpegts.c ffmpeg-r19067/libavformat/mpegts.c +--- ffmpeg-r19067.orig/libavformat/mpegts.c 2009-05-31 04:47:40.000000000 -0400 ++++ ffmpeg-r19067/libavformat/mpegts.c 2009-06-01 12:39:48.000000000 -0400 +@@ -495,6 +495,7 @@ + { 0x04, CODEC_TYPE_AUDIO, CODEC_ID_MP3 }, + { 0x0f, CODEC_TYPE_AUDIO, CODEC_ID_AAC }, + { 0x10, CODEC_TYPE_VIDEO, CODEC_ID_MPEG4 }, ++ { 0x11, CODEC_TYPE_AUDIO, CODEC_ID_AAC_LATM }, + { 0x1b, CODEC_TYPE_VIDEO, CODEC_ID_H264 }, + { 0xd1, CODEC_TYPE_VIDEO, CODEC_ID_DIRAC }, + { 0xea, CODEC_TYPE_VIDEO, CODEC_ID_VC1 }, +@@ -933,7 +934,7 @@ + if (pes->st->discard == AVDISCARD_ALL || + !((code >= 0x1c0 && code <= 0x1df) || (code >= 0x1e0 && code <= 0x1ef) || - (code == 0x1bd) || (code == 0x1fd))) + (code == 0x1bd) || (code == 0x1fa) || (code == 0x1fd))) goto skip; - if (!pes->st) { - /* allocate stream */ -@@ -968,6 +969,10 @@ - codec_type = CODEC_TYPE_AUDIO; - codec_id = CODEC_ID_AAC; - break; -+ case STREAM_TYPE_AUDIO_AAC_LATM: -+ codec_type = CODEC_TYPE_AUDIO; -+ codec_id = CODEC_ID_AAC_LATM; -+ break; - case STREAM_TYPE_AUDIO_AC3: - codec_type = CODEC_TYPE_AUDIO; - codec_id = CODEC_ID_AC3; -diff -Naur ffmpeg.orig/libavformat/mpegts.h ffmpeg/libavformat/mpegts.h ---- ffmpeg.orig/libavformat/mpegts.h 2008-08-31 03:39:47.000000000 -0400 -+++ ffmpeg/libavformat/mpegts.h 2009-02-21 08:25:13.000000000 -0500 -@@ -50,6 +50,7 @@ + pes->state = MPEGTS_PESHEADER_FILL; + pes->total_size = AV_RB16(pes->header + 4); +diff -Naur ffmpeg-r19067.orig/libavformat/mpegts.h ffmpeg-r19067/libavformat/mpegts.h +--- ffmpeg-r19067.orig/libavformat/mpegts.h 2009-05-30 23:02:12.000000000 -0400 ++++ ffmpeg-r19067/libavformat/mpegts.h 2009-06-01 12:39:48.000000000 -0400 +@@ -47,6 +47,7 @@ #define STREAM_TYPE_PRIVATE_DATA 0x06 #define STREAM_TYPE_AUDIO_AAC 0x0f #define STREAM_TYPE_VIDEO_MPEG4 0x10 diff --git a/contrib/ffmpeg/A01-mpegleak.patch b/contrib/ffmpeg/A01-mpegleak.patch index 36179ba57..d02365d44 100644 --- a/contrib/ffmpeg/A01-mpegleak.patch +++ b/contrib/ffmpeg/A01-mpegleak.patch @@ -1,7 +1,7 @@ -diff -Naur ffmpeg.orig/libavcodec/h264.c ffmpeg/libavcodec/h264.c ---- ffmpeg.orig/libavcodec/h264.c 2008-12-01 11:24:19.000000000 -0500 -+++ ffmpeg/libavcodec/h264.c 2009-02-21 08:23:58.000000000 -0500 -@@ -3298,7 +3298,7 @@ +diff -Naur ffmpeg-r19067.orig/libavcodec/h264.c ffmpeg-r19067/libavcodec/h264.c +--- ffmpeg-r19067.orig/libavcodec/h264.c 2009-05-29 20:24:20.000000000 -0400 ++++ ffmpeg-r19067/libavcodec/h264.c 2009-06-01 12:45:16.000000000 -0400 +@@ -3406,7 +3406,7 @@ * stream. Need to discard one frame. Prevents overrun of the * short_ref and long_ref buffers. */ @@ -10,7 +10,7 @@ diff -Naur ffmpeg.orig/libavcodec/h264.c ffmpeg/libavcodec/h264.c "number of reference frames exceeds max (probably " "corrupt input), discarding one\n"); -@@ -7556,7 +7556,7 @@ +@@ -7770,7 +7770,7 @@ if(!(s->flags2 & CODEC_FLAG2_CHUNKS) && !s->current_picture_ptr){ if (avctx->skip_frame >= AVDISCARD_NONREF || s->hurry_up) return 0; @@ -19,10 +19,10 @@ diff -Naur ffmpeg.orig/libavcodec/h264.c ffmpeg/libavcodec/h264.c return -1; } -diff -Naur ffmpeg.orig/libavcodec/mpegvideo.c ffmpeg/libavcodec/mpegvideo.c ---- ffmpeg.orig/libavcodec/mpegvideo.c 2008-10-01 20:27:09.000000000 -0400 -+++ ffmpeg/libavcodec/mpegvideo.c 2009-02-21 08:23:58.000000000 -0500 -@@ -779,19 +779,18 @@ +diff -Naur ffmpeg-r19067.orig/libavcodec/mpegvideo.c ffmpeg-r19067/libavcodec/mpegvideo.c +--- ffmpeg-r19067.orig/libavcodec/mpegvideo.c 2009-05-27 15:55:35.000000000 -0400 ++++ ffmpeg-r19067/libavcodec/mpegvideo.c 2009-06-01 12:45:16.000000000 -0400 +@@ -831,19 +831,18 @@ } av_log(s->avctx, AV_LOG_FATAL, "Internal error, picture buffer overflow\n"); diff --git a/contrib/ffmpeg/P02-darwin-h264dsp-crash.patch b/contrib/ffmpeg/P02-darwin-h264dsp-crash.patch deleted file mode 100644 index 7b5269fd6..000000000 --- a/contrib/ffmpeg/P02-darwin-h264dsp-crash.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ffmpeg/libavcodec/x86/dsputil_mmx.c -=================================================================== ---- ffmpeg/libavcodec/x86/dsputil_mmx.c (revision 14508) -+++ ffmpeg/libavcodec/x86/dsputil_mmx.c (working copy) -@@ -2907,6 +2907,8 @@ - c->vp6_filter_diag4 = ff_vp6_filter_diag4_sse2; - } - } -+#undef H264_QPEL_FUNCS -+#define H264_QPEL_FUNCS(x, y, CPU) - #if HAVE_SSSE3 - if(mm_flags & MM_SSSE3){ - H264_QPEL_FUNCS(1, 0, ssse3); diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 0a238ba7b..fd8ad7433 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -1,8 +1,7 @@ $(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,FAAD2)) $(eval $(call import.CONTRIB.defs,FFMPEG)) -FFMPEG.FETCH.url = http://download.m0k.org/handbrake/contrib/ffmpeg_0.5.tar.gz -FFMPEG.EXTRACT.tarbase = ffmpeg-0.5 +FFMPEG.FETCH.url = http://download.m0k.org/handbrake/contrib/ffmpeg-r19067.tar.bz2 FFMPEG.CONFIGURE.deps = FFMPEG.CONFIGURE.env = @@ -16,14 +15,13 @@ FFMPEG.CONFIGURE.extra = \ --disable-ffmpeg \ --disable-ffserver \ --disable-muxers \ - --disable-vhook \ + --disable-network \ --enable-encoder=ac3 \ --enable-encoder=mpeg4 \ --enable-encoder=snow \ --enable-gpl \ --enable-libfaad \ --enable-muxer=ipod \ - --enable-swscale \ --cc="$(FFMPEG.GCC.gcc)" \ --extra-cflags="$(call fn.ARGS,FFMPEG.GCC,*archs ?extra) -I$(call fn.ABSOLUTE,$(CONTRIB.build/)include)" \ --extra-ldflags="$(call fn.ARGS,FFMPEG.GCC,*archs ?extra) -L$(call fn.ABSOLUTE,$(CONTRIB.build/)lib)" @@ -52,4 +50,3 @@ endif ifeq (solaris,$(BUILD.system)) FFMPEG.CONFIGURE.extra += --disable-demuxer=mpc8 endif - |