Cleanup RttMult experiment as launched

Bug: webrtc:9670
Change-Id: I252db24faf3d668bf24b8d372454003b553cc8d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343767
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41983}
This commit is contained in:
Danil Chapovalov 2024-03-22 17:00:40 +01:00 committed by WebRTC LUCI CQ
parent e0091b9dc9
commit 358d674834
10 changed files with 4 additions and 138 deletions

View file

@ -748,9 +748,6 @@ POLICY_EXEMPT_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([
FieldTrial('WebRTC-RtcpLossNotification',
'webrtc:10336',
date(2024, 4, 1)),
FieldTrial('WebRTC-RttMult',
'webrtc:9670',
INDEFINITE),
FieldTrial('WebRTC-SendBufferSizeBytes',
'webrtc:11905',
date(2024, 4, 1)),

View file

@ -25,7 +25,6 @@ rtc_library("encoded_frame") {
"../../modules/rtp_rtcp:rtp_video_header",
"../../rtc_base:checks",
"../../rtc_base/experiments:alr_experiment",
"../../rtc_base/experiments:rtt_mult_experiment",
"../../rtc_base/system:rtc_export",
"../../system_wrappers",
]
@ -254,7 +253,6 @@ rtc_library("video_coding") {
"../../rtc_base/experiments:field_trial_parser",
"../../rtc_base/experiments:min_video_bitrate_experiment",
"../../rtc_base/experiments:rate_control_settings",
"../../rtc_base/experiments:rtt_mult_experiment",
"../../rtc_base/synchronization:mutex",
"../../rtc_base/system:no_unique_address",
"../../rtc_base/task_utils:repeating_task",

View file

@ -167,18 +167,6 @@ rtc_library("encoder_info_settings") {
]
}
rtc_library("rtt_mult_experiment") {
sources = [
"rtt_mult_experiment.cc",
"rtt_mult_experiment.h",
]
deps = [
"..:logging",
"../../system_wrappers:field_trial",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("rate_control_settings") {
sources = [
"rate_control_settings.cc",
@ -262,7 +250,6 @@ if (rtc_include_tests && !build_with_chromium) {
"quality_scaler_settings_unittest.cc",
"quality_scaling_experiment_unittest.cc",
"rate_control_settings_unittest.cc",
"rtt_mult_experiment_unittest.cc",
"stable_target_rate_experiment_unittest.cc",
"struct_parameters_parser_unittest.cc",
]
@ -279,7 +266,6 @@ if (rtc_include_tests && !build_with_chromium) {
":quality_scaler_settings",
":quality_scaling_experiment",
":rate_control_settings",
":rtt_mult_experiment",
":stable_target_rate_experiment",
"..:gunit_helpers",
"../:rtc_base_tests_utils",

View file

@ -9,5 +9,4 @@ per-file field_trial*=srte@webrtc.org
per-file keyframe_interval_settings*=brandtr@webrtc.org
per-file normalize_simulcast_size_experiment*=asapersson@webrtc.org
per-file quality_scaling_experiment*=asapersson@webrtc.org
per-file rtt_mult_experiment*=mhoro@webrtc.org
per-file rate_control_settings*=srte@webrtc.org

View file

@ -1,39 +0,0 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/experiments/rtt_mult_experiment.h"
#include <stdio.h>
#include <algorithm>
#include <string>
#include "rtc_base/logging.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
namespace {
const char kRttMultExperiment[] = "WebRTC-RttMult";
} // namespace
bool RttMultExperiment::RttMultEnabled() {
return !field_trial::IsDisabled(kRttMultExperiment);
}
absl::optional<RttMultExperiment::Settings>
RttMultExperiment::GetRttMultValue() {
if (!RttMultExperiment::RttMultEnabled()) {
return absl::nullopt;
}
return RttMultExperiment::Settings{.rtt_mult_setting = 0.9,
.rtt_mult_add_cap_ms = 200.0};
}
} // namespace webrtc

View file

@ -1,35 +0,0 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_
#define RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_
#include "absl/types/optional.h"
namespace webrtc {
class RttMultExperiment {
public:
struct Settings {
float rtt_mult_setting; // Jitter buffer size is increased by this factor
// times the estimated RTT.
float rtt_mult_add_cap_ms; // Jitter buffer size increase is capped by this
// value.
};
// Returns true if the experiment is enabled.
static bool RttMultEnabled();
// Returns rtt_mult value and rtt_mult addition cap value from field trial.
static absl::optional<RttMultExperiment::Settings> GetRttMultValue();
};
} // namespace webrtc
#endif // RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_

View file

@ -1,31 +0,0 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "rtc_base/experiments/rtt_mult_experiment.h"
#include "test/field_trial.h"
#include "test/gtest.h"
namespace webrtc {
TEST(RttMultExperimentTest, RttMultEnabledByDefault) {
EXPECT_TRUE(RttMultExperiment::RttMultEnabled());
ASSERT_TRUE(RttMultExperiment::GetRttMultValue());
EXPECT_EQ(0.9f, RttMultExperiment::GetRttMultValue()->rtt_mult_setting);
EXPECT_EQ(200.0f, RttMultExperiment::GetRttMultValue()->rtt_mult_add_cap_ms);
}
TEST(RttMultExperimentTest, RttMultDisabledByFieldTrial) {
webrtc::test::ScopedFieldTrials field_trials("WebRTC-RttMult/Disabled/");
EXPECT_FALSE(RttMultExperiment::RttMultEnabled());
EXPECT_FALSE(RttMultExperiment::GetRttMultValue());
}
} // namespace webrtc

View file

@ -292,7 +292,6 @@ rtc_library("video_stream_buffer_controller") {
"../rtc_base:checks",
"../rtc_base:logging",
"../rtc_base:macromagic",
"../rtc_base/experiments:rtt_mult_experiment",
"../system_wrappers",
"../system_wrappers:field_trial",
]

View file

@ -248,17 +248,12 @@ void VideoStreamBufferController::OnFrameReady(
superframe_size);
}
float rtt_mult = protection_mode_ == kProtectionNackFEC ? 0.0 : 1.0;
absl::optional<TimeDelta> rtt_mult_add_cap_ms = absl::nullopt;
if (rtt_mult_settings_.has_value()) {
rtt_mult = rtt_mult_settings_->rtt_mult_setting;
rtt_mult_add_cap_ms =
TimeDelta::Millis(rtt_mult_settings_->rtt_mult_add_cap_ms);
}
static constexpr float kRttMult = 0.9f;
static constexpr TimeDelta kRttMultAddCap = TimeDelta::Millis(200);
timing_->SetJitterDelay(
jitter_estimator_.GetJitterEstimate(rtt_mult, rtt_mult_add_cap_ms));
jitter_estimator_.GetJitterEstimate(kRttMult, kRttMultAddCap));
timing_->UpdateCurrentDelay(render_time, now);
} else if (RttMultExperiment::RttMultEnabled()) {
} else {
jitter_estimator_.FrameNacked();
}

View file

@ -21,7 +21,6 @@
#include "modules/video_coding/timing/inter_frame_delay_variation_calculator.h"
#include "modules/video_coding/timing/jitter_estimator.h"
#include "modules/video_coding/timing/timing.h"
#include "rtc_base/experiments/rtt_mult_experiment.h"
#include "system_wrappers/include/clock.h"
#include "video/decode_synchronizer.h"
#include "video/video_receive_stream_timeout_tracker.h"
@ -103,8 +102,6 @@ class VideoStreamBufferController {
RTC_NO_UNIQUE_ADDRESS SequenceChecker worker_sequence_checker_;
const FieldTrialsView& field_trials_;
const absl::optional<RttMultExperiment::Settings> rtt_mult_settings_ =
RttMultExperiment::GetRttMultValue();
Clock* const clock_;
VideoStreamBufferControllerStatsObserver* const stats_proxy_;
FrameSchedulingReceiver* const receiver_;