vp9-aq-mode=3: Reset cyclic refresh under config/external size change.

If the application changes frame size (external size changes),
and aq-mode=3 is on, reset the cyclic refresh.

Modify the TestExternalResize unittest (longer run with more resize
actions). Without this change an assert would be triggered on this
longer test.

Change-Id: I0eefd2cd7ffa0c557cca96ae30d607034a2599ce
This commit is contained in:
Marco
2016-02-08 14:28:41 -08:00
parent bb8eebc0e0
commit aff0a802e7
2 changed files with 37 additions and 5 deletions

View File

@@ -94,13 +94,39 @@ unsigned int ScaleForFrameNumber(unsigned int frame, unsigned int val) {
if (frame < 10)
return val;
if (frame < 20)
return val / 2;
return val * 3 / 4;
if (frame < 30)
return val * 2 / 3;
return val / 2;
if (frame < 40)
return val / 4;
return val;
if (frame < 50)
return val * 7 / 8;
return val * 3 / 4;
if (frame < 60)
return val / 2;
if (frame < 70)
return val * 3 / 4;
if (frame < 80)
return val;
if (frame < 90)
return val * 3 / 4;
if (frame < 100)
return val / 2;
if (frame < 110)
return val * 3 / 4;
if (frame < 120)
return val;
if (frame < 130)
return val * 3 / 4;
if (frame < 140)
return val / 2;
if (frame < 150)
return val * 3 / 4;
if (frame < 160)
return val;
if (frame < 170)
return val / 2;
if (frame < 180)
return val * 3 / 4;
return val;
}
@@ -108,7 +134,7 @@ class ResizingVideoSource : public ::libvpx_test::DummyVideoSource {
public:
ResizingVideoSource() {
SetSize(kInitialWidth, kInitialHeight);
limit_ = 60;
limit_ = 200;
}
virtual ~ResizingVideoSource() {}
@@ -347,6 +373,8 @@ class ResizeRealtimeTest : public ::libvpx_test::EncoderTest,
TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
ResizingVideoSource video;
DefaultConfig();
// Disable internal resize for this test.
cfg_.rc_resize_allowed = 0;
change_bitrate_ = false;
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));