Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3441)

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc

Issue 3011923002: Clean up Stats class used in VideoProcessor tests. (Closed)
Patch Set: Fix VS compile. Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
index 7fd5dc2de79567b1edd32e55ccdb2e7fee838d68..68c2a683b834d7149624add9f9f24f670ac9532e 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.cc
@@ -191,8 +191,7 @@ void VideoProcessorIntegrationTest::ProcessFramesAndMaybeVerify(
rate_profile.input_frame_rate[rate_update_index]);
}
- task_queue.PostTask(
- [this, frame_number] { processor_->ProcessFrame(frame_number); });
+ task_queue.PostTask([this] { processor_->ProcessFrame(); });
++frame_number;
if (frame_number ==
@@ -245,7 +244,7 @@ void VideoProcessorIntegrationTest::ProcessFramesAndMaybeVerify(
num_dropped_frames, num_resize_actions);
// Calculate and print other statistics.
- EXPECT_EQ(num_frames, static_cast<int>(stats_.stats_.size()));
+ EXPECT_EQ(num_frames, static_cast<int>(stats_.size()));
stats_.PrintSummary();
// Calculate and print image quality statistics.
@@ -414,10 +413,10 @@ void VideoProcessorIntegrationTest::UpdateRateControlMetrics(int frame_number) {
++num_frames_per_update_[tl_idx];
++num_frames_total_;
- FrameType frame_type = stats_.stats_[frame_number].frame_type;
+ const FrameStatistic* frame_stat = stats_.GetFrame(frame_number);
+ FrameType frame_type = frame_stat->frame_type;
float encoded_size_kbits =
- stats_.stats_[frame_number].encoded_frame_length_in_bytes * 8.0f /
- 1000.0f;
+ frame_stat->encoded_frame_size_bytes * 8.0f / 1000.0f;
// Update layer data.
// Update rate mismatch relative to per-frame bandwidth for delta frames.

Powered by Google App Engine
This is Rietveld 408576698