Add ability to configure quality scaler settings through field trial.
optional<int> min_frames: The minimum number frames to observe to make a
scaling decision.
Default: kMinFramesNeededToScale in quality_scaler.cc
optional<double> initial_scale_factor: The sample period scale factor.
Default: kSamplePeriodScaleFactor in quality_scaler.cc
optional<double> scale_factor: Option to use a reduced sampling interval when
last check did not result in an adaptation (if
unset the initial_scale_factor is used).
Bug: none
Change-Id: I3bb955d1f8d7d7d49bc118361614b5aa59605231
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135125
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27860}
This commit is contained in:
@ -15,6 +15,7 @@
|
||||
#include <stdint.h>
|
||||
#include <memory>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "rtc_base/experiments/quality_scaling_experiment.h"
|
||||
#include "rtc_base/numerics/moving_average.h"
|
||||
@ -93,6 +94,11 @@ class QualityScaler {
|
||||
std::unique_ptr<QpSmoother> qp_smoother_high_ RTC_GUARDED_BY(&task_checker_);
|
||||
std::unique_ptr<QpSmoother> qp_smoother_low_ RTC_GUARDED_BY(&task_checker_);
|
||||
bool observed_enough_frames_ RTC_GUARDED_BY(&task_checker_);
|
||||
|
||||
const size_t min_frames_needed_;
|
||||
const double initial_scale_factor_;
|
||||
const absl::optional<double> scale_factor_;
|
||||
bool last_adapted_ RTC_GUARDED_BY(&task_checker_);
|
||||
};
|
||||
} // namespace webrtc
|
||||
|
||||
|
||||
Reference in New Issue
Block a user