Remove unused flags in loss based bwe v2.

These flags were never experimented or launched.

Bug: webrtc:12707
Change-Id: Iefedeade52fdcf7f978894c4bf837261810f41bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329080
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41265}
This commit is contained in:
Diep Bui 2023-11-28 15:27:13 +00:00 committed by WebRTC LUCI CQ
parent 8490273226
commit 69d1d3ec40
3 changed files with 0 additions and 188 deletions

View File

@ -463,12 +463,6 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
FieldTrialParameter<bool>
not_increase_if_inherent_loss_less_than_average_loss(
"NotIncreaseIfInherentLossLessThanAverageLoss", true);
FieldTrialParameter<double> high_loss_rate_threshold("HighLossRateThreshold",
1.0);
FieldTrialParameter<DataRate> bandwidth_cap_at_high_loss_rate(
"BandwidthCapAtHighLossRate", DataRate::KilobitsPerSec(500.0));
FieldTrialParameter<double> slope_of_bwe_high_loss_func(
"SlopeOfBweHighLossFunc", 1000);
FieldTrialParameter<bool> not_use_acked_rate_in_alr("NotUseAckedRateInAlr",
true);
FieldTrialParameter<bool> use_in_start_phase("UseInStartPhase", false);
@ -509,9 +503,6 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
&max_increase_factor,
&delayed_increase_window,
&not_increase_if_inherent_loss_less_than_average_loss,
&high_loss_rate_threshold,
&bandwidth_cap_at_high_loss_rate,
&slope_of_bwe_high_loss_func,
&not_use_acked_rate_in_alr,
&use_in_start_phase,
&min_num_observations,
@ -571,10 +562,6 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
config->delayed_increase_window = delayed_increase_window.Get();
config->not_increase_if_inherent_loss_less_than_average_loss =
not_increase_if_inherent_loss_less_than_average_loss.Get();
config->high_loss_rate_threshold = high_loss_rate_threshold.Get();
config->bandwidth_cap_at_high_loss_rate =
bandwidth_cap_at_high_loss_rate.Get();
config->slope_of_bwe_high_loss_func = slope_of_bwe_high_loss_func.Get();
config->not_use_acked_rate_in_alr = not_use_acked_rate_in_alr.Get();
config->use_in_start_phase = use_in_start_phase.Get();
config->min_num_observations = min_num_observations.Get();
@ -757,12 +744,6 @@ bool LossBasedBweV2::IsConfigValid() const {
<< config_->delayed_increase_window.ms();
valid = false;
}
if (config_->high_loss_rate_threshold <= 0.0 ||
config_->high_loss_rate_threshold > 1.0) {
RTC_LOG(LS_WARNING) << "The high loss rate threshold must be in (0, 1]: "
<< config_->high_loss_rate_threshold;
valid = false;
}
if (config_->min_num_observations <= 0) {
RTC_LOG(LS_WARNING) << "The min number of observations must be positive: "
<< config_->min_num_observations;
@ -1058,14 +1039,6 @@ void LossBasedBweV2::CalculateInstantUpperBound() {
instant_limit = config_->instant_upper_bound_bandwidth_balance /
(average_reported_loss_ratio -
config_->instant_upper_bound_loss_offset);
if (average_reported_loss_ratio > config_->high_loss_rate_threshold) {
instant_limit = std::min(
instant_limit, DataRate::KilobitsPerSec(std::max(
static_cast<double>(min_bitrate_.kbps()),
config_->bandwidth_cap_at_high_loss_rate.kbps() -
config_->slope_of_bwe_high_loss_func *
average_reported_loss_ratio)));
}
}
cached_instant_upper_bound_ = instant_limit;

View File

@ -114,9 +114,6 @@ class LossBasedBweV2 {
double max_increase_factor = 0.0;
TimeDelta delayed_increase_window = TimeDelta::Zero();
bool not_increase_if_inherent_loss_less_than_average_loss = false;
double high_loss_rate_threshold = 1.0;
DataRate bandwidth_cap_at_high_loss_rate = DataRate::MinusInfinity();
double slope_of_bwe_high_loss_func = 1000.0;
bool not_use_acked_rate_in_alr = false;
bool use_in_start_phase = false;
int min_num_observations = 0;

View File

@ -1054,164 +1054,6 @@ TEST_F(LossBasedBweV2Test,
DataRate::KilobitsPerSec(600));
}
TEST_F(LossBasedBweV2Test,
StricterBoundUsingHighLossRateThresholdAt10pLossRate) {
ExplicitKeyValueConfig key_value_config(
ShortObservationConfig("HighLossRateThreshold:0.09"));
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
loss_based_bandwidth_estimator.SetMinMaxBitrate(
/*min_bitrate=*/DataRate::KilobitsPerSec(10),
/*max_bitrate=*/DataRate::KilobitsPerSec(1000000));
DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000);
loss_based_bandwidth_estimator.SetBandwidthEstimate(
DataRate::KilobitsPerSec(600));
std::vector<PacketResult> enough_feedback_10p_loss_1 =
CreatePacketResultsWith10pPacketLossRate(
/*first_packet_timestamp=*/Timestamp::Zero());
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_1, delay_based_estimate,
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_10p_loss_2 =
CreatePacketResultsWith10pPacketLossRate(
/*first_packet_timestamp=*/Timestamp::Zero() +
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_2, delay_based_estimate,
/*in_alr=*/false);
// At 10% loss rate and high loss rate threshold to be 10%, cap the estimate
// to be 500 * 1000-0.1 = 400kbps.
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(400));
}
TEST_F(LossBasedBweV2Test,
StricterBoundUsingHighLossRateThresholdAt50pLossRate) {
ExplicitKeyValueConfig key_value_config(
ShortObservationConfig("HighLossRateThreshold:0.3"));
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
loss_based_bandwidth_estimator.SetMinMaxBitrate(
/*min_bitrate=*/DataRate::KilobitsPerSec(10),
/*max_bitrate=*/DataRate::KilobitsPerSec(1000000));
DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000);
loss_based_bandwidth_estimator.SetBandwidthEstimate(
DataRate::KilobitsPerSec(600));
std::vector<PacketResult> enough_feedback_50p_loss_1 =
CreatePacketResultsWith50pPacketLossRate(
/*first_packet_timestamp=*/Timestamp::Zero());
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_50p_loss_1, delay_based_estimate,
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_50p_loss_2 =
CreatePacketResultsWith50pPacketLossRate(
/*first_packet_timestamp=*/Timestamp::Zero() +
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_50p_loss_2, delay_based_estimate,
/*in_alr=*/false);
// At 50% loss rate and high loss rate threshold to be 30%, cap the estimate
// to be the min bitrate.
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(10));
}
TEST_F(LossBasedBweV2Test,
StricterBoundUsingHighLossRateThresholdAt100pLossRate) {
ExplicitKeyValueConfig key_value_config(
ShortObservationConfig("HighLossRateThreshold:0.3"));
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
loss_based_bandwidth_estimator.SetMinMaxBitrate(
/*min_bitrate=*/DataRate::KilobitsPerSec(10),
/*max_bitrate=*/DataRate::KilobitsPerSec(1000000));
DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000);
loss_based_bandwidth_estimator.SetBandwidthEstimate(
DataRate::KilobitsPerSec(600));
std::vector<PacketResult> enough_feedback_100p_loss_1 =
CreatePacketResultsWith100pLossRate(
/*first_packet_timestamp=*/Timestamp::Zero());
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_100p_loss_2 =
CreatePacketResultsWith100pLossRate(
/*first_packet_timestamp=*/Timestamp::Zero() +
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_2, delay_based_estimate,
/*in_alr=*/false);
// At 100% loss rate and high loss rate threshold to be 30%, cap the estimate
// to be the min bitrate.
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(10));
}
TEST_F(LossBasedBweV2Test, EstimateRecoversAfterHighLoss) {
ExplicitKeyValueConfig key_value_config(
ShortObservationConfig("HighLossRateThreshold:0.3"));
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
loss_based_bandwidth_estimator.SetMinMaxBitrate(
/*min_bitrate=*/DataRate::KilobitsPerSec(10),
/*max_bitrate=*/DataRate::KilobitsPerSec(1000000));
DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000);
loss_based_bandwidth_estimator.SetBandwidthEstimate(
DataRate::KilobitsPerSec(600));
std::vector<PacketResult> enough_feedback_100p_loss_1 =
CreatePacketResultsWith100pLossRate(
/*first_packet_timestamp=*/Timestamp::Zero());
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
/*in_alr=*/false);
// Make sure that the estimate is set to min bitrate because of 100% loss
// rate.
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(10));
// Create some feedbacks with 0 loss rate to simulate network recovering.
std::vector<PacketResult> enough_feedback_0p_loss_1 =
CreatePacketResultsWithReceivedPackets(
/*first_packet_timestamp=*/Timestamp::Zero() +
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_0p_loss_1, delay_based_estimate,
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_0p_loss_2 =
CreatePacketResultsWithReceivedPackets(
/*first_packet_timestamp=*/Timestamp::Zero() +
kObservationDurationLowerBound * 2);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_0p_loss_2, delay_based_estimate,
/*in_alr=*/false);
// The estimate increases as network recovers.
EXPECT_GT(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(10));
}
TEST_F(LossBasedBweV2Test, EstimateIsNotHigherThanMaxBitrate) {
ExplicitKeyValueConfig key_value_config(
Config(/*enabled=*/true, /*valid=*/true));