vp9-rtc: Fix to disable_16x16part speed feature
authorMarco Paniconi <marpan@google.com>
Thu, 9 Apr 2020 18:35:55 +0000 (11:35 -0700)
committerMarco Paniconi <marpan@google.com>
Thu, 9 Apr 2020 20:54:08 +0000 (13:54 -0700)
Condition on current_video_frame count, as the
avg_frame_qindex needs some time to settle.

Fixes psnr test failures.

Change-Id: I462c45250becb55b72b6ffe2b7087094d6d58a01

vp9/encoder/vp9_speed_features.c

index 51b4174..dea17e1 100644 (file)
@@ -791,10 +791,12 @@ static void set_rt_speed_feature_framesize_independent(
   }
 
   // Disable split to 8x8 for low-resolution at very high Q.
-  // For variance partition (speed >= 6).
+  // For variance partition (speed >= 6). Ignore the first few frames
+  // as avg_frame_qindex starts at max_q (worst_quality).
   if (cm->frame_type != KEY_FRAME && cm->width * cm->height <= 320 * 240 &&
       sf->partition_search_type == VAR_BASED_PARTITION &&
-      cpi->rc.avg_frame_qindex[INTER_FRAME] > 208)
+      cpi->rc.avg_frame_qindex[INTER_FRAME] > 208 &&
+      cpi->common.current_video_frame > 8)
     sf->disable_16x16part_nonkey = 1;
 
   if (sf->nonrd_use_ml_partition)