1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/cbs_av1: infer ref_order_hint when not coded in the bitstream

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2020-10-29 09:54:59 -03:00
parent 89429cf2f2
commit ddb0e4fecd

View File

@ -1490,13 +1490,19 @@ static int FUNC(uncompressed_header)(CodedBitstreamContext *ctx, RWContext *rw,
fb(8, refresh_frame_flags);
if (!frame_is_intra || current->refresh_frame_flags != all_frames) {
if (current->error_resilient_mode && seq->enable_order_hint) {
if (seq->enable_order_hint) {
for (i = 0; i < AV1_NUM_REF_FRAMES; i++) {
if (current->error_resilient_mode)
fbs(order_hint_bits, ref_order_hint[i], 1, i);
else
infer(ref_order_hint[i], priv->ref[i].order_hint);
if (current->ref_order_hint[i] != priv->ref[i].order_hint)
priv->ref[i].valid = 0;
}
}
} else if (!frame_is_intra && seq->enable_order_hint) {
for (i = 0; i < AV1_NUM_REF_FRAMES; i++)
infer(ref_order_hint[i], priv->ref[i].order_hint);
}
if (current->frame_type == AV1_FRAME_KEY ||