Change frame bookkeeping in VideoProcessorIntegrationTest.
Now we always process |rate_profile.num_frames| number of frames. This means that the output of the tests in videoprocessor_integrationtest.cc will be slightly different, as we will no process 300 frames, instead of 299. No rate control or quality thresholds need to be updated, however. BUG=webrtc:6634 Review-Url: https://codereview.webrtc.org/3004583002 Cr-Commit-Position: refs/heads/master@{#19515}
This commit is contained in:
@ -38,7 +38,7 @@ const VisualizationParams kVisualizationParams = {
|
||||
false, // save_decoded_y4m
|
||||
};
|
||||
|
||||
const int kNumFrames = 299;
|
||||
const int kNumFrames = 300;
|
||||
|
||||
} // namespace
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ const char kForemanCif[] = "foreman_cif";
|
||||
#if !defined(WEBRTC_IOS)
|
||||
const int kNumFramesShort = 100;
|
||||
#endif
|
||||
const int kNumFramesLong = 299;
|
||||
const int kNumFramesLong = 300;
|
||||
|
||||
const std::nullptr_t kNoVisualizationParams = nullptr;
|
||||
|
||||
|
||||
@ -496,9 +496,7 @@ class VideoProcessorIntegrationTest : public testing::Test {
|
||||
// In batch mode, we calculate the metrics for all frames after all frames
|
||||
// have been sent for encoding.
|
||||
|
||||
// TODO(brandtr): Refactor "frame number accounting" so we don't have to
|
||||
// call ProcessFrame num_frames+1 times here.
|
||||
for (frame_number = 0; frame_number <= num_frames; ++frame_number) {
|
||||
for (frame_number = 0; frame_number < num_frames; ++frame_number) {
|
||||
processor_->ProcessFrame(frame_number);
|
||||
}
|
||||
|
||||
@ -543,16 +541,13 @@ class VideoProcessorIntegrationTest : public testing::Test {
|
||||
processor_->SetRates(bitrate_kbps_, framerate_);
|
||||
}
|
||||
}
|
||||
// TODO(brandtr): Refactor "frame number accounting" so we don't have to
|
||||
// call ProcessFrame one extra time here.
|
||||
processor_->ProcessFrame(frame_number);
|
||||
}
|
||||
|
||||
// Verify rate control metrics for all frames (if in batch mode), or for all
|
||||
// frames since the last rate update (if not in batch mode).
|
||||
PrintAndMaybeVerifyRateControlMetrics(update_index, rc_thresholds);
|
||||
EXPECT_EQ(num_frames, frame_number);
|
||||
EXPECT_EQ(num_frames + 1, static_cast<int>(stats_.stats_.size()));
|
||||
EXPECT_EQ(num_frames, static_cast<int>(stats_.stats_.size()));
|
||||
|
||||
// Release encoder and decoder to make sure they have finished processing.
|
||||
processor_->Release();
|
||||
|
||||
Reference in New Issue
Block a user