Commit 9d078883 authored by Peter de Rivaz's avatar Peter de Rivaz
Browse files

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
parent 4b4e5eef
...@@ -2885,7 +2885,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { ...@@ -2885,7 +2885,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) {
unsigned int count_sat, update_factor; unsigned int count_sat, update_factor;
#if CONFIG_ENTROPY #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 */ update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY_BITS; /* adapt quickly */
count_sat = COEF_COUNT_SAT_AFTER_KEY_BITS; count_sat = COEF_COUNT_SAT_AFTER_KEY_BITS;
} else { } else {
...@@ -2896,7 +2896,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) { ...@@ -2896,7 +2896,7 @@ void av1_adapt_coef_probs(AV1_COMMON *cm) {
update_factor = COEF_MAX_UPDATE_FACTOR_BITS; update_factor = COEF_MAX_UPDATE_FACTOR_BITS;
} }
#else #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 */ update_factor = COEF_MAX_UPDATE_FACTOR_AFTER_KEY; /* adapt quickly */
count_sat = COEF_COUNT_SAT_AFTER_KEY; count_sat = COEF_COUNT_SAT_AFTER_KEY;
} else { } else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment