diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index 7dabbbd..3c18fdc 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -217,7 +217,7 @@
   }
 }
 
-static void row_mt_mem_alloc(AV1_COMP *cpi, int max_sb_rows, int max_sb_cols,
+static void row_mt_mem_alloc(AV1_COMP *cpi, int max_rows, int max_cols,
                              int alloc_row_ctx) {
   struct AV1Common *cm = &cpi->common;
   AV1EncRowMultiThreadInfo *const enc_row_mt = &cpi->mt_info.enc_row_mt;
@@ -231,12 +231,12 @@
       int tile_index = tile_row * tile_cols + tile_col;
       TileDataEnc *const this_tile = &cpi->tile_data[tile_index];
 
-      row_mt_sync_mem_alloc(&this_tile->row_mt_sync, cm, max_sb_rows);
+      row_mt_sync_mem_alloc(&this_tile->row_mt_sync, cm, max_rows);
 
       this_tile->row_ctx = NULL;
       if (alloc_row_ctx) {
-        assert(max_sb_cols > 0);
-        const int num_row_ctx = AOMMAX(1, (max_sb_cols - 1));
+        assert(max_cols > 0);
+        const int num_row_ctx = AOMMAX(1, (max_cols - 1));
         CHECK_MEM_ERROR(cm, this_tile->row_ctx,
                         (FRAME_CONTEXT *)aom_memalign(
                             16, num_row_ctx * sizeof(*this_tile->row_ctx)));
@@ -245,8 +245,8 @@
   }
   enc_row_mt->allocated_tile_cols = tile_cols;
   enc_row_mt->allocated_tile_rows = tile_rows;
-  enc_row_mt->allocated_sb_rows = max_sb_rows;
-  enc_row_mt->allocated_sb_cols = max_sb_cols - 1;
+  enc_row_mt->allocated_rows = max_rows;
+  enc_row_mt->allocated_cols = max_cols - 1;
 }
 
 void av1_row_mt_mem_dealloc(AV1_COMP *cpi) {
@@ -266,7 +266,8 @@
       if (cpi->oxcf.algo_cfg.cdf_update_mode) aom_free(this_tile->row_ctx);
     }
   }
-  enc_row_mt->allocated_sb_rows = 0;
+  enc_row_mt->allocated_rows = 0;
+  enc_row_mt->allocated_cols = 0;
   enc_row_mt->allocated_tile_cols = 0;
   enc_row_mt->allocated_tile_rows = 0;
 }
@@ -991,8 +992,8 @@
 
   if (enc_row_mt->allocated_tile_cols != tile_cols ||
       enc_row_mt->allocated_tile_rows != tile_rows ||
-      enc_row_mt->allocated_sb_rows != max_sb_rows ||
-      enc_row_mt->allocated_sb_cols != (max_sb_cols - 1)) {
+      enc_row_mt->allocated_rows != max_sb_rows ||
+      enc_row_mt->allocated_cols != (max_sb_cols - 1)) {
     av1_row_mt_mem_dealloc(cpi);
     row_mt_mem_alloc(cpi, max_sb_rows, max_sb_cols,
                      cpi->oxcf.algo_cfg.cdf_update_mode);
@@ -1066,7 +1067,7 @@
 
   if (enc_row_mt->allocated_tile_cols != tile_cols ||
       enc_row_mt->allocated_tile_rows != tile_rows ||
-      enc_row_mt->allocated_sb_rows != max_mb_rows) {
+      enc_row_mt->allocated_rows != max_mb_rows) {
     av1_row_mt_mem_dealloc(cpi);
     row_mt_mem_alloc(cpi, max_mb_rows, -1, 0);
   }
@@ -1217,7 +1218,7 @@
 
 // Allocate memory for tpl row synchronization.
 void av1_tpl_alloc(AV1TplRowMultiThreadSync *tpl_sync, AV1_COMMON *cm,
-                   int mb_rows, int num_workers) {
+                   int mb_rows) {
   tpl_sync->rows = mb_rows;
 #if CONFIG_MULTITHREAD
   {
@@ -1236,8 +1237,6 @@
     }
   }
 #endif  // CONFIG_MULTITHREAD
-
-  tpl_sync->num_threads_working = num_workers;
   CHECK_MEM_ERROR(cm, tpl_sync->num_finished_cols,
                   aom_malloc(sizeof(*tpl_sync->num_finished_cols) * mb_rows));
 
@@ -1292,10 +1291,9 @@
   else
     num_workers = AOMMIN(num_workers, mt_info->num_enc_workers);
 
-  if (!tpl_sync->sync_range || mb_rows != tpl_sync->rows ||
-      num_workers > tpl_sync->num_threads_working) {
+  if (mb_rows != tpl_sync->rows) {
     av1_tpl_dealloc(tpl_sync);
-    av1_tpl_alloc(tpl_sync, cm, mb_rows, num_workers);
+    av1_tpl_alloc(tpl_sync, cm, mb_rows);
   }
   tpl_sync->num_threads_working = num_workers;
 
