Aggressively skip txfm search based on skip rd for speed 4

         Instruction Count       BD-Rate Loss(%)
cpu-used   Reduction(%)     avg.psnr  ovr.psnr   ssim
   4          3.730	    0.1465    0.1435     0.1177

STATS_CHANGED

Change-Id: If951b356b0f071826e710ab14b89d7b83983bed1
diff --git a/av1/encoder/rdopt_utils.h b/av1/encoder/rdopt_utils.h
index 37fbb5b..98fb8f6 100644
--- a/av1/encoder/rdopt_utils.h
+++ b/av1/encoder/rdopt_utils.h
@@ -336,9 +336,10 @@
   // value) for (i) low quantizers (ii) regions where prediction is poor
   const int scale[6] = { INT_MAX, 4, 3, 3, 2, 2 };
   const int qslope = 2 * (!is_luma_only);
+  const int level_to_qindex_map[6] = { 0, 0, 0, 0, 80, 100 };
   int aggr_factor = 1;
-  const int pred_qindex_thresh = (level >= 5) ? 100 : 0;
-  if (!is_luma_only && level <= 4) {
+  const int pred_qindex_thresh = level_to_qindex_map[level];
+  if (!is_luma_only && level <= 3) {
     aggr_factor = AOMMAX(
         1, ((MAXQ - x->qindex) * qslope + QINDEX_RANGE / 2) >> QINDEX_BITS);
   }
@@ -346,8 +347,8 @@
        (x->source_variance << (num_pels_log2_lookup[bsize] + RDDIV_BITS))) &&
       (x->qindex >= pred_qindex_thresh))
     aggr_factor *= scale[level];
-  // For level setting 1, be more conservative for luma only case even when
-  // prediction is good
+  // For level setting 1, be more conservative for non-luma-only case even when
+  // prediction is good.
   else if ((level <= 1) && !is_luma_only)
     aggr_factor *= 2;