Commit graph

22 commits

Author SHA1 Message Date
Per Kjellander
865d94e452 Revert "Apply lower bound of delay based estimate in AimdRateControl::ClampBitrate"
This reverts commit e66e6a845b.

Reason for revert: 
May cause BWE to increase on delay increase if link capacity estimate is too high.

Original change's description:
> Apply lower bound of delay based estimate in AimdRateControl::ClampBitrate
>
> This move the functionality of applying the lower bound of a network estimate to AimdRateControl::ClampBitrate instead of ChangeBitrate.
> The purpose is to be able to also clamp probe estimates set by AimdRateControl::SetEstimate as well.
>
> Bug: none
> Change-Id: I6a4d64d2e98bb99da06010e2edaf20dc42880e37
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255823
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#36219}

Bug: none
Change-Id: I8c65b1461160dbf3d35e50ef2cc6f9bc305c2b15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256011
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>
Cr-Commit-Position: refs/heads/main@{#36248}
2022-03-18 12:06:47 +00:00
Per Kjellander
e66e6a845b Apply lower bound of delay based estimate in AimdRateControl::ClampBitrate
This move the functionality of applying the lower bound of a network estimate to AimdRateControl::ClampBitrate instead of ChangeBitrate.
The purpose is to be able to also clamp probe estimates set by AimdRateControl::SetEstimate as well.

Bug: none
Change-Id: I6a4d64d2e98bb99da06010e2edaf20dc42880e37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255823
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36219}
2022-03-16 14:52:43 +00:00
Per Kjellander
4d54260ae2 Field trial to not clamp delay based estimate to a lowered link estimate
This adds a new paramater to WebRTC-Bwe-EstimateBoundedIncrease that ensure that even if the link capacity has decreased, the delay based estimate does not immediately decrease unless an overuse has been detected.
This is a follow up to https://webrtc-review.googlesource.com/c/src/+/252442/

Bug: none
Change-Id: I98d77ba1e3f7856b06f2691575f2d248a500e659
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/253901
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36154}
2022-03-09 08:33:03 +00:00
Per Kjellander
141007668c Add field trial for limiting probes and delay based estimates to link
capacity.

Allow delay based estimate to increase up to 85% of the current NetworkStateEstimate
even if in ALR. The estimate may not increase higher than that.
WebRTC-Bwe-EstimateBoundedIncrease/ratio:0.85,ignore_acked:true

Bug: none
Change-Id: I6f34af7fab03082ca168e624ddea06f216790fbc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/252442
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36096}
2022-02-28 17:29:37 +00:00
Sebastian Jansson
5b60b19c62 Cleanup: Removes unused AimdRateControl field trials.
Bug: webrtc:9883
Change-Id: I4a15ae20ea1fa7cc05a8e898fb6de35cd0fe4acc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169849
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30739}
2020-03-10 12:00:19 +00:00
Danil Chapovalov
cad3e0e2fa Replace DataSize and DataRate factories with newer versions
This is search and replace change:
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::Bytes<\(.*\)>()/DataSize::Bytes(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataSize::bytes/DataSize::Bytes/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BitsPerSec<\(.*\)>()/DataRate::BitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::BytesPerSec<\(.*\)>()/DataRate::BytesPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::KilobitsPerSec<\(.*\)>()/DataRate::KilobitsPerSec(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::bps/DataRate::BitsPerSec/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/DataRate::kbps/DataRate::KilobitsPerSec/g"
git cl format

Bug: webrtc:9709
Change-Id: I65aaca69474ba038c1fe2dd8dc30d3f8e7b94c29
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168647
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30545}
2020-02-18 16:09:50 +00:00
Danil Chapovalov
5528402ef8 Use newer version of TimeDelta and TimeStamp factories in modules/
This change generated with following commands:
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find modules -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I117d64a54950be040d996035c54bc0043310943a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168340
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30489}
2020-02-10 11:49:57 +00:00
Jonas Olsson
a4d873786f Format almost everything.
This CL was generated by running

