|
|
@ -405,6 +405,9 @@ static av_cold int av1_decode_free(AVCodecContext *avctx) |
|
|
|
static int set_context_with_sequence(AVCodecContext *avctx, |
|
|
|
static int set_context_with_sequence(AVCodecContext *avctx, |
|
|
|
const AV1RawSequenceHeader *seq) |
|
|
|
const AV1RawSequenceHeader *seq) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
int width = seq->max_frame_width_minus_1 + 1; |
|
|
|
|
|
|
|
int height = seq->max_frame_height_minus_1 + 1; |
|
|
|
|
|
|
|
|
|
|
|
avctx->profile = seq->seq_profile; |
|
|
|
avctx->profile = seq->seq_profile; |
|
|
|
avctx->level = seq->seq_level_idx[0]; |
|
|
|
avctx->level = seq->seq_level_idx[0]; |
|
|
|
|
|
|
|
|
|
|
@ -423,6 +426,13 @@ static int set_context_with_sequence(AVCodecContext *avctx, |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (avctx->width != width || avctx->height != height) { |
|
|
|
|
|
|
|
int ret = ff_set_dimensions(avctx, width, height); |
|
|
|
|
|
|
|
if (ret < 0) |
|
|
|
|
|
|
|
return ret; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
avctx->sample_aspect_ratio = (AVRational) { 1, 1 }; |
|
|
|
|
|
|
|
|
|
|
|
if (seq->timing_info.num_units_in_display_tick && |
|
|
|
if (seq->timing_info.num_units_in_display_tick && |
|
|
|
seq->timing_info.time_scale) { |
|
|
|
seq->timing_info.time_scale) { |
|
|
|
av_reduce(&avctx->framerate.den, &avctx->framerate.num, |
|
|
|
av_reduce(&avctx->framerate.den, &avctx->framerate.num, |
|
|
|