Limit compound modes for boosted frames

Pruned compound prediction modes aggressively
for boosted frames.

            Instruction Count
cpu-used       Reduction(%)    Quality Loss(%)
   3             1.89              +0.0198
   4             1.64              +0.0567

STATS_CHANGED

Change-Id: I37c5e9f861271217b105c4dc7bc36f64ba8d4082
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index be2ad89..fe2fdd2 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -12310,6 +12310,12 @@
       candidates = 1;
     if (mode == NEARMV || mode == GLOBALMV) candidates = 1;
   }
+
+  if (cpi->sf.prune_comp_search_by_single_result >= 4) {
+    // Limit the number of candidates to 1 in each direction for compound
+    // prediction
+    candidates = AOMMIN(1, candidates);
+  }
   return candidates;
 }
 
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 6a6a98f..c6c4369 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -363,7 +363,7 @@
     if (cpi->oxcf.enable_smooth_interintra)
       sf->disable_smooth_interintra = boosted ? 0 : 1;
     sf->gm_search_type = GM_DISABLE_SEARCH;
-    sf->prune_comp_search_by_single_result = 2;
+    sf->prune_comp_search_by_single_result = boosted ? 4 : 2;
     sf->prune_motion_mode_level = boosted ? 2 : 3;
     // TODO(yunqing): evaluate this speed feature for speed 1 & 2, and combine
     // it with cpi->sf.disable_wedge_search_var_thresh.