ref: 3c9a424e6e9c70afc2f7586093d440ec3fba7dfe
parent: d1a7c103258f3afd438f584c3aee3663eada422f
author: jackychen <[email protected]>
date: Mon Nov 9 06:47:26 EST 2015
VP9 dynamic resize: increase waiting time after key frame. For 1 pass CBR mode: increase waiting time after key frame before we start sampling rate control behavior for determining resize. This change need to disable one internal resize(DownUp) temporally since it requires a longer clip to do so. Change-Id: If21beda1be23f169ee541ab4dd642f718347887a
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -378,7 +378,11 @@
// Verify the dynamic resizer behavior for real time, 1 pass CBR mode.
// Start at low target bitrate, raise the bitrate in the middle of the clip,
// scaling-up should occur after bitrate changed.
-TEST_P(ResizeInternalRealtimeTest, TestInternalResizeDownUpChangeBitRate) {
+// TODO(jackychen): Find a longer clip to enable this test. Logic for
+// resizing in 1 pass CBR requires longer sequence to test resize down
+// and back up again.
+TEST_P(ResizeInternalRealtimeTest,
+ DISABLED_TestInternalResizeDownUpChangeBitRate) {
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 299);
DefaultConfig();
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1873,7 +1873,7 @@
// Resize based on average buffer underflow and QP over some window.
// Ignore samples close to key frame, since QP is usually high after key.
- if (cpi->rc.frames_since_key > 1 * cpi->framerate) {
+ if (cpi->rc.frames_since_key > 2 * cpi->framerate) {
const int window = (int)(4 * cpi->framerate);
cpi->resize_avg_qp += cm->base_qindex;
if (cpi->rc.buffer_level < (int)(30 * rc->optimal_buffer_level / 100))