From 8d7642a9f79d2e39383774946ded1f4e30ca61c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Terelius?= Date: Wed, 31 Jul 2024 09:53:53 +0200 Subject: [PATCH] Remove unused QpFastFilterLow method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: None Change-Id: I63665a3fc9afd57aec8f0f7d2a2a2e631452f6c6 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/358080 Auto-Submit: Björn Terelius Reviewed-by: Åsa Persson Commit-Queue: Åsa Persson Cr-Commit-Position: refs/heads/main@{#42704} --- modules/video_coding/utility/quality_scaler.cc | 15 --------------- modules/video_coding/utility/quality_scaler.h | 1 - video/adaptation/quality_scaler_resource.cc | 6 ------ video/adaptation/quality_scaler_resource.h | 1 - 4 files changed, 23 deletions(-) diff --git a/modules/video_coding/utility/quality_scaler.cc b/modules/video_coding/utility/quality_scaler.cc index 7ecb340ea4..4b71f90307 100644 --- a/modules/video_coding/utility/quality_scaler.cc +++ b/modules/video_coding/utility/quality_scaler.cc @@ -260,21 +260,6 @@ 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 avg_qp_high = qp_smoother_high_ - ? qp_smoother_high_->GetAvg() - : average_qp_.GetAverageRoundedDown(); - return (avg_qp_high) ? (avg_qp_high.value() <= thresholds_.low) : false; -} - QualityScaler::CheckQpResult QualityScaler::CheckQp() const { RTC_DCHECK_RUN_ON(&task_checker_); // Should be set through InitEncode -> Should be set by now. diff --git a/modules/video_coding/utility/quality_scaler.h b/modules/video_coding/utility/quality_scaler.h index 14623ff1f3..7939c9ee41 100644 --- a/modules/video_coding/utility/quality_scaler.h +++ b/modules/video_coding/utility/quality_scaler.h @@ -51,7 +51,6 @@ 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: diff --git a/video/adaptation/quality_scaler_resource.cc b/video/adaptation/quality_scaler_resource.cc index a24a3e88ff..7d71b2382f 100644 --- a/video/adaptation/quality_scaler_resource.cc +++ b/video/adaptation/quality_scaler_resource.cc @@ -61,12 +61,6 @@ void QualityScalerResource::SetQpThresholds( quality_scaler_->SetQpThresholds(std::move(qp_thresholds)); } -bool QualityScalerResource::QpFastFilterLow() { - RTC_DCHECK_RUN_ON(encoder_queue()); - RTC_DCHECK(is_started()); - return quality_scaler_->QpFastFilterLow(); -} - void QualityScalerResource::OnEncodeCompleted(const EncodedImage& encoded_image, int64_t time_sent_in_us) { RTC_DCHECK_RUN_ON(encoder_queue()); diff --git a/video/adaptation/quality_scaler_resource.h b/video/adaptation/quality_scaler_resource.h index a1ed34a1ce..0bdc25e895 100644 --- a/video/adaptation/quality_scaler_resource.h +++ b/video/adaptation/quality_scaler_resource.h @@ -42,7 +42,6 @@ class QualityScalerResource : public VideoStreamEncoderResource, const FieldTrialsView& field_trials); void StopCheckForOveruse(); void SetQpThresholds(VideoEncoder::QpThresholds qp_thresholds); - bool QpFastFilterLow(); void OnEncodeCompleted(const EncodedImage& encoded_image, int64_t time_sent_in_us); void OnFrameDropped(EncodedImageCallback::DropReason reason);