]> granicus.if.org Git - libvpx/commitdiff
vp9-realtime: Enable alt_ref at speed 5, for live.
authorMarco Paniconi <marpan@google.com>
Fri, 27 Apr 2018 17:38:15 +0000 (10:38 -0700)
committerMarco Paniconi <marpan@google.com>
Mon, 14 May 2018 18:21:21 +0000 (11:21 -0700)
Enable alt_ref and compound prediction at speed 5.

For 1 pass VBR mode, when lag > 0.
Gain for Live set: ~3% gain on average, several
clips have gains ~5-15%.

Encoder fps decrease ~5-10%, on desktop with 4 threads.

For now enable it only for resolutions <= 1280x720.

Change-Id: I25e3d61a2244a3a01962624052c5adf4837965c7

test/vp9_datarate_test.cc
vp9/encoder/vp9_speed_features.c

index c4dbcacbef22e290f1de7d55231c5c789a78ae39..ada52ab419a56c798f7ca67def22772545ff7841 100644 (file)
@@ -294,7 +294,7 @@ TEST_P(DatarateTestVP9Large, BasicRateTargetingVBRLagNonZero) {
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
   ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.75)
       << " The datarate for the file is lower than target by too much!";
-  ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.30)
+  ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.35)
       << " The datarate for the file is greater than target by too much!";
 }
 
index 90da687268990b20634d3faae020d192c33380df..47c1d43bbb4921bb9e1db017dc64e5bfbdaeb3d8 100644 (file)
@@ -537,8 +537,14 @@ static void set_rt_speed_feature_framesize_independent(
     if (cpi->use_svc && cpi->svc.spatial_layer_id > 0) sf->nonrd_keyframe = 1;
     if (cpi->oxcf.pass == 0 && cpi->oxcf.rc_mode == VPX_CBR &&
         cm->frame_type != KEY_FRAME && cpi->resize_state == ORIG &&
-        cpi->oxcf.content == VP9E_CONTENT_SCREEN)
+        cpi->oxcf.content == VP9E_CONTENT_SCREEN) {
       sf->re_encode_overshoot_rt = 1;
+    }
+    if (cpi->oxcf.rc_mode == VPX_VBR && cpi->oxcf.lag_in_frames > 0 &&
+        cm->width <= 1280 && cm->height <= 720) {
+      sf->use_altref_onepass = 1;
+      sf->use_compound_nonrd_pickmode = 1;
+    }
   }
 
   if (speed >= 6) {