Merge "Fix a bug induced by qctx-tprobs experiment" into nextgen

This commit is contained in:
hui su 2015-06-23 17:54:35 +00:00 committed by Gerrit Code Review
commit ffcd76e328

View File

@ -3064,16 +3064,31 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
// below, forcing the use of context 0 for those frame types.
cm->frame_context_idx = vp9_rb_read_literal(rb, FRAME_CONTEXTS_LOG2);
if (frame_is_intra_only(cm) || cm->error_resilient_mode)
vp9_setup_past_independence(cm);
setup_loopfilter(cm, rb);
setup_quantization(cm, &pbi->mb, rb);
setup_segmentation(&cm->seg, rb);
#if CONFIG_QCTX_TPROBS
if (frame_is_intra_only(cm) || cm->error_resilient_mode) {
vp9_default_coef_probs(cm);
if (cm->frame_type == KEY_FRAME ||
cm->error_resilient_mode || cm->reset_frame_context == 3) {
// Reset all frame contexts.
for (i = 0; i < FRAME_CONTEXTS; ++i)
cm->frame_contexts[i] = cm->fc;
} else if (cm->reset_frame_context == 2) {
// Reset only the frame context specified in the frame header.
cm->frame_contexts[cm->frame_context_idx] = cm->fc;
}
}
#endif // CONFIG_QCTX_TPROBS
setup_tile_info(cm, rb);
sz = vp9_rb_read_literal(rb, 16);
if (frame_is_intra_only(cm) || cm->error_resilient_mode)
vp9_setup_past_independence(cm);
if (sz == 0)
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME,
"Invalid header size");