summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2017-05-17 18:42:51 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-05-17 18:42:51 +0000
commita2dfbbd7d69f2991b571090c6b356203dffba523 (patch)
treefa014ee6d1feb2f53f47b23a5bc2476f448ba6d9
parent13918a9ccce87c598035a63fd17fb14a203f7cea (diff)
parent4733df333fb703dbd1be475c174e1556d7c68de4 (diff)
downloadlibvpx-a2dfbbd7d69f2991b571090c6b356203dffba523.tar
libvpx-a2dfbbd7d69f2991b571090c6b356203dffba523.tar.gz
libvpx-a2dfbbd7d69f2991b571090c6b356203dffba523.tar.bz2
libvpx-a2dfbbd7d69f2991b571090c6b356203dffba523.zip
Merge "vp9: Modify ChangingDropFrameThresh unittest."
-rw-r--r--test/datarate_test.cc43
1 files changed, 23 insertions, 20 deletions
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index b93148e34..a120a88d2 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -792,26 +792,29 @@ TEST_P(DatarateTestVP9Large, ChangingDropFrameThresh) {
30, 1, 0, 140);
const int kDropFrameThreshTestStep = 30;
- vpx_codec_pts_t last_drop = 140;
- int last_num_drops = 0;
- for (int i = 10; i < 100; i += kDropFrameThreshTestStep) {
- cfg_.rc_dropframe_thresh = i;
- ResetModel();
- ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
- ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
- << " The datarate for the file is lower than target by too much!";
- ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.15)
- << " The datarate for the file is greater than target by too much!";
- ASSERT_LE(first_drop_, last_drop)
- << " The first dropped frame for drop_thresh " << i
- << " > first dropped frame for drop_thresh "
- << i - kDropFrameThreshTestStep;
- ASSERT_GE(num_drops_, last_num_drops * 0.85)
- << " The number of dropped frames for drop_thresh " << i
- << " < number of dropped frames for drop_thresh "
- << i - kDropFrameThreshTestStep;
- last_drop = first_drop_;
- last_num_drops = num_drops_;
+ for (int j = 50; j <= 150; j += 100) {
+ cfg_.rc_target_bitrate = j;
+ vpx_codec_pts_t last_drop = 140;
+ int last_num_drops = 0;
+ for (int i = 10; i < 100; i += kDropFrameThreshTestStep) {
+ cfg_.rc_dropframe_thresh = i;
+ ResetModel();
+ ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
+ ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.85)
+ << " The datarate for the file is lower than target by too much!";
+ ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.25)
+ << " The datarate for the file is greater than target by too much!";
+ ASSERT_LE(first_drop_, last_drop)
+ << " The first dropped frame for drop_thresh " << i
+ << " > first dropped frame for drop_thresh "
+ << i - kDropFrameThreshTestStep;
+ ASSERT_GE(num_drops_, last_num_drops * 0.85)
+ << " The number of dropped frames for drop_thresh " << i
+ << " < number of dropped frames for drop_thresh "
+ << i - kDropFrameThreshTestStep;
+ last_drop = first_drop_;
+ last_num_drops = num_drops_;
+ }
}
}