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

Unified Diff: webrtc/modules/video_coding/utility/quality_scaler.cc

Issue 1966213002: Unify hardware and software QP thresholds. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compromise at 95 Created 4 years, 7 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/modules/video_coding/utility/quality_scaler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_coding/utility/quality_scaler.cc
diff --git a/webrtc/modules/video_coding/utility/quality_scaler.cc b/webrtc/modules/video_coding/utility/quality_scaler.cc
index 30a5776b2d05b6d92495e67dfb75743972809854..694597070c9d6b1249ac6f2e9b90a376f8937e42 100644
--- a/webrtc/modules/video_coding/utility/quality_scaler.cc
+++ b/webrtc/modules/video_coding/utility/quality_scaler.cc
@@ -30,6 +30,16 @@ static const int kQvgaBitrateThresholdKbps = 250;
static const int kQvgaNumPixels = 400 * 300; // 320x240
} // namespace
+// QP thresholds are chosen to be high enough to be hit in practice when quality
+// is good, but also low enough to not cause a flip-flop behavior (e.g. going up
+// in resolution shouldn't give so bad quality that we should go back down).
+
+const int QualityScaler::kLowVp8QpThreshold = 29;
+const int QualityScaler::kBadVp8QpThreshold = 95;
+
+const int QualityScaler::kLowH264QpThreshold = 22;
+const int QualityScaler::kBadH264QpThreshold = 35;
+
QualityScaler::QualityScaler() : low_qp_threshold_(-1) {}
void QualityScaler::Init(int low_qp_threshold,
« no previous file with comments | « webrtc/modules/video_coding/utility/quality_scaler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698