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 3dd3dde93a92b0a7f84357a20e1e6b6db95a3d8e..a5cb90e0515386ad6de4260249c2c423013bc884 100644 |
--- a/webrtc/modules/video_coding/utility/quality_scaler.cc |
+++ b/webrtc/modules/video_coding/utility/quality_scaler.cc |
@@ -112,6 +112,8 @@ QualityScaler::QualityScaler(AdaptationObserverInterface* observer, |
RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_); |
RTC_DCHECK(observer_ != nullptr); |
check_qp_task_ = new CheckQPTask(this); |
+ LOG(LS_INFO) << "QP thresholds: low: " << thresholds_.low |
+ << ", high: " << thresholds_.high; |
} |
QualityScaler::~QualityScaler() { |
@@ -144,6 +146,8 @@ void QualityScaler::CheckQP() { |
// Check if we should scale down due to high frame drop. |
const rtc::Optional<int> drop_rate = framedrop_percent_.GetAverage(); |
if (drop_rate && *drop_rate >= kFramedropPercentThreshold) { |
+ LOG(LS_INFO) << "Drop rate " << *drop_rate |
+ << " has been high , asking for lower resolution."; |
kthelgason
2017/03/22 07:38:58
There is a bug here (https://bugs.chromium.org/p/w
AlexG
2017/03/22 19:53:45
I am not sure regarding the proper logging here. P
stefan-webrtc
2017/03/23 17:58:04
I think the current logging is confusing, so I'd p
AlexG
2017/03/23 19:25:08
Done. I removed "asking for lower/higher resolutio
|
ReportQPHigh(); |
return; |
} |
@@ -151,11 +155,15 @@ void QualityScaler::CheckQP() { |
// Check if we should scale up or down based on QP. |
const rtc::Optional<int> avg_qp = average_qp_.GetAverage(); |
if (avg_qp && *avg_qp > thresholds_.high) { |
+ LOG(LS_INFO) << "QP " << *avg_qp |
+ << " has been high , asking for lower resolution."; |
ReportQPHigh(); |
return; |
} |
if (avg_qp && *avg_qp <= thresholds_.low) { |
// QP has been low. We want to try a higher resolution. |
+ LOG(LS_INFO) << "QP " << *avg_qp |
+ << " has been low, asking for higher resolution."; |
ReportQPLow(); |
return; |
} |
@@ -163,14 +171,12 @@ void QualityScaler::CheckQP() { |
void QualityScaler::ReportQPLow() { |
RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_); |
- LOG(LS_INFO) << "QP has been low, asking for higher resolution."; |
ClearSamples(); |
observer_->AdaptUp(AdaptationObserverInterface::AdaptReason::kQuality); |
} |
void QualityScaler::ReportQPHigh() { |
RTC_DCHECK_CALLED_SEQUENTIALLY(&task_checker_); |
- LOG(LS_INFO) << "QP has been high , asking for lower resolution."; |
ClearSamples(); |
observer_->AdaptDown(AdaptationObserverInterface::AdaptReason::kQuality); |
// If we've scaled down, wait longer before scaling up again. |