summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/resize_test.cc38
-rw-r--r--vp9/encoder/vp9_encoder.c4
2 files changed, 37 insertions, 5 deletions
diff --git a/test/resize_test.cc b/test/resize_test.cc
index bc91fe226..1c9ef2280 100644
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -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));
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index 6ea8dbf1b..65d5d76a7 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -1540,6 +1540,10 @@ void vp9_change_config(struct VP9_COMP *cpi, const VP9EncoderConfig *oxcf) {
}
update_frame_size(cpi);
+ if ((last_w != cpi->oxcf.width || last_h != cpi->oxcf.height) &&
+ cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ)
+ vp9_cyclic_refresh_reset_resize(cpi);
+
if ((cpi->svc.number_temporal_layers > 1 &&
cpi->oxcf.rc_mode == VPX_CBR) ||
((cpi->svc.number_temporal_layers > 1 ||