Use instant upper bound as LossBased candidate in ALR
Addes field trial UpperBoundCandidateInAlr to LossBasedBweV2. If an instant upper bound exist in ALR that are lower than current estimate, use it as a candidate. Bug: webrtc:12707 Change-Id: I55595c7225c4289e1bc4edde9d9576e0443d3dce Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324220 Auto-Submit: Per Kjellander <perkj@webrtc.org> Reviewed-by: Diep Bui <diepbp@webrtc.org> Commit-Queue: Per Kjellander <perkj@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40986}
This commit is contained in:
parent
683db76c0f
commit
32f6c6e8b9
@ -380,6 +380,8 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
|
||||
"AckedRateCandidate", true);
|
||||
FieldTrialParameter<bool> append_delay_based_estimate_candidate(
|
||||
"DelayBasedCandidate", true);
|
||||
FieldTrialParameter<bool> append_upper_bound_candidate_in_alr(
|
||||
"UpperBoundCandidateInAlr", false);
|
||||
FieldTrialParameter<TimeDelta> observation_duration_lower_bound(
|
||||
"ObservationDurationLowerBound", TimeDelta::Millis(250));
|
||||
FieldTrialParameter<int> observation_window_size("ObservationWindowSize", 20);
|
||||
@ -433,6 +435,7 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
|
||||
&newton_step_size,
|
||||
&append_acknowledged_rate_candidate,
|
||||
&append_delay_based_estimate_candidate,
|
||||
&append_upper_bound_candidate_in_alr,
|
||||
&observation_duration_lower_bound,
|
||||
&observation_window_size,
|
||||
&sending_rate_smoothing_factor,
|
||||
@ -485,6 +488,8 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
|
||||
append_acknowledged_rate_candidate.Get();
|
||||
config->append_delay_based_estimate_candidate =
|
||||
append_delay_based_estimate_candidate.Get();
|
||||
config->append_upper_bound_candidate_in_alr =
|
||||
append_upper_bound_candidate_in_alr.Get();
|
||||
config->observation_duration_lower_bound =
|
||||
observation_duration_lower_bound.Get();
|
||||
config->observation_window_size = observation_window_size.Get();
|
||||
@ -776,6 +781,11 @@ std::vector<LossBasedBweV2::ChannelParameters> LossBasedBweV2::GetCandidates(
|
||||
}
|
||||
}
|
||||
|
||||
if (in_alr && config_->append_upper_bound_candidate_in_alr &&
|
||||
current_best_estimate_.loss_limited_bandwidth > GetInstantUpperBound()) {
|
||||
bandwidths.push_back(GetInstantUpperBound());
|
||||
}
|
||||
|
||||
const DataRate candidate_bandwidth_upper_bound =
|
||||
GetCandidateBandwidthUpperBound();
|
||||
|
||||
|
||||
@ -99,6 +99,7 @@ class LossBasedBweV2 {
|
||||
double newton_step_size = 0.0;
|
||||
bool append_acknowledged_rate_candidate = true;
|
||||
bool append_delay_based_estimate_candidate = false;
|
||||
bool append_upper_bound_candidate_in_alr = false;
|
||||
TimeDelta observation_duration_lower_bound = TimeDelta::Zero();
|
||||
int observation_window_size = 0;
|
||||
double sending_rate_smoothing_factor = 0.0;
|
||||
|
||||
@ -1388,6 +1388,38 @@ TEST_F(LossBasedBweV2Test, HasIncreaseStateBecauseOfLowerBound) {
|
||||
LossBasedState::kIncreasing);
|
||||
}
|
||||
|
||||
TEST_F(LossBasedBweV2Test,
|
||||
EstimateIncreaseSlowlyFromInstantUpperBoundInAlrIfFieldTrial) {
|
||||
ExplicitKeyValueConfig key_value_config(
|
||||
ShortObservationConfig("UpperBoundCandidateInAlr:true"));
|
||||
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
|
||||
loss_based_bandwidth_estimator.SetBandwidthEstimate(
|
||||
DataRate::KilobitsPerSec(1000));
|
||||
loss_based_bandwidth_estimator.SetAcknowledgedBitrate(
|
||||
DataRate::KilobitsPerSec(150));
|
||||
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
|
||||
CreatePacketResultsWith50pLossRate(
|
||||
/*first_packet_timestamp=*/Timestamp::Zero()),
|
||||
/*delay_based_estimate=*/DataRate::PlusInfinity(),
|
||||
/*in_alr=*/true);
|
||||
LossBasedBweV2::Result result_after_loss =
|
||||
loss_based_bandwidth_estimator.GetLossBasedResult();
|
||||
ASSERT_EQ(result_after_loss.state, LossBasedState::kDecreasing);
|
||||
|
||||
for (int feedback_count = 1; feedback_count <= 3; ++feedback_count) {
|
||||
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
|
||||
CreatePacketResultsWithReceivedPackets(
|
||||
/*first_packet_timestamp=*/Timestamp::Zero() +
|
||||
feedback_count * kObservationDurationLowerBound),
|
||||
/*delay_based_estimate=*/DataRate::PlusInfinity(),
|
||||
/*in_alr=*/true);
|
||||
}
|
||||
// Expect less than 100% increase.
|
||||
EXPECT_LT(
|
||||
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
|
||||
2 * result_after_loss.bandwidth_estimate);
|
||||
}
|
||||
|
||||
TEST_F(LossBasedBweV2Test, HasDelayBasedStateIfLossBasedBweIsMax) {
|
||||
ExplicitKeyValueConfig key_value_config(ShortObservationConfig(""));
|
||||
LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user