diff options
author | Rodeo <[email protected]> | 2012-12-31 16:54:11 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2012-12-31 16:54:11 +0000 |
commit | 01d1b85d7adecdc588d5450ee43c52809c0b1c3f (patch) | |
tree | 4f08f2381a18b4e62c4e5a82d7b610c68e8f1432 /contrib/ffmpeg | |
parent | b96ca4f7de03e2c1b2d6865a0ae65798c1afed6f (diff) |
Bump libav to v9_beta3.
Miscellaneous bugfixes and improvements.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5124 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r-- | contrib/ffmpeg/A01-swscale-assert.patch | 4 | ||||
-rw-r--r-- | contrib/ffmpeg/A02-channel-layout-order.patch | 16 | ||||
-rw-r--r-- | contrib/ffmpeg/A03-h264-recovery-point.patch | 14 | ||||
-rw-r--r-- | contrib/ffmpeg/A04-pgs-pts.patch | 84 | ||||
-rw-r--r-- | contrib/ffmpeg/A04-snow-use-videodspcontext.patch | 33 | ||||
-rw-r--r-- | contrib/ffmpeg/A05-mix-normalization.patch | 39 | ||||
-rw-r--r-- | contrib/ffmpeg/A06-fmac-scalar-asm.patch | 20 | ||||
-rw-r--r-- | contrib/ffmpeg/P01-solaris.patch | 14 | ||||
-rw-r--r-- | contrib/ffmpeg/P02-darwin-pic.patch | 8 | ||||
-rw-r--r-- | contrib/ffmpeg/module.defs | 10 |
10 files changed, 61 insertions, 181 deletions
diff --git a/contrib/ffmpeg/A01-swscale-assert.patch b/contrib/ffmpeg/A01-swscale-assert.patch index 8136a35b2..e0b6aad6b 100644 --- a/contrib/ffmpeg/A01-swscale-assert.patch +++ b/contrib/ffmpeg/A01-swscale-assert.patch @@ -1,8 +1,8 @@ diff --git a/libswscale/utils.c b/libswscale/utils.c -index d8fee58..b96a771 100644 +index e5e4d60..062ae01 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c -@@ -508,7 +508,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, +@@ -531,7 +531,9 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, // FIXME try to align filterPos if possible // fix borders diff --git a/contrib/ffmpeg/A02-channel-layout-order.patch b/contrib/ffmpeg/A02-channel-layout-order.patch index 2326e7d3e..ce57af038 100644 --- a/contrib/ffmpeg/A02-channel-layout-order.patch +++ b/contrib/ffmpeg/A02-channel-layout-order.patch @@ -1,20 +1,20 @@ diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c -index 91efaf3..e6c5c8e 100644 +index 3852f6e..c7217c8 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c -@@ -30,6 +30,7 @@ - #include "dsputil.h" +@@ -28,6 +28,7 @@ + + #include "avcodec.h" #include "libavutil/intreadwrite.h" ++#include "libavutil/channel_layout.h" #include "get_bits.h" -+#include "libavutil/audioconvert.h" + #include "internal.h" #include "libavutil/crc.h" - #include "parser.h" - #include "mlp_parser.h" -@@ -434,6 +435,28 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, +@@ -435,6 +436,28 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->ch_assign[ch_assign] = ch; } -+ if (m->avctx->codec_id == CODEC_ID_TRUEHD) { ++ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD) { + switch (m->avctx->channel_layout) { + case AV_CH_LAYOUT_6POINT1: + case (AV_CH_LAYOUT_6POINT1|AV_CH_TOP_CENTER): diff --git a/contrib/ffmpeg/A03-h264-recovery-point.patch b/contrib/ffmpeg/A03-h264-recovery-point.patch index d018dd6b1..bbd25ab46 100644 --- a/contrib/ffmpeg/A03-h264-recovery-point.patch +++ b/contrib/ffmpeg/A03-h264-recovery-point.patch @@ -1,16 +1,16 @@ diff --git a/libavcodec/h264.c b/libavcodec/h264.c -index 6ed251e..a3242ce 100644 +index 1a0b341..98a0350 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c -@@ -2627,6 +2627,7 @@ static void flush_dpb(AVCodecContext *avctx) - h->s.first_field = 0; - ff_h264_reset_sei(h); +@@ -2163,6 +2163,7 @@ static void flush_dpb(AVCodecContext *avctx) + + flush_change(h); ff_mpeg_flush(avctx); + h->recovery_frame= -1; } static int init_poc(H264Context *h) -@@ -4289,9 +4290,18 @@ again: +@@ -3976,9 +3977,18 @@ again: if ((err = decode_slice_header(hx, h))) break; @@ -32,10 +32,10 @@ index 6ed251e..a3242ce 100644 if (h->current_slice == 1) { if (!(s->flags2 & CODEC_FLAG2_CHUNKS)) diff --git a/libavcodec/h264.h b/libavcodec/h264.h -index 570ce2f..454b755 100644 +index 8596121..23daee3 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h -@@ -569,6 +569,13 @@ typedef struct H264Context { +@@ -568,6 +568,13 @@ typedef struct H264Context { * frames. */ int sei_recovery_frame_cnt; diff --git a/contrib/ffmpeg/A04-pgs-pts.patch b/contrib/ffmpeg/A04-pgs-pts.patch deleted file mode 100644 index fe6a6dc93..000000000 --- a/contrib/ffmpeg/A04-pgs-pts.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h -index 102df3a..aa40c78 100644 ---- a/libavcodec/avcodec.h -+++ b/libavcodec/avcodec.h -@@ -3093,6 +3093,7 @@ typedef struct AVSubtitle { - unsigned num_rects; - AVSubtitleRect **rects; - int64_t pts; ///< Same as packet pts, in AV_TIME_BASE -+ uint8_t forced; - } AVSubtitle; - - /** -diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c -index 3335412..3f14a2d 100644 ---- a/libavcodec/pgssubdec.c -+++ b/libavcodec/pgssubdec.c -@@ -45,6 +45,8 @@ typedef struct PGSSubPresentation { - int y; - int id_number; - int object_number; -+ uint8_t composition_flag; -+ int64_t pts; - } PGSSubPresentation; - - typedef struct PGSSubPicture { -@@ -271,7 +273,8 @@ static void parse_palette_segment(AVCodecContext *avctx, - * @todo TODO: Implement forcing of subtitles - */ - static void parse_presentation_segment(AVCodecContext *avctx, -- const uint8_t *buf, int buf_size) -+ const uint8_t *buf, int buf_size, -+ int64_t pts) - { - PGSSubContext *ctx = avctx->priv_data; - -@@ -280,6 +283,8 @@ static void parse_presentation_segment(AVCodecContext *avctx, - int w = bytestream_get_be16(&buf); - int h = bytestream_get_be16(&buf); - -+ ctx->presentation.pts = pts; -+ - av_dlog(avctx, "Video Dimensions %dx%d\n", - w, h); - if (av_image_check_size(w, h, 0, avctx) >= 0) -@@ -299,16 +304,17 @@ static void parse_presentation_segment(AVCodecContext *avctx, - buf += 3; - - ctx->presentation.object_number = bytestream_get_byte(&buf); -+ ctx->presentation.composition_flag = 0; - if (!ctx->presentation.object_number) - return; - - /* -- * Skip 4 bytes of unknown: -+ * Skip 3 bytes of unknown: - * object_id_ref (2 bytes), - * window_id_ref, -- * composition_flag (0x80 - object cropped, 0x40 - object forced) - */ -- buf += 4; -+ buf += 3; -+ ctx->presentation.composition_flag = bytestream_get_byte(&buf); - - x = bytestream_get_be16(&buf); - y = bytestream_get_be16(&buf); -@@ -356,6 +362,9 @@ static int display_end_segment(AVCodecContext *avctx, void *data, - */ - - memset(sub, 0, sizeof(*sub)); -+ sub->pts = ctx->presentation.pts; -+ sub->forced = (ctx->presentation.composition_flag & 0x40) != 0; -+ - // Blank if last object_number was 0. - // Note that this may be wrong for more complex subtitles. - if (!ctx->presentation.object_number) -@@ -441,7 +450,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, - parse_picture_segment(avctx, buf, segment_length); - break; - case PRESENTATION_SEGMENT: -- parse_presentation_segment(avctx, buf, segment_length); -+ parse_presentation_segment(avctx, buf, segment_length, avpkt->pts); - break; - case WINDOW_SEGMENT: - /* diff --git a/contrib/ffmpeg/A04-snow-use-videodspcontext.patch b/contrib/ffmpeg/A04-snow-use-videodspcontext.patch new file mode 100644 index 000000000..fc9a120b9 --- /dev/null +++ b/contrib/ffmpeg/A04-snow-use-videodspcontext.patch @@ -0,0 +1,33 @@ +diff --git a/libavcodec/snow.c b/libavcodec/snow.c +index b9dab45..153e5b2 100644 +--- a/libavcodec/snow.c ++++ b/libavcodec/snow.c +@@ -349,7 +349,7 @@ void ff_snow_pred_block(SnowContext *s, uint8_t *dst, uint8_t *tmp, int stride, + src += sx + sy*stride; + if( (unsigned)sx >= w - b_w - (HTAPS_MAX-2) + || (unsigned)sy >= h - b_h - (HTAPS_MAX-2)){ +- s->dsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h); ++ s->vdsp.emulated_edge_mc(tmp + MB_SIZE, src, stride, b_w+HTAPS_MAX-1, b_h+HTAPS_MAX-1, sx, sy, w, h); + src= tmp + MB_SIZE; + } + // assert(b_w == b_h || 2*b_w == b_h || b_w == 2*b_h); +@@ -402,6 +402,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ + s->max_ref_frames=1; //just make sure its not an invalid value in case of no initial keyframe + + ff_dsputil_init(&s->dsp, avctx); ++ ff_videodsp_init(&s->vdsp, 8); + ff_dwt_init(&s->dwt); + + #define mcf(dx,dy)\ +diff --git a/libavcodec/snow.h b/libavcodec/snow.h +index abf3309..b988115 100644 +--- a/libavcodec/snow.h ++++ b/libavcodec/snow.h +@@ -108,6 +108,7 @@ typedef struct SnowContext{ + AVCodecContext *avctx; + RangeCoder c; + DSPContext dsp; ++ VideoDSPContext vdsp; + DWTContext dwt; + AVFrame new_picture; + AVFrame input_picture; ///< new_picture with the internal linesizes diff --git a/contrib/ffmpeg/A05-mix-normalization.patch b/contrib/ffmpeg/A05-mix-normalization.patch deleted file mode 100644 index 06fb2754c..000000000 --- a/contrib/ffmpeg/A05-mix-normalization.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c -index 2c2a356..25f9f98 100644 ---- a/libavresample/audio_mix.c -+++ b/libavresample/audio_mix.c -@@ -327,7 +327,9 @@ int ff_audio_mix_init(AVAudioResampleContext *avr) - avr->out_channel_layout, - avr->center_mix_level, - avr->surround_mix_level, -- avr->lfe_mix_level, 1, matrix_dbl, -+ avr->lfe_mix_level, -+ avr->normalize_mix_level, -+ matrix_dbl, - avr->in_channels, - avr->matrix_encoding); - if (ret < 0) { -diff --git a/libavresample/internal.h b/libavresample/internal.h -index 7b7648f..006b6fd 100644 ---- a/libavresample/internal.h -+++ b/libavresample/internal.h -@@ -45,6 +45,7 @@ struct AVAudioResampleContext { - double center_mix_level; /**< center mix level */ - double surround_mix_level; /**< surround mix level */ - double lfe_mix_level; /**< lfe mix level */ -+ int normalize_mix_level; /**< enable mix level normalization */ - int force_resampling; /**< force resampling */ - int filter_size; /**< length of each FIR filter in the resampling filterbank relative to the cutoff frequency */ - int phase_shift; /**< log2 of the number of entries in the resampling polyphase filterbank */ -diff --git a/libavresample/options.c b/libavresample/options.c -index 02e1f86..e7e0c27 100644 ---- a/libavresample/options.c -+++ b/libavresample/options.c -@@ -47,6 +47,7 @@ static const AVOption options[] = { - { "center_mix_level", "Center Mix Level", OFFSET(center_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "surround_mix_level", "Surround Mix Level", OFFSET(surround_mix_level), AV_OPT_TYPE_DOUBLE, { M_SQRT1_2 }, -32.0, 32.0, PARAM }, - { "lfe_mix_level", "LFE Mix Level", OFFSET(lfe_mix_level), AV_OPT_TYPE_DOUBLE, { 0.0 }, -32.0, 32.0, PARAM }, -+ { "normalize_mix_level", "Normalize Mix Level", OFFSET(normalize_mix_level), AV_OPT_TYPE_INT, { 1 }, 0, 1, PARAM }, - { "force_resampling", "Force Resampling", OFFSET(force_resampling), AV_OPT_TYPE_INT, { 0 }, 0, 1, PARAM }, - { "filter_size", "Resampling Filter Size", OFFSET(filter_size), AV_OPT_TYPE_INT, { 16 }, 0, 32, /* ??? */ PARAM }, - { "phase_shift", "Resampling Phase Shift", OFFSET(phase_shift), AV_OPT_TYPE_INT, { 10 }, 0, 30, /* ??? */ PARAM }, diff --git a/contrib/ffmpeg/A06-fmac-scalar-asm.patch b/contrib/ffmpeg/A06-fmac-scalar-asm.patch deleted file mode 100644 index b0ca0f084..000000000 --- a/contrib/ffmpeg/A06-fmac-scalar-asm.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm -index c4e0c66..d379d8f 100644 ---- a/libavutil/x86/float_dsp.asm -+++ b/libavutil/x86/float_dsp.asm -@@ -60,12 +60,12 @@ cglobal vector_fmac_scalar, 3,3,3, dst, src, len - %else - cglobal vector_fmac_scalar, 4,4,3, dst, src, mul, len - %endif --%if WIN64 -- SWAP 0, 2 --%endif - %if ARCH_X86_32 - VBROADCASTSS m0, mulm - %else -+%if WIN64 -+ mova xmm0, xmm2 -+%endif - shufps xmm0, xmm0, 0 - %if cpuflag(avx) - vinsertf128 m0, m0, xmm0, 1 diff --git a/contrib/ffmpeg/P01-solaris.patch b/contrib/ffmpeg/P01-solaris.patch index 8266d0914..b97907941 100644 --- a/contrib/ffmpeg/P01-solaris.patch +++ b/contrib/ffmpeg/P01-solaris.patch @@ -1,18 +1,8 @@ diff --git a/configure b/configure -index 07baa2f..4597a0d 100755 +index 5355300..5ac7bc0 100755 --- a/configure +++ b/configure -@@ -54,6 +54,9 @@ if test "$E1" != 0 || test "$E2" = 0; then - exit 1 - fi - -+# Solaris must use the xpg4 version of grep -+PATH=/usr/xpg4/bin:$PATH -+ - show_help(){ - cat <<EOF - Usage: configure [options] -@@ -2688,7 +2691,7 @@ EOF +@@ -3146,7 +3146,7 @@ EOF check_cc <<EOF || die "endian test failed" unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; EOF diff --git a/contrib/ffmpeg/P02-darwin-pic.patch b/contrib/ffmpeg/P02-darwin-pic.patch index e9d8dfc00..576c23e79 100644 --- a/contrib/ffmpeg/P02-darwin-pic.patch +++ b/contrib/ffmpeg/P02-darwin-pic.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index 07baa2f..8a2a581 100755 +index 5355300..7ae7148 100755 --- a/configure +++ b/configure -@@ -2494,6 +2494,7 @@ case $target_os in +@@ -2868,6 +2868,7 @@ case $target_os in AVSERVERLDFLAGS=-Wl,-bind_at_load objformat="macho" enabled x86_64 && objformat="macho64" @@ -10,7 +10,7 @@ index 07baa2f..8a2a581 100755 enabled_any pic shared || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } ;; -@@ -2614,7 +2615,7 @@ esc(){ +@@ -3070,7 +3071,7 @@ esc(){ echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate @@ -18,4 +18,4 @@ index 07baa2f..8a2a581 100755 +#check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic set_default $PATHS_LIST - + set_default nm diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 54ac675f7..2c0d64bdc 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -1,13 +1,14 @@ $(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,YASM BZIP2 ZLIB)) $(eval $(call import.CONTRIB.defs,FFMPEG)) -FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v0.8-2551-gc83f44d.tar.bz2 +FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v9_beta3.tar.bz2 FFMPEG.CONFIGURE.deps = FFMPEG.CONFIGURE.env = FFMPEG.CONFIGURE.host = FFMPEG.CONFIGURE.extra = \ + --enable-gpl \ --disable-doc \ --disable-bsfs \ --disable-avconv \ @@ -19,13 +20,12 @@ FFMPEG.CONFIGURE.extra = \ --disable-network \ --disable-hwaccels \ --disable-encoders \ - --enable-encoder=flac \ - --enable-encoder=ac3 \ --enable-encoder=aac \ - --enable-encoder=mpeg4 \ + --enable-encoder=ac3 \ + --enable-encoder=flac \ --enable-encoder=mpeg2video \ + --enable-encoder=mpeg4 \ --enable-encoder=snow \ - --enable-gpl \ --enable-zlib \ --enable-bzlib \ --cc="$(FFMPEG.GCC.gcc)" \ |