diff --git a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc index 4d1a097a63..08ad584f05 100644 --- a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc +++ b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc @@ -416,8 +416,6 @@ absl::optional LossBasedBweV2::CreateConfig( false); FieldTrialParameter probe_expiration("ProbeExpiration", TimeDelta::Seconds(10)); - FieldTrialParameter bound_by_upper_link_capacity_when_loss_limited( - "BoundByUpperLinkCapacityWhenLossLimited", true); FieldTrialParameter not_use_acked_rate_in_alr("NotUseAckedRateInAlr", false); if (key_value_config) { @@ -457,7 +455,6 @@ absl::optional LossBasedBweV2::CreateConfig( &high_loss_rate_threshold, &bandwidth_cap_at_high_loss_rate, &slope_of_bwe_high_loss_func, - &bound_by_upper_link_capacity_when_loss_limited, ¬_use_acked_rate_in_alr}, key_value_config->Lookup("WebRTC-Bwe-LossBasedBweV2")); } @@ -520,8 +517,6 @@ absl::optional LossBasedBweV2::CreateConfig( config->slope_of_bwe_high_loss_func = slope_of_bwe_high_loss_func.Get(); config->probe_integration_enabled = probe_integration_enabled.Get(); config->probe_expiration = probe_expiration.Get(); - config->bound_by_upper_link_capacity_when_loss_limited = - bound_by_upper_link_capacity_when_loss_limited.Get(); config->not_use_acked_rate_in_alr = not_use_acked_rate_in_alr.Get(); return config; @@ -965,12 +960,6 @@ void LossBasedBweV2::CalculateInstantUpperBound() { } } - if (IsBandwidthLimitedDueToLoss()) { - if (IsValid(upper_link_capacity_) && - config_->bound_by_upper_link_capacity_when_loss_limited) { - instant_limit = std::min(instant_limit, upper_link_capacity_); - } - } cached_instant_upper_bound_ = instant_limit; } diff --git a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h index fe17e635af..fac4d49bd0 100644 --- a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h +++ b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.h @@ -114,7 +114,6 @@ class LossBasedBweV2 { double slope_of_bwe_high_loss_func = 1000.0; bool probe_integration_enabled = false; TimeDelta probe_expiration = TimeDelta::Zero(); - bool bound_by_upper_link_capacity_when_loss_limited = false; bool not_use_acked_rate_in_alr = false; }; diff --git a/modules/congestion_controller/goog_cc/loss_based_bwe_v2_test.cc b/modules/congestion_controller/goog_cc/loss_based_bwe_v2_test.cc index d745f37a5c..963d8ff0f0 100644 --- a/modules/congestion_controller/goog_cc/loss_based_bwe_v2_test.cc +++ b/modules/congestion_controller/goog_cc/loss_based_bwe_v2_test.cc @@ -1261,132 +1261,6 @@ TEST_P(LossBasedBweV2Test, NotLimitByProbeResultWhenProbeResultIsExpired) { EXPECT_GT(result_after_recovery.bandwidth_estimate, probe_estimate); } -// If BoundByUpperLinkCapacityWhenLossLimited is enabled, the estimate is -// bounded by the upper link capacity when bandwidth is loss limited. -TEST_P(LossBasedBweV2Test, BoundEstimateByUpperLinkCapacityWhenLossLimited) { - ExplicitKeyValueConfig key_value_config( - "WebRTC-Bwe-LossBasedBweV2/" - "Enabled:true,CandidateFactors:1.2|1|0.5,AckedRateCandidate:true," - "ObservationWindowSize:2,ObservationDurationLowerBound:200ms," - "InstantUpperBoundBwBalance:10000kbps," - "DelayBasedCandidate:true,MaxIncreaseFactor:1000," - "BwRampupUpperBoundFactor:2.0,BoundByUpperLinkCapacityWhenLossLimited:" - "true/"); - LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config); - DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000); - DataRate acked_rate = DataRate::KilobitsPerSec(300); - loss_based_bandwidth_estimator.SetBandwidthEstimate( - DataRate::KilobitsPerSec(600)); - loss_based_bandwidth_estimator.SetAcknowledgedBitrate(acked_rate); - - // Create some loss to create the loss limited scenario. - std::vector enough_feedback_1 = - CreatePacketResultsWith100pLossRate( - /*first_packet_timestamp=*/Timestamp::Zero()); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_1, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, - /*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false); - - // Network recovers after loss. - DataRate upper_link_capacity = DataRate::KilobitsPerSec(10); - std::vector enough_feedback_2 = - CreatePacketResultsWithReceivedPackets( - /*first_packet_timestamp=*/Timestamp::Zero() + - kObservationDurationLowerBound); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, upper_link_capacity, /*in_alr=*/false); - - LossBasedBweV2::Result result_after_recovery = - loss_based_bandwidth_estimator.GetLossBasedResult(); - EXPECT_EQ(result_after_recovery.bandwidth_estimate, upper_link_capacity); -} - -// If BoundByUpperLinkCapacityWhenLossLimited is enabled, the estimate is not -// bounded by the upper link capacity when bandwidth is not loss limited. -TEST_P(LossBasedBweV2Test, - NotBoundEstimateByUpperLinkCapacityWhenNotLossLimited) { - ExplicitKeyValueConfig key_value_config( - "WebRTC-Bwe-LossBasedBweV2/" - "Enabled:true,CandidateFactors:1.2|1|0.5,AckedRateCandidate:true," - "ObservationWindowSize:2,ObservationDurationLowerBound:200ms," - "InstantUpperBoundBwBalance:10000kbps," - "DelayBasedCandidate:true,MaxIncreaseFactor:1000," - "BwRampupUpperBoundFactor:2.0,BoundByUpperLinkCapacityWhenLossLimited:" - "true/"); - LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config); - DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000); - DataRate acked_rate = DataRate::KilobitsPerSec(300); - loss_based_bandwidth_estimator.SetBandwidthEstimate( - DataRate::KilobitsPerSec(600)); - loss_based_bandwidth_estimator.SetAcknowledgedBitrate(acked_rate); - - // Create a normal network without loss - std::vector enough_feedback_1 = - CreatePacketResultsWithReceivedPackets( - /*first_packet_timestamp=*/Timestamp::Zero()); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_1, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, - /*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false); - - DataRate upper_link_capacity = DataRate::KilobitsPerSec(10); - std::vector enough_feedback_2 = - CreatePacketResultsWithReceivedPackets( - /*first_packet_timestamp=*/Timestamp::Zero() + - kObservationDurationLowerBound); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, upper_link_capacity, /*in_alr=*/false); - - LossBasedBweV2::Result loss_based_result = - loss_based_bandwidth_estimator.GetLossBasedResult(); - EXPECT_GT(loss_based_result.bandwidth_estimate, upper_link_capacity); -} - -// If BoundByUpperLinkCapacityWhenLossLimited is disabled, the estimate is not -// bounded by the upper link capacity. -TEST_P(LossBasedBweV2Test, NotBoundEstimateByUpperLinkCapacity) { - ExplicitKeyValueConfig key_value_config( - "WebRTC-Bwe-LossBasedBweV2/" - "Enabled:true,CandidateFactors:1.2|1|0.5,AckedRateCandidate:true," - "ObservationWindowSize:2,ObservationDurationLowerBound:200ms," - "InstantUpperBoundBwBalance:10000kbps," - "DelayBasedCandidate:true,MaxIncreaseFactor:1000," - "BwRampupUpperBoundFactor:2.0,BoundByUpperLinkCapacityWhenLossLimited:" - "false/"); - LossBasedBweV2 loss_based_bandwidth_estimator(&key_value_config); - DataRate delay_based_estimate = DataRate::KilobitsPerSec(5000); - DataRate acked_rate = DataRate::KilobitsPerSec(300); - loss_based_bandwidth_estimator.SetBandwidthEstimate( - DataRate::KilobitsPerSec(600)); - loss_based_bandwidth_estimator.SetAcknowledgedBitrate(acked_rate); - - // Create some loss to create the loss limited scenario. - std::vector enough_feedback_1 = - CreatePacketResultsWith100pLossRate( - /*first_packet_timestamp=*/Timestamp::Zero()); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_1, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, - /*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false); - - // Network recovers after loss. - DataRate upper_link_capacity = DataRate::KilobitsPerSec(10); - std::vector enough_feedback_2 = - CreatePacketResultsWithReceivedPackets( - /*first_packet_timestamp=*/Timestamp::Zero() + - kObservationDurationLowerBound); - loss_based_bandwidth_estimator.UpdateBandwidthEstimate( - enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal, - /*probe_estimate=*/absl::nullopt, upper_link_capacity, /*in_alr=*/false); - - LossBasedBweV2::Result result_after_recovery = - loss_based_bandwidth_estimator.GetLossBasedResult(); - EXPECT_GT(result_after_recovery.bandwidth_estimate, upper_link_capacity); -} - TEST_P(LossBasedBweV2Test, StricterBoundUsingHighLossRateThresholdAt10pLossRate) { ExplicitKeyValueConfig key_value_config(