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

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, ...@@ -3869,16 +3869,24 @@ void av1_decode_tg_tiles_and_wrapup(AV1Decoder *pbi, const uint8_t *data,
} }
#endif #endif
// Non frame parallel update frame context here. // Non frame parallel update frame context here.
if (!cm->frame_parallel_decode || #if CONFIG_EXT_TILE
cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_FORWARD) { 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 #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 #else
if (!cm->error_resilient_mode) if (!cm->error_resilient_mode)
cm->frame_contexts[cm->frame_context_idx] = *cm->fc; cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
#endif #endif
}
#if CONFIG_EXT_TILE
} }
#endif // CONFIG_EXT_TILE
} }
#if CONFIG_OBU #if CONFIG_OBU
......
...@@ -6649,12 +6649,18 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags, ...@@ -6649,12 +6649,18 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags,
#endif #endif
#if CONFIG_EXT_TILE
if (!cm->large_scale_tile) {
#endif // CONFIG_EXT_TILE
#if CONFIG_NO_FRAME_CONTEXT_SIGNALING #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 #else
if (!cm->error_resilient_mode) if (!cm->error_resilient_mode)
cm->frame_contexts[cm->frame_context_idx] = *cm->fc; cm->frame_contexts[cm->frame_context_idx] = *cm->fc;
#endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING #endif // CONFIG_NO_FRAME_CONTEXT_SIGNALING
#if CONFIG_EXT_TILE
}
#endif // CONFIG_EXT_TILE
// No frame encoded, or frame was dropped, release scaled references. // No frame encoded, or frame was dropped, release scaled references.
if ((*size == 0) && (frame_is_intra_only(cm) == 0)) { 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