Remove unused field trial WebRTC-ReducedJitterDelayKillSwitch.

Bug: None
Change-Id: I8747e63d5c237dce6516b69db95035728ca9965c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269206
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37626}
This commit is contained in:
Erik Språng 2022-07-27 14:09:02 +02:00 committed by WebRTC LUCI CQ
parent 808a8fc29e
commit 23370f22c1
3 changed files with 15 additions and 37 deletions

View File

@ -52,8 +52,6 @@ JitterEstimator::JitterEstimator(Clock* clock,
const FieldTrialsView& field_trials)
: fps_counter_(30), // TODO(sprang): Use an estimator with limit based on
// time, rather than number of samples.
enable_reduced_delay_(
!field_trials.IsEnabled("WebRTC-ReducedJitterDelayKillSwitch")),
clock_(clock) {
Reset();
}
@ -374,24 +372,22 @@ TimeDelta JitterEstimator::GetJitterEstimate(
}
}
if (enable_reduced_delay_) {
static const Frequency kJitterScaleLowThreshold = Frequency::Hertz(5);
static const Frequency kJitterScaleHighThreshold = Frequency::Hertz(10);
Frequency fps = GetFrameRate();
// Ignore jitter for very low fps streams.
if (fps < kJitterScaleLowThreshold) {
if (fps.IsZero()) {
return std::max(TimeDelta::Zero(), jitter);
}
return TimeDelta::Zero();
static const Frequency kJitterScaleLowThreshold = Frequency::Hertz(5);
static const Frequency kJitterScaleHighThreshold = Frequency::Hertz(10);
Frequency fps = GetFrameRate();
// Ignore jitter for very low fps streams.
if (fps < kJitterScaleLowThreshold) {
if (fps.IsZero()) {
return std::max(TimeDelta::Zero(), jitter);
}
return TimeDelta::Zero();
}
// Semi-low frame rate; scale by factor linearly interpolated from 0.0 at
// kJitterScaleLowThreshold to 1.0 at kJitterScaleHighThreshold.
if (fps < kJitterScaleHighThreshold) {
jitter = (1.0 / (kJitterScaleHighThreshold - kJitterScaleLowThreshold)) *
(fps - kJitterScaleLowThreshold) * jitter;
}
// Semi-low frame rate; scale by factor linearly interpolated from 0.0 at
// kJitterScaleLowThreshold to 1.0 at kJitterScaleHighThreshold.
if (fps < kJitterScaleHighThreshold) {
jitter = (1.0 / (kJitterScaleHighThreshold - kJitterScaleLowThreshold)) *
(fps - kJitterScaleLowThreshold) * jitter;
}
return std::max(TimeDelta::Zero(), jitter);

View File

@ -148,7 +148,6 @@ class JitterEstimator {
// Tracks frame rates in microseconds.
rtc::RollingAccumulator<uint64_t> fps_counter_;
const bool enable_reduced_delay_;
Clock* clock_;
};

View File

@ -65,9 +65,9 @@ class ValueGenerator {
int64_t counter_;
};
// 5 fps, disable jitter delay altogether.
TEST_F(TestJitterEstimator, TestLowRate) {
ValueGenerator gen(10);
// At 5 fps, we disable jitter delay altogether.
TimeDelta time_delta = 1 / Frequency::Hertz(5);
for (int i = 0; i < 60; ++i) {
estimator_->UpdateEstimate(gen.Delay(), gen.FrameSize());
@ -79,23 +79,6 @@ TEST_F(TestJitterEstimator, TestLowRate) {
}
}
TEST_F(TestJitterEstimator, TestLowRateDisabled) {
test::ScopedKeyValueConfig field_trials(
field_trials_, "WebRTC-ReducedJitterDelayKillSwitch/Enabled/");
SetUp();
ValueGenerator gen(10);
TimeDelta time_delta = 1 / Frequency::Hertz(5);
for (int i = 0; i < 60; ++i) {
estimator_->UpdateEstimate(gen.Delay(), gen.FrameSize());
fake_clock_.AdvanceTime(time_delta);
if (i > 2)
EXPECT_GT(estimator_->GetJitterEstimate(0, absl::nullopt),
TimeDelta::Zero());
gen.Advance();
}
}
TEST_F(TestJitterEstimator, RttMultAddCap) {
std::vector<std::pair<TimeDelta, rtc::HistogramPercentileCounter>>
jitter_by_rtt_mult_cap;