rtc: Simplify partition adjustment

Simplified the VBP-based partition adjustment logic. Only
negligible performance change. At speed 5, no change for
rtc_derf set. 0.009% change for rtc set. At speed 6, no
change for both sets.

STATS_CHANGED

Change-Id: I39b9ff89df1abef7f69b2e2bb7b3f934b3713200
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index 427d638..7295eb9 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -1730,8 +1730,6 @@
   const BLOCK_SIZE subsize = get_partition_subsize(bsize, partition);
   RD_SEARCH_MACROBLOCK_CONTEXT x_ctx;
   RD_STATS last_part_rdc, none_rdc, chosen_rdc, invalid_rdc;
-  BLOCK_SIZE sub_subsize = BLOCK_4X4;
-  int splits_below = 0;
   BLOCK_SIZE bs_type = mib[0]->bsize;
   x->try_merge_partition = 0;
 
@@ -1766,39 +1764,23 @@
   const int orig_rdmult = x->rdmult;
   setup_block_rdmult(cpi, x, mi_row, mi_col, bsize, NO_AQ, NULL);
 
-  if (is_adjust_var_based_part_enabled(cm, &cpi->sf.part_sf, bsize)) {
-    // Check if any of the sub blocks are further split.
-    if (partition == PARTITION_SPLIT && subsize > BLOCK_8X8) {
-      sub_subsize = get_partition_subsize(subsize, PARTITION_SPLIT);
-      splits_below = 1;
-      for (int i = 0; i < SUB_PARTITIONS_SPLIT; i++) {
-        int jj = i >> 1, ii = i & 0x01;
-        MB_MODE_INFO *this_mi = mib[jj * hbs * mi_params->mi_stride + ii * hbs];
-        if (this_mi && this_mi->bsize >= sub_subsize) {
-          splits_below = 0;
-        }
-      }
+  if (partition != PARTITION_NONE &&
+      is_adjust_var_based_part_enabled(cm, &cpi->sf.part_sf, bsize) &&
+      (mi_row + hbs < mi_params->mi_rows &&
+       mi_col + hbs < mi_params->mi_cols)) {
+    pc_tree->partitioning = PARTITION_NONE;
+    x->try_merge_partition = 1;
+    pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &none_rdc, PARTITION_NONE,
+                  bsize, ctx_none, invalid_rdc);
+
+    if (none_rdc.rate < INT_MAX) {
+      none_rdc.rate += mode_costs->partition_cost[pl][PARTITION_NONE];
+      none_rdc.rdcost = RDCOST(x->rdmult, none_rdc.rate, none_rdc.dist);
     }
 
-    // If partition is not none try none unless each of the 4 splits are split
-    // even further..
-    if (partition != PARTITION_NONE && !splits_below &&
-        mi_row + hbs < mi_params->mi_rows &&
-        mi_col + hbs < mi_params->mi_cols) {
-      pc_tree->partitioning = PARTITION_NONE;
-      x->try_merge_partition = 1;
-      pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &none_rdc,
-                    PARTITION_NONE, bsize, ctx_none, invalid_rdc);
-
-      if (none_rdc.rate < INT_MAX) {
-        none_rdc.rate += mode_costs->partition_cost[pl][PARTITION_NONE];
-        none_rdc.rdcost = RDCOST(x->rdmult, none_rdc.rate, none_rdc.dist);
-      }
-
-      av1_restore_context(x, &x_ctx, mi_row, mi_col, bsize, num_planes);
-      mib[0]->bsize = bs_type;
-      pc_tree->partitioning = partition;
-    }
+    av1_restore_context(x, &x_ctx, mi_row, mi_col, bsize, num_planes);
+    mib[0]->bsize = bs_type;
+    pc_tree->partitioning = partition;
   }
 
   for (int i = 0; i < SUB_PARTITIONS_SPLIT; ++i) {