From 60e60d99ad86300c4af535207ac6edd5049d2665 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Wed, 2 Jan 2013 20:16:39 +0100 Subject: [PATCH 1/3] forgotten changelogs for 9_beta2 --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index f9f0f7ed4d..cbcfe31b59 100644 --- a/Changelog +++ b/Changelog @@ -19,6 +19,8 @@ version 9_beta2: - metadata (INFO tag) support in WAV muxer - support for building DLLs using MSVC - remove avserver daemon mode +- support building on the Plan 9 operating system +- ffv1: support version 1.3 version 9_beta1: From 9ac44ad9d06f504aa7e53e0eb7480a40dce5d376 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Sat, 29 Dec 2012 19:30:12 +0100 Subject: [PATCH 2/3] h264: check SPS entries directly to detect pixel format changes Comparing AVCodecContext.pix_fmt against the get_pixel_format() return value has the side effect of calling the get_format() callback on each slice. Users of the callback will probably handle hardware accelerator initialization in the callback. --- libavcodec/h264.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index fae8440a1e..366059722f 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2592,7 +2592,6 @@ static int decode_slice_header(H264Context *h, H264Context *h0) int default_ref_list_done = 0; int last_pic_structure, last_pic_droppable; int needs_reinit = 0; - enum AVPixelFormat pix_fmt; /* FIXME: 2tap qpel isn't implemented for high bit depth. */ if ((s->avctx->flags2 & CODEC_FLAG2_FAST) && @@ -2669,8 +2668,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0) if (h->pps.sps_id != h->current_sps_id || h->context_reinitialized || h0->sps_buffers[h->pps.sps_id]->new) { + SPS *new_sps = h0->sps_buffers[h->pps.sps_id]; + h0->sps_buffers[h->pps.sps_id]->new = 0; + if (h->sps.chroma_format_idc != new_sps->chroma_format_idc || + h->sps.bit_depth_luma != new_sps->bit_depth_luma) + needs_reinit = 1; + h->current_sps_id = h->pps.sps_id; h->sps = *h0->sps_buffers[h->pps.sps_id]; @@ -2709,24 +2714,17 @@ static int decode_slice_header(H264Context *h, H264Context *h0) s->avctx->color_range = h->sps.full_range ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG; if (h->sps.colour_description_present_flag) { + if (s->avctx->colorspace != h->sps.colorspace) + needs_reinit = 1; s->avctx->color_primaries = h->sps.color_primaries; s->avctx->color_trc = h->sps.color_trc; s->avctx->colorspace = h->sps.colorspace; } } - ret = get_pixel_format(h); - if (ret < 0) - return ret; - else - pix_fmt = ret; - if (s->avctx->pix_fmt == PIX_FMT_NONE) - s->avctx->pix_fmt = pix_fmt; - if (s->context_initialized && (s->width != s->avctx->width || s->height != s->avctx->height || - pix_fmt != s->avctx->pix_fmt || needs_reinit || av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) { @@ -2736,12 +2734,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0) return AVERROR_INVALIDDATA; } - av_log(h->s.avctx, AV_LOG_INFO, "Reinit context to %dx%d, " - "pix_fmt: %d\n", s->width, s->height, pix_fmt); - flush_change(h); - s->avctx->pix_fmt = pix_fmt; + if ((ret = get_pixel_format(h)) < 0) + return ret; + s->avctx->pix_fmt = ret; + + av_log(h->s.avctx, AV_LOG_INFO, "Reinit context to %dx%d, " + "pix_fmt: %d\n", s->width, s->height, s->avctx->pix_fmt); if ((ret = h264_slice_header_init(h, 1)) < 0) { av_log(h->s.avctx, AV_LOG_ERROR, @@ -2756,6 +2756,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0) "Cannot (re-)initialize context during parallel decoding.\n"); return -1; } + + if ((ret = get_pixel_format(h)) < 0) + return ret; + s->avctx->pix_fmt = ret; + if ((ret = h264_slice_header_init(h, 0)) < 0) { av_log(h->s.avctx, AV_LOG_ERROR, "h264_slice_header_init() failed\n"); From 7768a635c4ea15a9f3b2a602cc6aac3e629e7480 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Tue, 1 Jan 2013 18:56:55 +0100 Subject: [PATCH 3/3] cmdutils: update copyright year to 2013 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- cmdutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdutils.c b/cmdutils.c index 1ea05dfe5c..dc7e7b2e65 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -56,7 +56,7 @@ struct SwsContext *sws_opts; AVDictionary *format_opts, *codec_opts; -static const int this_year = 2012; +static const int this_year = 2013; void init_opts(void) {