shithub: libvpx

Download patch

ref: c73907a09b5d26010b7b4da960748664ff6bbd2c
parent: e6859b04acc670366161a69ee136a7190a35df85
parent: 9ebc8605dbb493d25247cf106b8760c6fccbd11d
author: Marco Paniconi <marpan@google.com>
date: Mon May 14 18:44:52 EDT 2018

Merge "vp9-realtime: Enable alt_ref at speed 5, for live."

--- a/test/vp9_datarate_test.cc
+++ b/test/vp9_datarate_test.cc
@@ -294,7 +294,7 @@
   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!";
 }
 
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -537,8 +537,14 @@
     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) {