Add field trial for rampup in quality based on available bandwidth.
Bug: none Change-Id: I32e1ea6fb2f2e20fc631e09b02c8f3a11b6c9fac Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158888 Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29751}
This commit is contained in:
@ -166,6 +166,21 @@ void QualityScaler::ReportQp(int qp, int64_t time_sent_us) {
|
||||
qp_smoother_low_->Add(qp, time_sent_us);
|
||||
}
|
||||
|
||||
bool QualityScaler::QpFastFilterLow() const {
|
||||
RTC_DCHECK_RUN_ON(&task_checker_);
|
||||
size_t num_frames = config_.use_all_drop_reasons
|
||||
? framedrop_percent_all_.Size()
|
||||
: framedrop_percent_media_opt_.Size();
|
||||
const size_t kMinNumFrames = 10;
|
||||
if (num_frames < kMinNumFrames) {
|
||||
return false; // Wait for more frames before making a decision.
|
||||
}
|
||||
absl::optional<int> avg_qp_high = qp_smoother_high_
|
||||
? qp_smoother_high_->GetAvg()
|
||||
: average_qp_.GetAverageRoundedDown();
|
||||
return (avg_qp_high) ? (avg_qp_high.value() <= thresholds_.low) : false;
|
||||
}
|
||||
|
||||
void QualityScaler::CheckQp() {
|
||||
RTC_DCHECK_RUN_ON(&task_checker_);
|
||||
// Should be set through InitEncode -> Should be set by now.
|
||||
|
||||
@ -64,6 +64,7 @@ class QualityScaler {
|
||||
void ReportQp(int qp, int64_t time_sent_us);
|
||||
|
||||
void SetQpThresholds(VideoEncoder::QpThresholds thresholds);
|
||||
bool QpFastFilterLow() const;
|
||||
|
||||
// The following members declared protected for testing purposes.
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user