Cleanup of enc row-mt for update_cdf=0
In case of row-based multi-threading of encoder for
--cdf-update-mode=0, allocation of memory for row_ctx
could be avoided. Code cleanup is done for the same.
Change-Id: I80c0ad90e8c27badcfa94d9c20b358bb58f2496a
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index a82f2af..943567f 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -310,9 +310,14 @@
td->mb.e_mbd.tile_ctx = td->tctx;
td->mb.tile_pb_ctx = &this_tile->tctx;
- td->mb.row_ctx = this_tile->row_ctx;
- if (current_mi_row == this_tile->tile_info.mi_row_start)
+ if (this_tile->allow_update_cdf) {
+ td->mb.row_ctx = this_tile->row_ctx;
+ if (current_mi_row == this_tile->tile_info.mi_row_start)
+ memcpy(td->mb.e_mbd.tile_ctx, &this_tile->tctx, sizeof(FRAME_CONTEXT));
+ } else {
memcpy(td->mb.e_mbd.tile_ctx, &this_tile->tctx, sizeof(FRAME_CONTEXT));
+ }
+
av1_init_above_context(cm, &td->mb.e_mbd, tile_row);
// Disable exhaustive search speed features for row based multi-threading of