ref: 9ebc8605dbb493d25247cf106b8760c6fccbd11d
parent: c85c5337bfe2f64503b8e8f4584db63d6cd64d61
author: Marco Paniconi <[email protected]>
date: Fri Apr 27 06:38:15 EDT 2018
vp9-realtime: Enable alt_ref at speed 5, for live. 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
--- 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) {