Commit graph

450 commits

Author SHA1 Message Date
Per K
0478d3e15c Ensure loss spikes are ignored
If all packets are dropped for a period of time, an observation window will have the same length as the period when packets are dropped.
If later, no packets are lost, there is no point in loss based bwe backing down.
Therefore, ignore the observation with most loss and least loss when calculating an instant upper bound.


Bug: webrtc:42222865
Change-Id: I1d0125d6c76e68018b2aec1ecaa9b65729963136
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356380
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@google.com>
Cr-Commit-Position: refs/heads/main@{#42772}
2024-08-13 14:47:45 +00:00
Per K
fb2c7bc8bd Remember lost packets between RTCP feedback reports
The idea is to reduce the risk of calculating a packet as lost if a
packet is reordered between two feedback reports.
It works as long as the recevied feedback does not complete an
observation.

Bug: webrtc:42222865 b/349765923
Change-Id: Iaf1595e624f546951baf3998d161f4cd1d5d491b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355942
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42562}
2024-06-28 17:27:55 +00:00
lauren n. liberda
4157f3def0 stdc++: remove unneeded absl::optional wrapping
std::optional<T>::emplace() without an initializer is broken on clang++
with gnu libstdc++. this workarounds the bug by removing the
absl::optional wrapping, which is actually pointless.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101227

Bug: chromium:41455655
Change-Id: I05354e57cc4cdda3fa6d3cd23f46462b69cc3bee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355900
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42561}
2024-06-28 16:35:18 +00:00
Per K
41b934fe37 Fix GoogCcNetworkController::OnNetworkStateEstimate behaviour
Ensure OnNetworkStateEstimate behaves the same way as internal networks state updates.
Also, ignore OnNetworkStateEstimate if an internal estimator exist.

Bug: webrtc:10742
Change-Id: I7967d202381250c406824fb2d0574bb95d2cd592
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354102
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@google.com>
Cr-Commit-Position: refs/heads/main@{#42456}
2024-06-10 10:43:57 +00:00
Per K
49c860fd61 Remove BWE logging functionality
BWE logging has as far as I know know been used for a long time. RTC event logs are the prefered method of logging.
Removed since it causes some BUILD pain.

For debugging  the metrics API https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/api/test/metrics/ can be used instead.

Bug: webrtc:343347276
Change-Id: I046b58d880faabfadbc22269b0392fdd644155fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352602
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42402}
2024-05-29 12:18:44 +00:00
Björn Terelius
d297c4c23f Include-what-you-use goog_cc/
Bug: webrtc:42226242
Change-Id: I34ce35c78dbe3d08f8c43fbbe70e420a9eb3dd4c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351662
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42385}
2024-05-27 14:29:33 +00:00
Björn Terelius
0596503938 Split BandwidthUsage from network_state_predictor.h
Bug: None
Change-Id: Ie1d0c1fd4b32fc5f9e4252bfe0fd2ca1412bd594
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351002
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42376}
2024-05-24 13:44:37 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Per K
819cfb0608 Add GoogCCScenario test of WebRTC-Bwe-ResetOnAdapterIdChange
The test tests that a route change does not cause BWE do drop unless the adapter is changed.

Bug: webrtc:42221538
Change-Id: I49be55172aff285c55d2564ec3389f3fc7c01d62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350820
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42347}
2024-05-20 10:30:18 +00:00
Per K
b25c747d5d Change behaviour of repeated initial probes
Repeated initial probes are sent every second until
ProbeController::OnMaxAllocatedBitrate is invoked (Media is beeing sent) or 5s has passed.
Each probe has a duration of 100ms, sent in packet bursts every 20ms.

ProbeController::waiting_for_initial_probe_result_ is no longer needed
and is removed.
Setting field trial for duration between probe packets bursts are moved
from BitrateProber to ProbeController.

Bug: webrtc:14928
Change-Id: I3170533f679fc2cc2aa5402e248fa1f6996d3ccd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350640
Reviewed-by: Diep Bui <diepbp@google.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42323}
2024-05-16 11:38:55 +00:00
Danil Chapovalov
4ea65f4cd1 Use Environment to create GoogCcNetworkController
Environment guarantees field trials are provided, thus GoogCcNetworkController doesn't need to fallback to the global field trials.

