diff --git a/webrtc/modules/video_coding/codecs/test/plot_videoprocessor_integrationtest.cc b/webrtc/modules/video_coding/codecs/test/plot_videoprocessor_integrationtest.cc index 198bb8a682..468a718a88 100644 --- a/webrtc/modules/video_coding/codecs/test/plot_videoprocessor_integrationtest.cc +++ b/webrtc/modules/video_coding/codecs/test/plot_videoprocessor_integrationtest.cc @@ -38,7 +38,7 @@ const VisualizationParams kVisualizationParams = { false, // save_decoded_y4m }; -const int kNumFrames = 299; +const int kNumFrames = 300; } // namespace diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc index d188d3466b..87dc5f3043 100644 --- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc +++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc @@ -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; diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h index 3d43d64380..d87ffed55d 100644 --- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h +++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h @@ -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(stats_.stats_.size())); + EXPECT_EQ(num_frames, static_cast(stats_.stats_.size())); // Release encoder and decoder to make sure they have finished processing. processor_->Release();