Partition 1:4 search pruning

The speedup was seen mainly on HD res.
Borg results at speed 6:
       avg_psnr:  ovr_psnr:  ssim:  speedup:
hdres2  0.220      0.223     0.248   1.6%
midres2 0.012      0.011     0.019   0.2%

STATS_CHANGED at speed 6

Change-Id: I42cd947616eea996b5b2ae501b271771de7bf839
diff --git a/av1/encoder/partition_search.c b/av1/encoder/partition_search.c
index ac3c516..ffe0a95 100644
--- a/av1/encoder/partition_search.c
+++ b/av1/encoder/partition_search.c
@@ -3044,6 +3044,16 @@
     int pb_source_variance, int ext_partition_allowed,
     int part4_search_allowed[NUM_PART4_TYPES]) {
   PartitionBlkParams blk_params = part_search_state->part_blk_params;
+
+  // Disable 4-way partition search flags for width less than a multiple of the
+  // minimum partition width.
+  if (blk_params.width < (blk_params.min_partition_size_1d
+                          << cpi->sf.part_sf.prune_part4_search)) {
+    part4_search_allowed[HORZ4] = 0;
+    part4_search_allowed[VERT4] = 0;
+    return;
+  }
+
   const int mi_row = blk_params.mi_row;
   const int mi_col = blk_params.mi_col;
   const int bsize = blk_params.bsize;
@@ -3696,18 +3706,10 @@
 
   // 4-way partitions search stage.
   int part4_search_allowed[NUM_PART4_TYPES] = { 1, 1 };
-
-  // Disable 4-way partition search flags for width less than twice the minimum
-  // width.
-  if (blk_params.width < (blk_params.min_partition_size_1d << 2)) {
-    part4_search_allowed[HORZ4] = 0;
-    part4_search_allowed[VERT4] = 0;
-  } else {
-    // Prune 4-way partition search.
-    prune_4_way_partition_search(cpi, x, pc_tree, &part_search_state, &best_rdc,
-                                 pb_source_variance, ext_partition_allowed,
-                                 part4_search_allowed);
-  }
+  // Prune 4-way partition search.
+  prune_4_way_partition_search(cpi, x, pc_tree, &part_search_state, &best_rdc,
+                               pb_source_variance, ext_partition_allowed,
+                               part4_search_allowed);
 
 #if CONFIG_COLLECT_COMPONENT_TIMING
   start_timing(cpi, rd_pick_4partition_time);
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 0ab71e7..0700cba 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -384,6 +384,7 @@
   sf->part_sf.less_rectangular_check_level = 1;
   sf->part_sf.ml_prune_partition = 1;
   sf->part_sf.prune_ext_partition_types_search_level = 1;
+  sf->part_sf.prune_part4_search = 2;
   sf->part_sf.simple_motion_search_prune_rect = 1;
   sf->part_sf.ml_predict_breakout_level = use_hbd ? 1 : 3;
 
@@ -703,6 +704,7 @@
     sf->part_sf.prune_sub_8x8_partition_level =
         allow_screen_content_tools ? 0
                                    : frame_is_intra_only(&cpi->common) ? 1 : 2;
+    sf->part_sf.prune_part4_search = 3;
 
     sf->mv_sf.simple_motion_subpel_force_stop = FULL_PEL;
     sf->mv_sf.use_bsize_dependent_search_method = 1;
@@ -1089,6 +1091,7 @@
   part_sf->partition_search_breakout_dist_thr = 0;
   part_sf->partition_search_breakout_rate_thr = 0;
   part_sf->prune_ext_partition_types_search_level = 0;
+  part_sf->prune_part4_search = 0;
   part_sf->ml_prune_partition = 0;
   part_sf->ml_early_term_after_part_split_level = 0;
   for (int i = 0; i < PARTITION_BLOCK_SIZES; ++i) {
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index 7defacf..6053716 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -404,6 +404,9 @@
   // aggressiveness of pruning in order.
   int prune_ext_partition_types_search_level;
 
+  // Prune part4 based on block size
+  int prune_part4_search;
+
   // Use a ML model to prune rectangular, ab and 4-way horz
   // and vert partitions
   int ml_prune_partition;