Bug: webrtc:42220378
Change-Id: Iff8e00504b43b074dc41b5ac9908fd0e2be18959
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350540
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42300}
2024-05-14 15:37:28 +00:00
Danil Chapovalov
ac426265b6 Cleanup usage of FieldTrialsView by RateControlSettings and CongestionWindowPushbackController
Replace factory that takes optional FieldTrialView with a constructor that takes non-optional reference to the same interface - all callers already guarantee it is not nullptr
Replace several local IsEnabled/IsDisabled helpers with the same helpers in FieldTrialView
In CongestionWindowPushbackController tests pass field trials bypassing global field trial string

Bug: webrtc:42220378
Change-Id: Ic49ad78919d834a5e3b9b69545d3b39088023a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349900
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42270}
2024-05-10 12:40:20 +00:00
Danil Chapovalov
2cdf840b53 Read WebRTC-BweLossExperiment from propagated instead of global field trial
Bug: webrtc:42220378
Change-Id: I4ddb0719aabe89997ba4f2e663515c1b227938ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350301
Reviewed-by: Ying Wang <yinwa@google.com>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42268}
2024-05-10 10:05:27 +00:00
Danil Chapovalov
f20ed3e8ad Add option to provide Environment for CongestionConroller construction
This would allow network controllers, GoogCcNetworkController in particular to have access to Environment at construction and thus it can rely on propagated field trials and won't need to fallback to the global field trial string

Bug: webrtc:42220378
Change-Id: I36099522e3866a89a8c8d6303da03f7d5b1cad8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350201
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42260}
2024-05-08 12:46:23 +00:00
Per K
cc92b6e1bd Add ProbeController::EnableRepeatedInitialProbing
This adds a new mode to the ProbeController that sends probes every
second the first 5seconds. Intented usage is before normal media has
started flowing. If enabled, the max allocated bitrat is ignored during
these initial probes.
The purpose is to have a more accurate estimate at the beginning of a
call.
The cl also removes ProbeController::SetFirstProbeToMaxBitrate.

Bug: webrtc:14928
Change-Id: I04feefb2f1b82ff38b35ee2be810f9119c53536a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349924
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42252}
2024-05-07 19:37:23 +00:00
Per K
d48a18fbbb Limit pacingfactor by upper link capacity estimate.
If pacing rate, (current loss based bwe * pacing factor) is larger than the current upper link capacity estimate, reduce pacing factor to max of current bwe and upper link capacity.

Bug: webrtc:42220543
Change-Id: I5246da1f38530f8d411e7314adaa8651fc848f48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349601
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42210}
2024-05-02 15:13:56 +00:00
Per K
55f6613fc0 Retry initial probe if it times out and BWE has not been updated.
This is to avoid the case where the initial probe fail and the BWE is not updated, which can lead to a long period of low bandwidth.

Bug: webrtc:14928
Change-Id: Ie8f84270507b59995d57e4ab6e2a984570191529
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349580
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42208}
2024-05-02 12:42:32 +00:00
Danil Chapovalov
039288c284 Delete expired field trial WebRTC-Bwe-LinkCapacity
Bug: webrtc:9718
Change-Id: I7ac3712a2008411a80f4739bfa4eeebe5097eb75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347742
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42097}
2024-04-17 12:43:10 +00:00
Per K
fb61154da1 Reland "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 501c4f37bf.

Patch set 1 contains pure reland.

The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

Bug: webrtc:14928
Change-Id: I6a8660da20ac54237f04a29461e03b31bd988bb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347643
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42086}
2024-04-16 15:34:49 +00:00
Per Kjellander
501c4f37bf Revert "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 33cc83595a.

Reason for revert: Perf bots showed that this cl cause a change in metrics. It looks like it is for the better, but we want this to be behind a field trial. 

Original change's description:
> Ignore allocated bitrate during initial exponential BWE.
>
> The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
> That is the, initial probe will try to probe up to the max configured bitrate.
>
> ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
> continue up to the max configured bitrate, regardless of of the max
> allocated bitrate.
>
> Bug: webrtc:14928
> Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42049}

