Resolving https://bugs.chromium.org/p/webrtc/issues/detail?id=14023
At the moment, in DelayBasedBwe the time deltas are rounded to the
nearest millisecond. This change makes sure the numbers are passed as
doubles as expected by the TrendlineEstimator.
Change-Id: I68882547fb19af0e67e7b5d8de4159083a54d7eb
Bug: webrtc:14023
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261320
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36806}
AimdRateControl
AimdRateControl can potentially clamp bitrate in SetEstimate.
DelayBasedBwe::MaybeUpdateEstimate should therefore check the result before using the probe bitrate.
Otherwise, BWE may drop on next update.
Bug: none
Change-Id: I8b1b3549a2bcd981e941b1cc802c984828d68261
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252444
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36099}
This defaults the calculation landed in cl 196502. The less readable legacy calculation method will be deleted in a future CL.
Bug: none
Change-Id: Ida02a5208e354835b964c69355ad1e9d5bba18aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231956
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35027}
This time the class is added but only used if the field trial "WebRTC-Bwe-NewInterArrivalDelta/Enabled/" is enabled.
Original cl description:
This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc
but modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.
patchset 1 is a pure revert of the revert https://webrtc-review.googlesource.com/c/src/+/196343
patchset 2 contains a modification to allow running it behind an experiment.
Bug: webrtc:12269
Change-Id: Ide80e9f5243362799a2cc1f0fcf7e613e707d851
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196502
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32784}
This reverts commit 0496a41211.
Reason for revert: Causes unexpected changes in perf tests.
Original change's description:
> Add class InterArrivalDelta to goog_cc
>
> This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc in the first patchset.
> In the following- this class is modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.
>
> Bug: none
> Change-Id: I9befe6e3e283cf7e21efa974ae33e8a83e26cbe6
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194004
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32733}
TBR=perkj@webrtc.org,crodbro@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: none
Change-Id: I725b246f6ec0c293cb3ada39b1a65a14ef9a001e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196343
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32765}
This cl copies modules/remote_bitrate_estimator/inter_arrival.x to inter_arrival.h and interrival_delta.cc in goog_cc in the first patchset.
In the following- this class is modified to use webrtc::Timestamp and webrtc::Timedelta in order to avoid having to use 24 bit time repressentation.
Bug: none
Change-Id: I9befe6e3e283cf7e21efa974ae33e8a83e26cbe6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/194004
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32733}
Delete unused macros BWE_MIN and BWE_MAX.
Move enum RateControlState: Make it a private enum class in
AimdRateControl, the only user.
Change users of the header file that only need BandwidthUsage, to
instead include api/network_state_predictor.h, the file defining this
class. As a result, fewer dependencies on
modules/remote_bitrate_estimator.
Bug: None
Change-Id: I4450c79dd58e1875d64dd74d1ae2cb7d911a14b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195222
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32704}
The decision to route audio packets to a separate overuse detector
is off by default and requires the field trial
WebRTC-Bwe-SeparateAudioPackets/enabled,packet_threshold:10,time_threshold:1000ms/
The parameters control the threshold for switching over to the
audio overuse detector if we stop receiving feedback for video.
Bug: webrtc:10932
Change-Id: Icdde35bc7a98b18b1a344bd2d620a890fd9421d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168342
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30694}
crodbro@ found that the previous field trial, which filtered the deltas
in the trendline estimator, can increase the noise caused by varying
packet sizes. Moving the filtering to the DelayBasedBwe class fixes the
issue.
To avoid confusion, we've updated the field trial name, so e.g.
WebRTC-BweIgnoreSmallPacketsFix/small:200bytes,large:200bytes,
fraction_large:0.25,smoothing:0.1/
should be used to enable the feature.
Bug: webrtc:10932
Change-Id: If77e83043c37fff909038405f634e541ce41abb8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159711
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29804}
In DelayBasedBwe, in experiment WebRTC-Bwe-AlrLimitedBackoff, back off relative the BWE only after the first detected overuse. The first time overuse is detected, back down to the acked bitrate.
The idea is to faster drop BWE in the beginning of the call when the initial BWE guess may be too high. Withouth this, it may take a too long time to initially back down.
BUG=webrtc:10542
Change-Id: I2a11457d2391ad25658e7c13d9cae02a38973ecb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152541
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29163}
The change is behind a field trial. The intention is to use this
to (heuristically) base the bandwidth estimate only on video packets
even if both audio and video packets have transport sequence numbers.
Bug: webrtc:10932
Change-Id: I6cc5bb9ab6f1a3f25b84ee6ac78e4abb4112032e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150787
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29031}
This is a reland of fa79081dca
It crashed due to inability to handle small timestamps in probe
estimator. This was fixed by moving history window check to avoid
subtracting from the timestamp.
Original change's description:
> Cleanup of RTP references in GoogCC implementation.
>
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
>
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}
Bug: webrtc:9510
Change-Id: I3bf91222068e4fbb6aa159bfeb7a73e00bb6a0d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143165
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28347}
This reverts commit fa79081dca.
Reason for revert: Breaks downstream project.
Original change's description:
> Cleanup of RTP references in GoogCC implementation.
>
> As the send time congestion controller now has been removed,
> we don't need the RTP related constructs anymore.
>
> Bug: webrtc:9510
> Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28330}
TBR=terelius@webrtc.org,srte@webrtc.org
Change-Id: I562365fc5d1da68326d603338ccc6371114d7e12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9510
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143164
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28331}
As the send time congestion controller now has been removed,
we don't need the RTP related constructs anymore.
Bug: webrtc:9510
Change-Id: I02c059ed8ae907ab4672d183c5639ad459b581aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142221
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28330}
When backing down, the delay based estimator can still use acked bitrate instead of the last set estimate.
Original code was reviewed in:
https://webrtc-review.googlesource.com/c/src/+/113880
BUG=webrtc:10144
Change-Id: Ia6e2d6d7d05f88f7e51d61b6e37c61a89adccf8a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/135950
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27912}
The idea is that when ALR is detected, the encoder can not produce the bitrate
needed for the delay based estimator to detect overuse and thus the delay based
estimator should not be allowed to increase further.
Likewise, if ALR is not detected, the delay based estimator is allowed to
increase the BWE to ensure that there is no region where the BWE can get stuck.
BUG=webrtc:10542
Change-Id: Ic94b708461c9077fd09132ee4ecb6279ffcd5f99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133190
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27661}
Instead use WebRtcKeyValueConfig and FieldTrialBasedConfig
BUG=webrtc:10335
Change-Id: Ie148cb466f86d8fa1ded5c7f125fbcccf6e7dbe3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132714
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27642}
Add base class NetworkPredictor and NetworkPredictorFactory in /api, make it possible to inject customized NetworkPredictor in PeerConnectionFactory level. The NetworkPredictor object will be pass down to GoogCCNetworkControl and DelayBasedBwe.
Bug: webrtc:10492
Change-Id: Iceeadbe1c9388b11ce4ac01ee56554cb0bf64d04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130201
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27543}
The WebRtcKeyValueConfig interface allows providing custom key value
configurations that changes per instance of GoogCcNetworkController.
Bug: webrtc:10009
Change-Id: I520fff030d1c3c755455ec8f67896fe8a6b4d970
Reviewed-on: https://webrtc-review.googlesource.com/c/116989
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26312}
If we're in ALR, the acked rate is going to be significantly lower than
the current estimate for the link capacity. If we need to back off in
this situation (usually caused by latency spikes), this CL makes us back
off relative to current estimate if. We then immediately send a new
probe just in case the network did actually change.
All of this is behind experiment flags for now.
Bug: webrtc:10144
Change-Id: I062a259c36417eea2211d44592ef7fc979aa22b7
Reviewed-on: https://webrtc-review.googlesource.com/c/113880
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26045}
The removed coded causes problems if the same RTCP packet is forwarded
to the congestion controller multiple times.
Bug: webrtc:10125
Change-Id: I659d8f8f3ce3c643710156fa81176ceeaedd714a
Reviewed-on: https://webrtc-review.googlesource.com/c/114165
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26016}
This prepares for providing an additional implementation of delay based
rate control. By moving the probe controller, less code will have to be
added in the upcoming CL.
Bug: webrtc:9718
Change-Id: I64eb2c8f5f7950b6e9d209f110dc0a757c710b4b
Reviewed-on: https://webrtc-review.googlesource.com/c/111860
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25770}
This makes it safer to reason about the common case where send
time information is available. We don't have to either assume that
it's available, or check it everywhere the PacketResult struct is used.
To achieve this, a new field is added to TransportPacketsFeedback
and a new interface is introduced to clearly separate which field is
used. A possible followup would be to introduce a separate struct.
That would complicate the signature of ProcessTransportFeedback.
Bug: webrtc:9934
Change-Id: I2b319e4df2b557fbd4de66b812744bca7d91ca15
Reviewed-on: https://webrtc-review.googlesource.com/c/107080
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25465}
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.
bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
This CL removes some indirection and moves some constants. This
is done to simplify understanding and debugging of the code.
Bug: webrtc:9718
Change-Id: Ibe2b1da0163b4c97ffd1a5bc157f6aa59582d697
Reviewed-on: https://webrtc-review.googlesource.com/98240
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24732}
After detecting overuse of the network capacity, the target
bitrate is reduced. Normally, this should happen at most once
per RTT to prevent repeated reductions from the same overuse
signal. This CL fixes a bug that allowed repeated reductions
if an overuse was detected before it had the first reliable
throughput measurement.
The fix is guarded by a field trial. To enable the fix, use
WebRTC-BweInitialBackOffInterval/Enabled-200/
Bug: webrtc:9493
Change-Id: Iae566227fd94ebb8a4449406572158a8b79d9c53
Reviewed-on: https://webrtc-review.googlesource.com/88765
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24021}
This removes the legacy DelayBasedBwe to reduce code redundancy and
avoid the risk of applying changes on only one version.
Bug: webrtc:8415
Change-Id: I88aba03adbb77ee0ff0a97a8b3be6ddf028af48a
Reviewed-on: https://webrtc-review.googlesource.com/85364
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23798}
Remove unused member noise_var from RateControlInput struct.
Rename incoming_bitrate to estimated_throughput_bps to reflect
that the AimdRateControl may be running on either the send side
or the receive side.
Bug: webrtc:9411
Change-Id: Ie1ae0c29dc9559ef389993144e69fcd41684f1a4
Reviewed-on: https://webrtc-review.googlesource.com/83728
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Anastasia Koloskova <koloskova@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23783}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script from modules with parameters
'pacing video_coding congestion_controller remote_bitrate_estimator':
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I8ea501d7f1ee36e8d8cd3ed37e6b763c7fe29118
Reviewed-on: https://webrtc-review.googlesource.com/83900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23640}
This reverts commit 18d7c7ea7e.
Reason for revert:
This seems to cause the auto roller to Chrome to fail on Linux and Mac on the browsertest
WebRtcSimulcastBrowserTest.TestVgaReturnsTwoSimulcastStreams
https://chromium-review.googlesource.com/c/chromium/src/+/1064736
Original change's description:
> Configure and use max bitrate to limit the AIMD controller estimates.
>
> Bug: webrtc:9275
> Change-Id: I9625cd473e1cb198abe08020f5462f1bd64bf2a5
> Reviewed-on: https://webrtc-review.googlesource.com/77081
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23287}
TBR=terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org
Change-Id: I8ed827ab6b2f7d2b70b9889e5a88701bfb974d35
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9275
Reviewed-on: https://webrtc-review.googlesource.com/77660
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23291}
This is a reland of e6cefdf9c5.
Original change's description:
> Moved congestion controller to goog_cc folder.
>
> Bug: webrtc:8415
> Change-Id: I2070da0cacf1dbfc4b6a89285af3e68fd03497ab
> Reviewed-on: https://webrtc-review.googlesource.com/43841
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21928}
Bug: webrtc:8415
Change-Id: Ib5cf8641466655d64ac80f720561817f4cab49a9
Reviewed-on: https://webrtc-review.googlesource.com/53062
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22244}