]> granicus.if.org Git - libvpx/commitdiff
vp9-rtc: Update overshoot_detection speed feature
authorMarco Paniconi <marpan@google.com>
Fri, 24 May 2019 17:32:08 +0000 (10:32 -0700)
committerMarco Paniconi <marpan@google.com>
Mon, 27 May 2019 16:13:20 +0000 (09:13 -0700)
Keep the overshoot_detection_cbr_rt to the fast mode
(FAST_DETECTION_MAXQ), except for low-resoln at speed 5,
for non-screen content.

The increase in encode time (from using the more accurate
RE_ENCODE_MAXQ) is acceptable for speed 5 at low resoln.

Change-Id: I3089d1505553154ef046056465bc18130f7bd55a

vp9/encoder/vp9_speed_features.c

index df2afceda55fe76b1057cc7c9ce35d86a09c3e78..64881a5f91f1d30d92c8af73dcc8578d72517c36 100644 (file)
@@ -618,8 +618,13 @@ static void set_rt_speed_feature_framesize_independent(
     // increase in encoding time.
     if (cpi->use_svc && svc->spatial_layer_id > 0) sf->nonrd_keyframe = 1;
     if (cm->frame_type != KEY_FRAME && cpi->resize_state == ORIG &&
-        cpi->oxcf.rc_mode == VPX_CBR)
-      sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
+        cpi->oxcf.rc_mode == VPX_CBR) {
+      if (cm->width * cm->height <= 352 * 288 && !cpi->use_svc &&
+          cpi->oxcf.content != VP9E_CONTENT_SCREEN)
+        sf->overshoot_detection_cbr_rt = RE_ENCODE_MAXQ;
+      else
+        sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
+    }
     if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 &&
         cm->width <= 1280 && cm->height <= 720) {
       sf->use_altref_onepass = 1;
@@ -660,6 +665,9 @@ static void set_rt_speed_feature_framesize_independent(
       sf->limit_newmv_early_exit = 0;
       sf->base_mv_aggressive = 1;
     }
+    if (cm->frame_type != KEY_FRAME && cpi->resize_state == ORIG &&
+        cpi->oxcf.rc_mode == VPX_CBR)
+      sf->overshoot_detection_cbr_rt = FAST_DETECTION_MAXQ;
   }
 
   if (speed >= 7) {