Film mode: Raise threshold for intra modes
authorPaul Wilkins <paulwilkins@google.com>
Tue, 2 Apr 2019 15:31:33 +0000 (16:31 +0100)
committerPaul Wilkins <paulwilkins@google.com>
Tue, 2 Apr 2019 15:32:41 +0000 (16:32 +0100)
Substantially increase the threshold for applying variance
adjustment in  rd_variance_adjustment() for intra modes
only, especially for DC_PRED.

Change-Id: Idb3f0c5aca5ab58c9b79c3e993247719054d79c9

vp9/encoder/vp9_rdopt.c

index 8ed27a8..bf631d1 100644 (file)
@@ -3171,6 +3171,11 @@ static void rd_variance_adjustment(VP9_COMP *cpi, MACROBLOCK *x,
       double noise_factor =
           (double)cpi->twopass.gf_group.group_noise_energy / SECTION_NOISE_DEF;
       low_var_thresh = (unsigned int)(low_var_thresh * noise_factor);
+
+      if (ref_frame == INTRA_FRAME) {
+        low_var_thresh *= 2;
+        if (this_mode == DC_PRED) low_var_thresh *= 5;
+      }
     }
   } else {
     low_var_thresh = LOW_VAR_THRESH / 2;