Bug: webrtc:14928
Change-Id: I56ba58560b6857b6069552c02df822691f7af64d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347622
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42081}
2024-04-16 09:50:37 +00:00
Per K
33cc83595a Ignore allocated bitrate during initial exponential BWE.
The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
continue up to the max configured bitrate, regardless of of the max
allocated bitrate.

Bug: webrtc:14928
Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42049}
2024-04-12 09:13:44 +00:00
Per K
08848ea04c Reland "Stop exponential probing if 2xmax allocated bitrate lower than BWE."
This reverts commit 802dd5bdbd.

First patch set is pure reland.
New patch set adds field trial flag.


Original change's description:
Stop exponential probing if 2xmax allocated bitrate lower than BWE.
 
Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.

Bug: webrtc:14928
Change-Id: I35c341bbaced800d9931657d62c73a17a3279b7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344440
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@{#41965}
2024-03-26 08:06:47 +00:00
George Panayotov
802dd5bdbd Revert "Stop exponential probing if 2xmax allocated bitrate lower than BWE."
This reverts commit 5a4ce03101.

Reason for revert: Breaks tests in downstream project.

Original change's description:
> Stop exponential probing if 2xmax allocated bitrate lower than BWE.
>
> Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.
>
> Bug: webrtc:14928
> Change-Id: Id8e314740c2403d3b801d28f634dbc718f77c16e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343384
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41929}

Bug: webrtc:14928
Change-Id: I0d48b37bfb8684fd490f5685e510b438a83254b9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343900
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41958}
2024-03-23 18:04:31 +00:00
Per K
5a4ce03101 Stop exponential probing if 2xmax allocated bitrate lower than BWE.
Without this, if max allocated bitrate is lowered while exponential probing is ongoing, a new probe can be sent at a rate of the new low max allocated bitrate which may cause BWE to decrease.

Bug: webrtc:14928
Change-Id: Id8e314740c2403d3b801d28f634dbc718f77c16e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343384
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41929}
2024-03-19 10:26:55 +00:00
Per K
45242adc4c Add field trial property alloc_current_bwe_limit
The new field trial can be used to ensure probes are limited by the current BWE and does not automatically send a probe at the new max rate.

Also removes unused
  FieldTrialFlag allocation_allow_further_probing;
  FieldTrialParameter<DataRate> allocation_probe_max;



Bug: webrtc:14928
Change-Id: I0d5c350c0231ca0600033ad8211dca0574104201
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339840
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41744}
2024-02-15 12:47:16 +00:00
Diep Bui
14d7d2d845 Add an option to allow pacing at loss based estimate when network bandwidth is loss limited.
Add a small clean up in LossBasedBandwidthEstimatorV2ReadyForUse since IsReady() includes IsEnabled().

Bug: webrtc:12707
Change-Id: I20dfeb2ab31e7724041f89af9f312211a3ae3d23
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339521
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41727}
2024-02-13 11:54:06 +00:00
Joe Downing
3b500e60e8 Fixing a crash in SendSideBandwidthEstmation
This CL addresses a crash we started seeing in M121 where a
function is being called on loss_based_bandwidth_estimator_v2_
without checking whether it is enabled (it's not) which leads
to absl::optional<> throwing since config_ is not valid.

Bug: chromium:1518852
Change-Id: Iffef1051fe7988046e33a709ce281aebefd2bcd7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334103
Commit-Queue: Joe Downing <joedow@google.com>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41538}
2024-01-16 20:42:51 +00:00
Björn Terelius
51563cc36c Ensure that sequence numbers are initialized in DelayBasedBwe unittests
Bug: b/299667054
Change-Id: I6bcc4ec9e3588842e6da7d9265c145680de0c52b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332260
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41431}
2023-12-21 14:51:11 +00:00
Diep Bui
5b11df789f Ensure that acked rate is the lower bound of estimate and candidates.
After https://webrtc-review.googlesource.com/c/src/+/329141, best candidate can still be less than acked rate if not_increase_if_inherent_loss_less_than_average_loss, or the selected candidate is 95% of current estimate. This cl/ is ensure the previous cl works as intended. And add unit test.

