aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-10-29 09:54:59 -0300
committerJames Almer <jamrial@gmail.com>2020-11-11 10:17:24 -0300
commitddb0e4fecdef24e8c7b90fa0a41d13e642ea732f (patch)
treea401d767a81b032b3ac44b6ece0d651433494d2e
parent89429cf2f260340c26d262b0da691e988e572e44 (diff)
downloadffmpeg-ddb0e4fecdef24e8c7b90fa0a41d13e642ea732f.tar.gz
avcodec/cbs_av1: infer ref_order_hint when not coded in the bitstream
Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/cbs_av1_syntax_template.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index f351b1de24..884dbec760 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -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++) {
- fbs(order_hint_bits, ref_order_hint[i], 1, 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 ||