aom: rtc: Remove logic to set sb_size for dynamic mode

From 9ad7c3c84ea2cc4e0ed6696903e560c62455ffa0 Mon Sep 17 00:00:00 2001
From: Marco Paniconi <[EMAIL REDACTED]>
Date: Wed, 29 May 2024 12:27:22 -0700
Subject: [PATCH] rtc: Remove logic to set sb_size for dynamic mode

For real-time and screen mode: when the --sb-size=dynamic
is used (which is default), the sb_size was being set to 64
under certain conditions (based on resolution and #threads).
This selection of 64 size is causing the regression (compared
to 1 thread which is using 128), as shown in bug attached below.

Remove this internal logic for sb_size switch in dynamic mode
for now. Will follow-up to investigate how 64 vs 128 caused
such significant regression in those clips.

Bug: b/343429036

Change-Id: Id118f587c782d5e21ccaa7cb73355b86bb0267bb
---
 av1/encoder/encoder_utils.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git a/av1/encoder/encoder_utils.c b/av1/encoder/encoder_utils.c
index 1f81a530c..1c04df7e0 100644
--- a/av1/encoder/encoder_utils.c
+++ b/av1/encoder/encoder_utils.c
@@ -837,21 +837,7 @@ BLOCK_SIZE av1_select_sb_size(const AV1EncoderConfig *const oxcf, int width,
                ? BLOCK_128X128
                : BLOCK_64X64;
   } else if (oxcf->mode == REALTIME) {
-    if (oxcf->tune_cfg.content == AOM_CONTENT_SCREEN) {
-      const TileConfig *const tile_cfg = &oxcf->tile_cfg;
-      const int num_tiles =
-          (1 << tile_cfg->tile_columns) * (1 << tile_cfg->tile_rows);
-      // For multi-thread encode: if the number of (128x128) superblocks
-      // per tile is low use 64X64 superblock.
-      if (oxcf->row_mt == 1 && oxcf->max_threads >= 4 &&
-          oxcf->max_threads >= num_tiles && AOMMIN(width, height) > 720 &&
-          (width * height) / (128 * 128 * num_tiles) <= 38)
-        return BLOCK_64X64;
-      else
-        return AOMMIN(width, height) >= 720 ? BLOCK_128X128 : BLOCK_64X64;
-    } else {
-      return AOMMIN(width, height) > 720 ? BLOCK_128X128 : BLOCK_64X64;
-    }
+    return AOMMIN(width, height) > 720 ? BLOCK_128X128 : BLOCK_64X64;
   }
 
   // TODO(any): Possibly could improve this with a heuristic.