From 9d07888350956e4d9e96e7333c97242e434b19ae Mon Sep 17 00:00:00 2001 From: Peter de Rivaz Date: Tue, 25 Oct 2016 10:19:57 +0100 Subject: [PATCH] Fix to make intra_only frames decodable out of order last_frame_type is not well defined for intra_only frames if we are decoding them out of order. This change removes a dependency on last_frame_type for these frames. Change-Id: I440cac68792714de222e192a0b3e75f6e1aa5e4b --- av1/common/entropy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/av1/common/entropy.c b/av1/common/entropy.c index 7179e3d10..fcbb6e6a0 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c @@ -2885,7 +2885,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { unsigned int count_sat, update_factor; #if CONFIG_ENTROPY - if (cm->last_frame_type == KEY_FRAME) { + if (!frame_is_intra_only(cm) && cm->last_frame_type == KEY_FRAME) { update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY_BITS; /* adapt quickly */ count_sat = COEF_COUNT_SAT_AFTER_KEY_BITS; } else { @@ -2896,7 +2896,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { update_factor = COEF_MAX_UPDATE_FACTOR_BITS; } #else - if (cm->last_frame_type == KEY_FRAME) { + if (!frame_is_intra_only(cm) && cm->last_frame_type == KEY_FRAME) { update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */ count_sat = COEF_COUNT_SAT_AFTER_KEY; } else {