diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2013-06-16 22:30:33 +0400 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2013-06-22 12:49:55 +0400 |
commit | 9e0dd82e27a36a077b659f1762b3ad7732032a78 (patch) | |
tree | c55125632660cbd79d61cfd43cd3ccf44ca85204 /libavcodec | |
parent | ad105762a6c261ef0cd1961f7829206e5b0e1092 (diff) |
HACK: avcodec: export progressive_sequence informationmpc-hc-1.6.9-1lav0.58
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/avcodec.h | 6 | ||||
-rw-r--r-- | libavcodec/h264.c | 1 | ||||
-rw-r--r-- | libavcodec/mpeg12dec.c | 3 | ||||
-rw-r--r-- | libavcodec/pthread.c | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index e88eda763a..134b07f81c 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2878,6 +2878,12 @@ typedef struct AVCodecContext { #define FF_SUB_CHARENC_MODE_AUTOMATIC 0 ///< libavcodec will select the mode itself #define FF_SUB_CHARENC_MODE_PRE_DECODER 1 ///< the AVPacket data needs to be recoded to UTF-8 before being fed to the decoder, requires iconv + /** + * Is the stream completely progressive? + * - decoding: set by avcodec + * - encoding: unused + */ + int progressive_sequence; } AVCodecContext; AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx); diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 9defddb56a..f405d1ab2f 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -3313,6 +3313,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) h->avctx->profile = ff_h264_get_profile(&h->sps); h->avctx->level = h->sps.level_idc; h->avctx->refs = h->sps.ref_frame_count; + h->avctx->progressive_sequence = h->sps.frame_mbs_only_flag; must_reinit = (h->context_initialized && ( 16*h->sps.mb_width != h->avctx->coded_width diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index c6861519de..54e3347bc8 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1325,6 +1325,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) skip_bits(&s->gb, 1); /* profile and level esc*/ s->avctx->profile = get_bits(&s->gb, 3); s->avctx->level = get_bits(&s->gb, 4); + s->avctx->progressive_sequence = s->progressive_sequence = get_bits1(&s->gb); /* progressive_sequence */ s->chroma_format = get_bits(&s->gb, 2); /* chroma_format 1=420, 2=422, 3=444 */ horiz_size_ext = get_bits(&s->gb, 2); @@ -1976,6 +1977,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, } /* we set MPEG-2 parameters so that it emulates MPEG-1 */ + s->avctx->progressive_sequence = s->progressive_sequence = 1; s->progressive_frame = 1; s->picture_structure = PICT_FRAME; @@ -2029,6 +2031,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) s->chroma_inter_matrix[j] = v; } + s->avctx->progressive_sequence = s->progressive_sequence = 1; s->progressive_frame = 1; s->picture_structure = PICT_FRAME; diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 0c3f2b1678..79d7005e4a 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -435,6 +435,8 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src, dst->sample_rate = src->sample_rate; dst->sample_fmt = src->sample_fmt; dst->channel_layout = src->channel_layout; + + dst->progressive_sequence = src->progressive_sequence; } if (for_user) { |