Bug 1867099 - Vendor libwebrtc from 1db39801d3

Upstream commit: https://webrtc.googlesource.com/src/+/1db39801d3bee5ecbac993eaa3cbcd67eaf90174
    Remove upper_link_capacity from loss_based_bwe_v2.

    Bug: webrtc:12707
    Change-Id: I7909c4ef47239978eb26ad5b9644595e4a415a81
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321121
    Reviewed-by: Per Kjellander <perkj@webrtc.org>
    Commit-Queue: Diep Bui <diepbp@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#40787}
This commit is contained in:
Michael Froman 2023-11-29 16:35:35 -06:00
parent bd5aa7dbd1
commit 0765430537
9 changed files with 74 additions and 78 deletions

View File

@ -26076,3 +26076,6 @@ e3e030e54e
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
70eec6d760
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
1db39801d3

View File

@ -17408,3 +17408,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T22:33:24.664061.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T22:34:23.660645.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2023-11-29T22:35:22.310344.

View File

@ -576,7 +576,6 @@ NetworkControlUpdate GoogCcNetworkController::OnTransportPacketsFeedback(
}
bandwidth_estimation_->UpdateLossBasedEstimator(
report, result.delay_detector_state, probe_bitrate,
estimate_ ? estimate_->link_capacity_upper : DataRate::PlusInfinity(),
alr_start_time.has_value());
if (result.updated) {
// Update the estimate in the ProbeController, in case we want to probe.

View File

@ -217,10 +217,8 @@ void LossBasedBweV2::UpdateBandwidthEstimate(
DataRate delay_based_estimate,
BandwidthUsage delay_detector_state,
absl::optional<DataRate> probe_bitrate,
DataRate upper_link_capacity,
bool in_alr) {
delay_based_estimate_ = delay_based_estimate;
upper_link_capacity_ = upper_link_capacity;
if (!IsEnabled()) {
RTC_LOG(LS_WARNING)
<< "The estimator must be enabled before it can be used.";

View File

@ -68,7 +68,6 @@ class LossBasedBweV2 {
DataRate delay_based_estimate,
BandwidthUsage delay_detector_state,
absl::optional<DataRate> probe_bitrate,
DataRate upper_link_capacity,
bool in_alr);
private:
@ -199,7 +198,6 @@ class LossBasedBweV2 {
LossBasedState current_state_ = LossBasedState::kDelayBasedEstimate;
DataRate probe_bitrate_ = DataRate::PlusInfinity();
DataRate delay_based_estimate_ = DataRate::PlusInfinity();
DataRate upper_link_capacity_ = DataRate::PlusInfinity();
Timestamp last_probe_timestamp_ = Timestamp::MinusInfinity();
};

View File

@ -13,6 +13,7 @@
#include <string>
#include <vector>
#include "absl/types/optional.h"
#include "api/network_state_predictor.h"
#include "api/transport/network_types.h"
#include "api/units/data_rate.h"
@ -206,7 +207,7 @@ TEST_P(LossBasedBweV2Test, ReturnsDelayBasedEstimateWhenDisabled) {
/*delay_based_estimate=*/DataRate::KilobitsPerSec(100),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(100));
@ -223,7 +224,7 @@ TEST_P(LossBasedBweV2Test,
/*delay_based_estimate=*/DataRate::KilobitsPerSec(100),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(100));
@ -246,7 +247,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_TRUE(loss_based_bandwidth_estimator.IsReady());
EXPECT_TRUE(loss_based_bandwidth_estimator.GetLossBasedResult()
@ -266,7 +267,7 @@ TEST_P(LossBasedBweV2Test, NoBandwidthEstimateGivenNoInitialization) {
enough_feedback, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_FALSE(loss_based_bandwidth_estimator.IsReady());
EXPECT_TRUE(loss_based_bandwidth_estimator.GetLossBasedResult()
@ -303,7 +304,7 @@ TEST_P(LossBasedBweV2Test, NoBandwidthEstimateGivenNotEnoughFeedback) {
not_enough_feedback, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_FALSE(loss_based_bandwidth_estimator.IsReady());
EXPECT_TRUE(loss_based_bandwidth_estimator.GetLossBasedResult()
@ -331,7 +332,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_NE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -348,7 +349,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_NE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -379,12 +380,12 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
loss_based_bandwidth_estimator_2.UpdateBandwidthEstimate(
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator_1.GetLossBasedResult().bandwidth_estimate,
@ -401,12 +402,12 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
loss_based_bandwidth_estimator_2.UpdateBandwidthEstimate(
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_NE(
loss_based_bandwidth_estimator_1.GetLossBasedResult().bandwidth_estimate,
@ -430,7 +431,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_no_received_packets,
/*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -460,7 +461,7 @@ TEST_P(LossBasedBweV2Test, BandwidthEstimateNotIncreaseWhenNetworkUnderusing) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwUnderusing, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_LE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(600));
@ -468,7 +469,7 @@ TEST_P(LossBasedBweV2Test, BandwidthEstimateNotIncreaseWhenNetworkUnderusing) {
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_LE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
DataRate::KilobitsPerSec(600));
@ -498,7 +499,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// If the delay based estimate is infinity, then loss based estimate increases
// and not bounded by delay based estimate.
EXPECT_GT(
@ -508,7 +509,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_2, /*delay_based_estimate=*/DataRate::KilobitsPerSec(500),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// If the delay based estimate is not infinity, then loss based estimate is
// bounded by delay based estimate.
EXPECT_EQ(
@ -543,14 +544,14 @@ TEST_P(LossBasedBweV2Test, UseAckedBitrateForEmegencyBackOff) {
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwOverusing,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Update estimate again when network is continuously overusing, and 100%
// loss rate.
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwOverusing,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate bitrate now is backed off based on acked bitrate.
EXPECT_LE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -576,7 +577,7 @@ TEST_P(LossBasedBweV2Test, NoBweChangeIfObservationDurationUnchanged) {
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_1 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
@ -585,7 +586,7 @@ TEST_P(LossBasedBweV2Test, NoBweChangeIfObservationDurationUnchanged) {
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_2 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
EXPECT_EQ(estimate_2, estimate_1);
@ -613,7 +614,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_1 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
@ -621,7 +622,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_2 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
EXPECT_EQ(estimate_2, estimate_1);
@ -649,14 +650,14 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_1 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwUnderusing, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_2 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
EXPECT_LE(estimate_2, estimate_1);
@ -691,7 +692,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_1, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_1 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
@ -699,7 +700,7 @@ TEST_P(LossBasedBweV2Test,
enough_feedback_2, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwOverusing,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
DataRate estimate_2 =
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate;
EXPECT_LT(estimate_2, estimate_1);
@ -725,14 +726,14 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
delay_based_estimate);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
delay_based_estimate);
@ -761,7 +762,7 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
LossBasedBweV2::Result result_at_loss =
loss_based_bandwidth_estimator.GetLossBasedResult();
@ -775,7 +776,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
LossBasedBweV2::Result result_after_recovery =
loss_based_bandwidth_estimator.GetLossBasedResult();
@ -807,7 +808,7 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
ASSERT_EQ(loss_based_bandwidth_estimator.GetLossBasedResult().state,
LossBasedState::kDecreasing);
@ -821,7 +822,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(loss_based_bandwidth_estimator.GetLossBasedResult().state,
LossBasedState::kDelayBasedEstimate);
@ -835,7 +836,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_3, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_EQ(loss_based_bandwidth_estimator.GetLossBasedResult().state,
LossBasedState::kDelayBasedEstimate);
}
@ -864,7 +865,7 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
ASSERT_EQ(loss_based_bandwidth_estimator.GetLossBasedResult().state,
LossBasedState::kDecreasing);
@ -878,7 +879,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_NE(loss_based_bandwidth_estimator.GetLossBasedResult().state,
LossBasedState::kDelayBasedEstimate);
}
@ -909,7 +910,7 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
// Change the acked bitrate to make sure that the estimate is bounded by a
// factor of acked bitrate.
@ -918,7 +919,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate is capped by acked_bitrate * BwRampupUpperBoundFactor.
DataRate estimate_2 =
@ -954,7 +955,7 @@ TEST_P(LossBasedBweV2Test,
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);
/*in_alr=*/false);
// Increase the acknowledged bitrate to make sure that the estimate is not
// capped too low.
loss_based_bandwidth_estimator.SetAcknowledgedBitrate(
@ -962,7 +963,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate is capped by current_estimate * kMaxIncreaseFactor because
// it recently backed off.
@ -972,7 +973,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_3, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The latest estimate is the same as the previous estimate since the sent
// packets were sent within the DelayedIncreaseWindow.
EXPECT_EQ(
@ -1006,7 +1007,7 @@ TEST_P(LossBasedBweV2Test, KeepIncreasingEstimateAfterDelayedIncreaseWindow) {
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);
/*in_alr=*/false);
// Increase the acknowledged bitrate to make sure that the estimate is not
// capped too low.
loss_based_bandwidth_estimator.SetAcknowledgedBitrate(
@ -1014,7 +1015,7 @@ TEST_P(LossBasedBweV2Test, KeepIncreasingEstimateAfterDelayedIncreaseWindow) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate is capped by current_estimate * kMaxIncreaseFactor because it
// recently backed off.
@ -1024,7 +1025,7 @@ TEST_P(LossBasedBweV2Test, KeepIncreasingEstimateAfterDelayedIncreaseWindow) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_3, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate can continue increasing after the DelayedIncreaseWindow.
EXPECT_GE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -1051,7 +1052,7 @@ TEST_P(LossBasedBweV2Test, NotIncreaseIfInherentLossLessThanAverageLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_10p_loss_2 =
CreatePacketResultsWith10pLossRate(
@ -1060,7 +1061,7 @@ TEST_P(LossBasedBweV2Test, NotIncreaseIfInherentLossLessThanAverageLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Do not increase the bitrate because inherent loss is less than average loss
EXPECT_EQ(
@ -1090,7 +1091,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_10p_loss_2 =
CreatePacketResultsWith10pLossRate(
@ -1099,7 +1100,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Because LossThresholdOfHighBandwidthPreference is 20%, the average loss is
// 10%, bandwidth estimate should increase.
@ -1130,7 +1131,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_10p_loss_2 =
CreatePacketResultsWith10pLossRate(
@ -1139,7 +1140,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Because LossThresholdOfHighBandwidthPreference is 5%, the average loss is
// 10%, bandwidth estimate should decrease.
@ -1170,7 +1171,7 @@ TEST_P(LossBasedBweV2Test, LimitByProbeResultWhenRecoveringFromLoss) {
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);
/*in_alr=*/false);
// Network recovers after loss
DataRate probe_estimate = DataRate::KilobitsPerSec(300);
@ -1180,7 +1181,7 @@ TEST_P(LossBasedBweV2Test, LimitByProbeResultWhenRecoveringFromLoss) {
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
probe_estimate, /*upper_link_capacity=*/DataRate::PlusInfinity(),
probe_estimate,
/*in_alr=*/false);
for (int i = 2; i < 5; ++i) {
@ -1190,7 +1191,6 @@ TEST_P(LossBasedBweV2Test, LimitByProbeResultWhenRecoveringFromLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(),
/*in_alr=*/false);
LossBasedBweV2::Result result_after_recovery =
loss_based_bandwidth_estimator.GetLossBasedResult();
@ -1221,7 +1221,7 @@ TEST_P(LossBasedBweV2Test, NotLimitByProbeResultWhenProbeResultIsExpired) {
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);
/*in_alr=*/false);
// Network recovers after loss
DataRate probe_estimate = DataRate::KilobitsPerSec(300);
@ -1231,7 +1231,7 @@ TEST_P(LossBasedBweV2Test, NotLimitByProbeResultWhenProbeResultIsExpired) {
kObservationDurationLowerBound);
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
probe_estimate, /*upper_link_capacity=*/DataRate::PlusInfinity(),
probe_estimate,
/*in_alr=*/false);
for (int i = 2; i < 5; ++i) {
@ -1241,7 +1241,6 @@ TEST_P(LossBasedBweV2Test, NotLimitByProbeResultWhenProbeResultIsExpired) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_2, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(),
/*in_alr=*/false);
}
@ -1252,7 +1251,6 @@ TEST_P(LossBasedBweV2Test, NotLimitByProbeResultWhenProbeResultIsExpired) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_3, delay_based_estimate, BandwidthUsage::kBwNormal,
/*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(),
/*in_alr=*/false);
// Probe result is expired after 10s.
@ -1285,7 +1283,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_10p_loss_2 =
CreatePacketResultsWith10pLossRate(
@ -1294,7 +1292,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_10p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*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.
@ -1327,7 +1325,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_50p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_50p_loss_2 =
CreatePacketResultsWith50pLossRate(
@ -1336,7 +1334,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_50p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// At 50% loss rate and high loss rate threshold to be 30%, cap the estimate
// to be the min bitrate.
@ -1369,7 +1367,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_100p_loss_2 =
CreatePacketResultsWith100pLossRate(
@ -1378,7 +1376,7 @@ TEST_P(LossBasedBweV2Test,
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// At 100% loss rate and high loss rate threshold to be 30%, cap the estimate
// to be the min bitrate.
@ -1410,7 +1408,7 @@ TEST_P(LossBasedBweV2Test, EstimateRecoversAfterHighLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Make sure that the estimate is set to min bitrate because of 100% loss
// rate.
@ -1426,7 +1424,7 @@ TEST_P(LossBasedBweV2Test, EstimateRecoversAfterHighLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_0p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
std::vector<PacketResult> enough_feedback_0p_loss_2 =
CreatePacketResultsWithReceivedPackets(
@ -1435,7 +1433,7 @@ TEST_P(LossBasedBweV2Test, EstimateRecoversAfterHighLoss) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_0p_loss_2, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// The estimate increases as network recovers.
EXPECT_GT(
@ -1459,7 +1457,7 @@ TEST_P(LossBasedBweV2Test, EstimateIsNotHigherThanMaxBitrate) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback, /*delay_based_estimate=*/DataRate::PlusInfinity(),
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
EXPECT_LE(
loss_based_bandwidth_estimator.GetLossBasedResult().bandwidth_estimate,
@ -1489,7 +1487,7 @@ TEST_P(LossBasedBweV2Test, NotBackOffToAckedRateInAlr) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/true);
/*in_alr=*/true);
// Make sure that the estimate decreases but higher than acked rate.
EXPECT_GT(
@ -1524,7 +1522,7 @@ TEST_P(LossBasedBweV2Test, BackOffToAckedRateIfNotInAlr) {
loss_based_bandwidth_estimator.UpdateBandwidthEstimate(
enough_feedback_100p_loss_1, delay_based_estimate,
BandwidthUsage::kBwNormal, /*probe_estimate=*/absl::nullopt,
/*upper_link_capacity=*/DataRate::PlusInfinity(), /*in_alr=*/false);
/*in_alr=*/false);
// Make sure that the estimate decreases but higher than acked rate.
EXPECT_EQ(

View File

@ -380,7 +380,6 @@ void SendSideBandwidthEstimation::UpdateLossBasedEstimator(
const TransportPacketsFeedback& report,
BandwidthUsage delay_detector_state,
absl::optional<DataRate> probe_bitrate,
DataRate upper_link_capacity,
bool in_alr) {
if (LossBasedBandwidthEstimatorV1Enabled()) {
loss_based_bandwidth_estimator_v1_.UpdateLossStatistics(
@ -389,7 +388,7 @@ void SendSideBandwidthEstimation::UpdateLossBasedEstimator(
if (LossBasedBandwidthEstimatorV2Enabled()) {
loss_based_bandwidth_estimator_v2_.UpdateBandwidthEstimate(
report.packet_feedbacks, delay_based_limit_, delay_detector_state,
probe_bitrate, upper_link_capacity, in_alr);
probe_bitrate, in_alr);
UpdateEstimate(report.feedback_time);
}
}

View File

@ -127,7 +127,6 @@ class SendSideBandwidthEstimation {
void UpdateLossBasedEstimator(const TransportPacketsFeedback& report,
BandwidthUsage delay_detector_state,
absl::optional<DataRate> probe_bitrate,
DataRate upper_link_capacity,
bool in_alr);
private:

View File

@ -8,10 +8,10 @@ Subject: Bug 1766646 - (fix-f137b75a4d) specify default constructor on
1 file changed, 1 insertion(+), 1 deletion(-)
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 08ad584f05..9309e79936 100644
index 3ad910bdb1..859be9e8a2 100644
--- a/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
+++ b/modules/congestion_controller/goog_cc/loss_based_bwe_v2.cc
@@ -463,7 +463,7 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
@@ -461,7 +461,7 @@ absl::optional<LossBasedBweV2::Config> LossBasedBweV2::CreateConfig(
if (!enabled.Get()) {
return config;
}