Bug: webrtc:12707
Change-Id: Ie5683ca8ea51f6d80c4c59cbf08c22e8b24c0cb9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329441
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41298}
2023-12-01 20:04:14 +00:00
Diep Bui
3a530abb0e Use acked rate as lower bound of both HOLD rate and best candidate.
Bug: webrtc:12707
Change-Id: I1a5656aa6a49c53914d625c61cf114cd5897646c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329141
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41293}
2023-11-30 20:10:15 +00:00
Per K
fc60c7836f Add flag to reset LossBased BWE best candidate to instant upper bound
Bug: webrtc:12707
Change-Id: I4583e131ab9c5d81188191b23ebc227b4662bd7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329121
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41274}
2023-11-29 13:18:03 +00:00
Per K
2e3152654a Allow setting a different rampup factor if BWE < hold rate
Bug: webrtc:12707
Change-Id: Id674246d66d1b7f2a705934350e8a4f93564639f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329120
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41273}
2023-11-29 12:36:24 +00:00
Diep Bui
69d1d3ec40 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}
2023-11-28 22:48:34 +00:00
Diep Bui
7d1693f1c5 Do not allow estimate to increase above the estimate when HOLD started.
To ensure padding, we increase 1 bit instead of 1kbps to avoid that 1kbps adds up over time.
Not have unit test for this, but did manual/hamrit tests many times.

Bug: webrtc:12707
Change-Id: I9b3160ab1808cb3a21ff0609446359a4ec3a4949
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325520
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41056}
2023-11-01 01:30:32 +00:00
Diep Bui
cf2fe18daa Use acked bitrate as a candidate if padding is sent.
Bug: webrtc:12707
Change-Id: Ie824bdef09e685d0a4810177cbe5af57e699ad84
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325480
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41052}
2023-10-31 16:11:43 +00:00
Diep Bui
9682f4be7d Reset loss based BWE on route change.
The change is under field trial use_in_start_phase.

Bug: webrtc:12707
Change-Id: I2ba8245c5d126b3c8a2e54b826853d98aad6e4f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325184
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41047}
2023-10-31 11:50:07 +00:00
Diep Bui
e920073a68 Ensure that loss based BWE can switch to kIncreasing state when it wants to increase.
Increasing BWE by 1kbps should be safe/no-op in practice, and it ensures that padding in kIncreasing state will be triggered.

Bug: webrtc:12707
Change-Id: I82493d07a80abd60c93d9cff74baf0a55e77f2b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325286
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41046}
2023-10-31 11:46:43 +00:00
Diep Bui
4d7e722e9d Add 1minute as max hold duration to make sure that loss based BWE always tries to increase estimate.
Bug: webrtc:12707
Change-Id: I94689431726a37e2bfec52992046305705c6bb8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324741
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41025}
2023-10-27 13:02:04 +00:00
Diep Bui
e43edec62d Add 1s as padding duration limit in loss based BWE.
If we have been sending padding for 1s and estimate still is unchanged, then stop padding by transitioning to decrease state.

Bug: webrtc:12707
Change-Id: I0dca2e5cd98263fc7fae9882c23c21634413c7a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324740
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41018}
2023-10-27 12:36:05 +00:00
Diep Bui
1f2f5dc951 Compute loss rate based on byte count rather than packet count in loss based BWE.
2 main reasons:
1. Packet sizes are much different thus a lost audio packet should not be treated similar to a lost video packet. In low bandwidth/traffic policing scenario, the number of send packet is few, thus the computed loss can be imprecise.

2. Given a candidate bandwidth estimate, the objective function (how good the candidate is) is computed by recomputing loss rate = send rate/estimate bandwith + inherent loss. It means the objective function is byte based rather than packet based.

Potential risk: the current algorithm params are tuned based on packet count, thus it might not work with byte count, which is much higher than packet count.

The change is under field trial and disabled by default.

