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

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
Index: webrtc/video/vie_encoder.cc
diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc
index 219b8ea7af62d8d16c6d949a71bf8f677eb327c4..ab306c1eae2dc7adfea2b3f060a6d2365107ad07 100644
--- a/webrtc/video/vie_encoder.cc
+++ b/webrtc/video/vie_encoder.cc
@@ -536,14 +536,15 @@ void ViEEncoder::ConfigureQualityScaler() {
const bool degradation_preference_allows_scaling =
degradation_preference_ == DegradationPreference::kMaintainFramerate ||
degradation_preference_ == DegradationPreference::kBalanced;
+ const bool quality_scaling_allowed =
+ degradation_preference_allows_scaling && scaling_settings.enabled;
const std::vector<int>& scale_counters = GetScaleCounters();
stats_proxy_->SetResolutionRestrictionStats(
- degradation_preference_allows_scaling, scale_counters[kCpu] > 0,
- scale_counters[kQuality]);
+ degradation_preference_allows_scaling, quality_scaling_allowed,
+ scale_counters[kCpu] > 0, scale_counters[kQuality]);
- 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;

Powered by Google App Engine
This is Rietveld 408576698