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

Unified Diff: webrtc/video/vie_encoder.cc

Issue 2783213002: Do not report quality limited resolution stats when quality scaler is disabled. (Closed)
Patch Set: rebase Created 3 years, 9 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
« no previous file with comments | « webrtc/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/vie_encoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_encoder.cc
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc
index 9940963f835e39e4fe042b9b6e09d27fe1af2973..c816dc272f5d610b2a06456831befc775e11fc22 100644
--- a/webrtc/video/vie_encoder.cc
+++ b/webrtc/video/vie_encoder.cc
@@ -461,13 +461,15 @@ void ViEEncoder::ConfigureQualityScaler() {
const auto scaling_settings = settings_.encoder->GetScalingSettings();
const bool degradation_preference_allows_scaling =
degradation_preference_ != DegradationPreference::kMaintainResolution;
+ const bool quality_scaling_allowed =
+ degradation_preference_allows_scaling && scaling_settings.enabled;
- stats_proxy_->SetResolutionRestrictionStats(
- degradation_preference_allows_scaling, scale_counter_[kCpu] > 0,
- scale_counter_[kQuality]);
+ stats_proxy_->SetCpuScalingStats(
+ degradation_preference_allows_scaling ? scale_counter_[kCpu] > 0 : false);
+ stats_proxy_->SetQualityScalingStats(
+ quality_scaling_allowed ? scale_counter_[kQuality] : -1);
- if (degradation_preference_allows_scaling &&
- scaling_settings.enabled) {
+ if (quality_scaling_allowed) {
// Abort if quality scaler has already been configured.
if (quality_scaler_.get() != nullptr)
return;
« no previous file with comments | « webrtc/video/send_statistics_proxy_unittest.cc ('k') | webrtc/video/vie_encoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698