HACK: avcodec: export progressive_sequence information
This commit is contained in:
parent
b98d59b30e
commit
65e097b8ed
|
@ -2029,6 +2029,13 @@ typedef struct AVCodecContext {
|
|||
*/
|
||||
int64_t frame_num;
|
||||
|
||||
/**
|
||||
* Is the stream completely progressive?
|
||||
* - decoding: set by avcodec
|
||||
* - encoding: unused
|
||||
*/
|
||||
int progressive_sequence;
|
||||
|
||||
/**
|
||||
* Decoding only. May be set by the caller before avcodec_open2() to an
|
||||
* av_malloc()'ed array (or via AVOptions). Owned and freed by the decoder
|
||||
|
|
|
@ -1091,6 +1091,7 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
|
|||
h->avctx->profile = ff_h264_get_profile(sps);
|
||||
h->avctx->level = sps->level_idc;
|
||||
h->avctx->refs = sps->ref_frame_count;
|
||||
h->avctx->progressive_sequence = sps->frame_mbs_only_flag;
|
||||
|
||||
h->mb_width = sps->mb_width;
|
||||
h->mb_height = sps->mb_height;
|
||||
|
|
|
@ -1091,6 +1091,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 */
|
||||
|
||||
|
@ -1841,6 +1842,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
|
|||
s->height = height;
|
||||
|
||||
/* 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;
|
||||
|
@ -1894,6 +1896,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;
|
||||
|
|
|
@ -315,6 +315,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
|||
if (err < 0)
|
||||
return err;
|
||||
|
||||
dst->progressive_sequence = src->progressive_sequence;
|
||||
|
||||
if (!!dst->hw_frames_ctx != !!src->hw_frames_ctx ||
|
||||
(dst->hw_frames_ctx && dst->hw_frames_ctx->data != src->hw_frames_ctx->data)) {
|
||||
av_buffer_unref(&dst->hw_frames_ctx);
|
||||
|
|
Loading…
Reference in New Issue