git ls-files | grep -P "(\.h|\.cc)$" | grep -v 'sdk/' | grep -v 'rtc_base/ssl_' | \
grep -v 'fake_rtc_certificate_generator.h' | grep -v 'modules/audio_device/win/' | \
grep -v 'system_wrappers/source/clock.cc' | grep -v 'rtc_base/trace_event.h' | \
grep -v 'modules/audio_coding/codecs/ilbc/' | grep -v 'screen_capturer_mac.h' | \
grep -v 'spl_inl_mips.h' | grep -v 'data_size_unittest.cc' | grep -v 'timestamp_unittest.cc' \
| xargs clang-format -i ; git cl format

Most of these changes are clang-format grouping and reordering includes
differently.

Bug: webrtc:9340
Change-Id: Ic83ddbc169bfacd21883e381b5181c3dd4fe8a63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/144051
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28505}
2019-07-08 13:45:15 +00:00
Sebastian Jansson
b64ad0e72c Using Clock::CurrentTime() where non-test behavior is unchanged.
This CL replaces all uses of Timestamp::us(Clock::TimeInMicroseconds())
with Clock::CurrentTime() which should be a no-op apart from slight
changes in checks.

Additionally instances of Timestamp::ms(Clock::TimeInMilliseconds()) in
test code is replaced. This slightly changes the behavior since the
timestamp will get increased resolution.

Timestamp::ms(Clock::TimeInMilliseconds()) in non-test code is untouched
to avoid changing behavior of production code.

Bug: webrtc:9883
Change-Id: I8047f4cb2ca735f44f11d32f9367aa3eb376ec04
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/142803
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28321}
2019-06-19 09:18:21 +00:00
Per Kjellander
416d5db75d Add field trial to AimdRateController to only increase while not in ALR
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}
2019-04-17 12:05:24 +00:00
Per Kjellander
494947bbcf Remove direct use of FieldTrials from modules/remote_bitrate_estimator
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}
2019-04-16 13:23:12 +00:00
Sebastian Jansson
5f00995964 Using unit classes in AimdRateControl.
Bug: webrtc:9718
Change-Id: I1efed4e55c9d1ccec3c32ed012cb3cd82d7f4ee8
Reviewed-on: https://webrtc-review.googlesource.com/c/110788
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25705}
2018-11-20 08:04:11 +00:00
Bjorn Terelius
43d0b98fe5 Clean up RateControlInput struct, used by bandwidth estimation.
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}
2018-06-29 10:47:37 +00:00
Danil Chapovalov
0040b66ad3 Replace rtc::Optional with absl::optional
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}
2018-06-18 10:24:48 +00:00
Anastasia Koloskova
6d19180030 Fix increase in send rate when not receiving feedback
Store the last known throughput estimate and use that if we're lacking a new measurement.

Bug: webrtc:9363
Change-Id: Ib7a9a495b446bd0f5799382cc095ccff894e0c2b
Reviewed-on: https://webrtc-review.googlesource.com/81749
Commit-Queue: Anastasia Koloskova <koloskova@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23565}
2018-06-11 16:44:19 +00:00
Per Kjellander
dd3eae5f94 Revert "Configure and use max bitrate to limit the AIMD controller estimates."
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}
2018-05-18 07:12:26 +00:00
Bjorn Terelius
18d7c7ea7e 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}
2018-05-17 16:07:42 +00:00
Oskar Sundbom
18f26d1434 Optional: Use nullopt and implicit construction in /modules/remote_bitrate_estimator
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

R=terelius@webrtc.org

Bug: None
Change-Id: I1d2538482e2390d91f3285124d011a578da4b61b
Reviewed-on: https://webrtc-review.googlesource.com/23564
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20710}
2017-11-16 12:42:24 +00:00
Ivo Creusen
46ca2879e1 Reland of https://chromium-review.googlesource.com/c/external/webrtc/+/616724 under field trial.
Bug: webrtc:8105
Change-Id: I8c68e0f270b3bd5d8da28b8334d4689064f607f6
Reviewed-on: https://webrtc-review.googlesource.com/4920
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Alex Narest <alexnarest@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20205}
2017-10-09 11:07:57 +00:00
alexnarest
b335e31bcb This is a rollback of https://chromium-review.googlesource.com/c/external/webrtc/+/616724
it degraded results of the ANA testing

BUG=webrtc:8105

Review-Url: https://codereview.webrtc.org/3011323002
Cr-Commit-Position: refs/heads/master@{#19902}
2017-09-19 19:00:32 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00
Renamed from webrtc/modules/remote_bitrate_estimator/aimd_rate_control_unittest.cc (Browse further)