From 182e4a4aff7125e2e9e3217b253bc4d1545f8bce Mon Sep 17 00:00:00 2001 From: terelius Date: Thu, 1 Dec 2016 07:29:09 -0800 Subject: [PATCH] Remove bitrate cap for AdaptiveVideoSource and increase other caps to 25 Mbps. AdaptiveVideoSource is used in testing/simulations of the bandwidth estimator. Nada's reaction to delay depends on the current bitrate and the configured max rate in a non-intuituve way. Increase the starting bitrate to compensate for the increased max bitrate. This is only used in unit tests. BUG=webrtc:6807 # Presubmit warns about a lint error in bwe.h that's unrelated to my change. Fixing it is beyond the scope of this CL. NOPRESUBMIT=true Review-Url: https://codereview.webrtc.org/2542843003 Cr-Commit-Position: refs/heads/master@{#15364} --- webrtc/modules/remote_bitrate_estimator/test/bwe.h | 2 +- .../modules/remote_bitrate_estimator/test/bwe_test_framework.cc | 2 +- .../remote_bitrate_estimator/test/estimators/nada_unittest.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe.h b/webrtc/modules/remote_bitrate_estimator/test/bwe.h index 0d101fcc3e..4f87d391d9 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/bwe.h +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe.h @@ -110,7 +110,7 @@ class LinkedSet { }; const int kMinBitrateKbps = 10; -const int kMaxBitrateKbps = 2500; +const int kMaxBitrateKbps = 25000; class BweSender : public Module { public: diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc index ac0e53d585..f277b8f0e0 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc @@ -765,7 +765,7 @@ AdaptiveVideoSource::AdaptiveVideoSource(int flow_id, } void AdaptiveVideoSource::SetBitrateBps(int bitrate_bps) { - bits_per_second_ = std::min(bitrate_bps, 2500000); + bits_per_second_ = bitrate_bps; frame_size_bytes_ = (bits_per_second_ / 8 * frame_period_ms_ + 500) / 1000; } diff --git a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc index ad87cb306c..6ce15b9935 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc +++ b/webrtc/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc @@ -228,7 +228,7 @@ TEST_F(NadaSenderSideTest, GradualRateUpdate) { const int64_t kDeltaSMs = 20; const int64_t kRefSignalMs = 20; const int64_t kOneWayDelayMs = 50; - int original_bitrate = 2 * NadaBweSender::kMinNadaBitrateKbps; + int original_bitrate = 5 * NadaBweSender::kMinNadaBitrateKbps; size_t receiving_rate = static_cast(original_bitrate); int64_t send_time_ms = nada_sender_.NowMs() - kOneWayDelayMs;