Commit 267e3272 authored by Yunqing Wang's avatar Yunqing Wang

No need to update frame contexts while large_scale_tile = 1

While large_scale_tile = 1, no backward CDF update happens during
encoding. So, no need to update frame contexts at end of frame
encoding.

Change-Id: I2267b1e58d400768ba1ef95b339001b420e84c4b
parent d6401beb
......@@ -3869,16 +3869,24 @@ void av1_decode_tg_tiles_and_wrapup(AV1Decoder *pbi, const uint8_t *data,
}
#endif
// Non frame parallel update frame context here.
if (!cm->frame_parallel_decode ||
cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_FORWARD) {
// Non frame parallel update frame context here.
#if CONFIG_EXT_TILE
if (!cm->large_scale_tile) {
#endif // CONFIG_EXT_TILE
// TODO(yunqingwang): If cm->frame_parallel_decode = 0, then the following
// update always happens. Seems it is done more than necessary.
if (!cm->frame_parallel_decode ||
cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_FORWARD) {
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
cm->frame_contexts[cm->new_fb_idx] = *cm->fc;
cm->frame_contexts[cm->new_fb_idx] = *cm->fc;
#else
if (!cm->error_resilient_mode)
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
#endif
}
#if CONFIG_EXT_TILE
}
#endif // CONFIG_EXT_TILE
}
#if CONFIG_OBU
......
......@@ -6649,12 +6649,18 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags,
#endif
#if CONFIG_EXT_TILE
if (!cm->large_scale_tile) {
#endif // CONFIG_EXT_TILE
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING
cm->frame_contexts[cm->new_fb_idx] = *cm->fc;
cm->frame_contexts[cm->new_fb_idx] = *cm->fc;
#else
if (!cm->error_resilient_mode)
cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
#endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING
#if CONFIG_EXT_TILE
}
#endif // CONFIG_EXT_TILE
// No frame encoded, or frame was dropped, release scaled references.
if ((*size == 0) && (frame_is_intra_only(cm) == 0)) {
......
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