Bug: webrtc:12707
Change-Id: I8b832e7920d2b4cadcd4a072b3a4d4f26a213a20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325065
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41013}
2023-10-26 09:32:27 +00:00
Diep Bui
75a131f39c Introduce hold duration in loss based BWE.
The initial hold duration is 300ms.

Whenever it enters kDecreasing state, it will double the current hold duration. The hold duration will be reset as soon as the delay based estimate works, e.g. the state is kDelayBased to avoid getting stuck at low bitrate.

Bug: webrtc:12707
Change-Id: I3906ff80b071ba3eb6274b012fb31922f4cbc7b6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324304
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40991}
2023-10-23 14:09:17 +00:00
Per K
32f6c6e8b9 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}
2023-10-23 08:21:59 +00:00
Per K
adeda8214c Add field trial to LossbasedBwe2 to use padding when increasing BWE
UsePadding - signals to GoogCC that padding should be used to fill up to
BWE while BWE is ramping up.

Bug: webrtc:12707
Change-Id: I7b4922dff3a83da370c50c567050bfa748190b40
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324160
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40979}
2023-10-20 15:29:26 +00:00
Per K
af7b785f02 Ensure LossBased BWE do not decrease due to acked bitrate
Ensure acked bitrate is not used for lower loss based estimate if
estimate improve.

Ensure LossBasedBweV2 is in state DelayBased if reached max rate.

Bug: webrtc:12707
Change-Id: I20230b99e0c2b530570e2f2de8ea88179f795c50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324140
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40977}
2023-10-20 10:43:10 +00:00
Per K
ef4c71c204 Change expectation of GoogCCNetworkController::OnNetworkAvailability
Expect OnNetworkAvailabability to be invoked when the transport becomes writable.
Before this change, ProbeController in GoogCC was expected to be created when the transport is writable or explicitly  notifed after creation that network is not writable.

Bug: None
Change-Id: I623b1c34e40a82e912f85b92fea49629e7e72d4e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323463
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40975}
2023-10-19 17:34:42 +00:00
Diep Bui
fe02681809 Remove unused loss based param.
Bug: webrtc:12707
Change-Id: Ie6f8eac23a4fb2fbd648b2a213319af508c40230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324045
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40967}
2023-10-18 15:48:33 +00:00
Diep Bui
4f25aa7963 Fix loss based BWE state.
The state should be computed from the actual estimate rather than the best estimate candidate. The fix is NOT under field trial.

And some other cleanup:
1. Loss based result will be computed in UpdateBandwidthEstimate method. Currently it is re-computed in GetLossBasedResult.
2. Rename current_estimate to current_best_estimate to avoid misunderstanding that current_estimate is the `final estimate`. The final estimate is computed by applying lower and upper bound on current_best_estimate
3. Remove current_state_. The state is stored directly in loss_based_result_.


Bug: webrtc:12707
Change-Id: Ie612845f907b9e6333fbd8249ddc9b93ad9f8042
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324022
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40964}
2023-10-18 14:38:25 +00:00
Per K
1a22983098 Allow GoogCC to send padding if BWE is loss limited
This will be used in an experiment to ramp up BWE when BWE is reduced
due to loss.

Bug: webrtc:12707
Change-Id: I3b78f9dd3fe8ef9f94a9616640ffb8b2225e161e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324042
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40961}
2023-10-18 12:21:23 +00:00
Diep Bui
8ef094f66a Use acked bitrate as lower bound of loss based BWE.
This cl/ makes sure that the estimate cannot go lower than a factor of acked bitrate. The current flag LowerBoundByAckedRateFactor is set to 0, means we dont use it.


Bug: webrtc:12707
Change-Id: I75d5881f0b85a374af3f7039b82c71aee97fb7b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323881
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40958}
2023-10-18 09:20:29 +00:00
Per K
8e18e2e085 Default enable WebRTC-Bwe-LimitProbesLowerThanThroughputEstimate
This ensure probe results can not be lower than 85%  percentage of the
acked bitrate.

Bug: webrtc:11498
Change-Id: I501eeb84f7a049140c45c89e7de7e8080c13f94d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324040
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40957}
2023-10-18 09:19:26 +00:00