diff --git a/video/video_analyzer.cc b/video/video_analyzer.cc index 8987a829df..e29d53eb48 100644 --- a/video/video_analyzer.cc +++ b/video/video_analyzer.cc @@ -471,6 +471,9 @@ void VideoAnalyzer::PollStats() { decode_time_ms_.AddSample(receive_stats.decode_ms); if (receive_stats.max_decode_ms > 0) decode_time_max_ms_.AddSample(receive_stats.max_decode_ms); + if (receive_stats.width > 0 && receive_stats.height > 0) { + pixels_.AddSample(receive_stats.width * receive_stats.height); + } } if (audio_receive_stream_ != nullptr) { @@ -579,6 +582,7 @@ void VideoAnalyzer::PrintResults() { PrintResult("fec_bitrate", fec_bitrate_bps_, " bps"); PrintResult("send_bandwidth", send_bandwidth_bps_, " bps"); PrintResult("time_between_freezes", time_between_freezes_, " ms"); + PrintResult("pixels_per_frame", pixels_, " px"); if (worst_frame_) { test::PrintResult("min_psnr", "", test_label_.c_str(), worst_frame_->psnr, diff --git a/video/video_analyzer.h b/video/video_analyzer.h index 8226270730..4e2abcd4e1 100644 --- a/video/video_analyzer.h +++ b/video/video_analyzer.h @@ -230,6 +230,7 @@ class VideoAnalyzer : public PacketReceiver, test::Statistics audio_expand_rate_ RTC_GUARDED_BY(comparison_lock_); test::Statistics audio_accelerate_rate_ RTC_GUARDED_BY(comparison_lock_); test::Statistics audio_jitter_buffer_ms_ RTC_GUARDED_BY(comparison_lock_); + test::Statistics pixels_ RTC_GUARDED_BY(comparison_lock_); // Rendered frame with worst PSNR is saved for further analysis. absl::optional worst_frame_ RTC_GUARDED_BY(comparison_lock_); diff --git a/video/video_quality_test.cc b/video/video_quality_test.cc index b4dfe4c63b..c8b2041f68 100644 --- a/video/video_quality_test.cc +++ b/video/video_quality_test.cc @@ -1095,8 +1095,8 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) { CreateFlexfecStreams(); CreateVideoStreams(); analyzer_->SetSendStream(video_send_streams_[0]); - if (video_receive_streams_.size() == 1) - analyzer_->SetReceiveStream(video_receive_streams_[0]); + analyzer_->SetReceiveStream( + video_receive_streams_[params_.ss[0].selected_stream]); GetVideoSendStream()->SetSource(analyzer_->OutputInterface(), degradation_preference_);