Commit 503792ff authored by Marco's avatar Marco
Browse files

Add a separate datarate test for denoiser enabled.

Change-Id: Ibc91a46d11ad9c58e340b4346ed813a1be9b404a
parent bcfb1ffb
...@@ -126,28 +126,25 @@ class DatarateTestLarge : public ::libvpx_test::EncoderTest, ...@@ -126,28 +126,25 @@ class DatarateTestLarge : public ::libvpx_test::EncoderTest,
int denoiser_on_; int denoiser_on_;
}; };
TEST_P(DatarateTestLarge, BasicBufferModelDenoiserOff) { // Check basic datarate targeting, for a single bitrate, but loop over the
denoiser_on_ = 0; // various denoiser settings.
TEST_P(DatarateTestLarge, DenoiserLevels) {
cfg_.rc_buf_initial_sz = 500; cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1; cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56; cfg_.rc_max_quantizer = 56;
cfg_.rc_end_usage = VPX_CBR; cfg_.rc_end_usage = VPX_CBR;
// 2 pass cbr datarate control has a bug hidden by the small # of
// frames selected in this encode. The problem is that even if the buffer is
// negative we produce a keyframe on a cutscene. Ignoring datarate
// constraints
// TODO(jimbankoski): ( Fix when issue
// http://code.google.com/p/webm/issues/detail?id=495 is addressed. )
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288, ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140); 30, 1, 0, 140);
for (int j = 1; j < 5; ++j) {
// There is an issue for low bitrates in real-time mode, where the // Run over the denoiser levels.
// effective_datarate slightly overshoots the target bitrate. // For the temporal denoiser (#if CONFIG_TEMPORAL_DENOISING) the level j
// This is same the issue as noted about (#495). // refers to the 4 denoiser modes: denoiserYonly, denoiserOnYUV,
// TODO(jimbankoski/marpan): Update test to run for lower bitrates (< 100), // denoiserOnAggressive, and denoiserOnAdaptive.
// when the issue is resolved. // For the spatial denoiser (if !CONFIG_TEMPORAL_DENOISING), the level j
for (int i = 100; i < 800; i += 200) { // refers to the blur thresholds: 20, 40, 60 80.
cfg_.rc_target_bitrate = i; // The j = 0 case (denoiser off) is covered in the tests below.
denoiser_on_ = j;
cfg_.rc_target_bitrate = 300;
ResetModel(); ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.95) ASSERT_GE(cfg_.rc_target_bitrate, effective_datarate_ * 0.95)
...@@ -159,7 +156,7 @@ TEST_P(DatarateTestLarge, BasicBufferModelDenoiserOff) { ...@@ -159,7 +156,7 @@ TEST_P(DatarateTestLarge, BasicBufferModelDenoiserOff) {
} }
TEST_P(DatarateTestLarge, BasicBufferModel) { TEST_P(DatarateTestLarge, BasicBufferModel) {
denoiser_on_ = 1; denoiser_on_ = 0;
cfg_.rc_buf_initial_sz = 500; cfg_.rc_buf_initial_sz = 500;
cfg_.rc_dropframe_thresh = 1; cfg_.rc_dropframe_thresh = 1;
cfg_.rc_max_quantizer = 56; cfg_.rc_max_quantizer = 56;
...@@ -191,7 +188,7 @@ TEST_P(DatarateTestLarge, BasicBufferModel) { ...@@ -191,7 +188,7 @@ TEST_P(DatarateTestLarge, BasicBufferModel) {
} }
TEST_P(DatarateTestLarge, ChangingDropFrameThresh) { TEST_P(DatarateTestLarge, ChangingDropFrameThresh) {
denoiser_on_ = 1; denoiser_on_ = 0;
cfg_.rc_buf_initial_sz = 500; cfg_.rc_buf_initial_sz = 500;
cfg_.rc_max_quantizer = 36; cfg_.rc_max_quantizer = 36;
cfg_.rc_end_usage = VPX_CBR; cfg_.rc_end_usage = VPX_CBR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment