Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1607)

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/estimators/nada_unittest.cc

Issue 2542843003: Remove bitrate cap for AdaptiveVideoSource and increase other caps to 25 Mbps. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 nada_sender_.AcceleratedRampDown(congested_fb); 221 nada_sender_.AcceleratedRampDown(congested_fb);
222 int bitrate_2_kbps = 222 int bitrate_2_kbps =
223 std::max(nada_sender_.bitrate_kbps(), NadaBweSender::kMinNadaBitrateKbps); 223 std::max(nada_sender_.bitrate_kbps(), NadaBweSender::kMinNadaBitrateKbps);
224 EXPECT_EQ(bitrate_2_kbps, bitrate_1_kbps); 224 EXPECT_EQ(bitrate_2_kbps, bitrate_1_kbps);
225 } 225 }
226 226
227 TEST_F(NadaSenderSideTest, GradualRateUpdate) { 227 TEST_F(NadaSenderSideTest, GradualRateUpdate) {
228 const int64_t kDeltaSMs = 20; 228 const int64_t kDeltaSMs = 20;
229 const int64_t kRefSignalMs = 20; 229 const int64_t kRefSignalMs = 20;
230 const int64_t kOneWayDelayMs = 50; 230 const int64_t kOneWayDelayMs = 50;
231 int original_bitrate = 2 * NadaBweSender::kMinNadaBitrateKbps; 231 int original_bitrate = 5 * NadaBweSender::kMinNadaBitrateKbps;
232 size_t receiving_rate = static_cast<size_t>(original_bitrate); 232 size_t receiving_rate = static_cast<size_t>(original_bitrate);
233 int64_t send_time_ms = nada_sender_.NowMs() - kOneWayDelayMs; 233 int64_t send_time_ms = nada_sender_.NowMs() - kOneWayDelayMs;
234 234
235 NadaFeedback congested_fb = 235 NadaFeedback congested_fb =
236 NadaFbGenerator::CongestedFb(receiving_rate, send_time_ms); 236 NadaFbGenerator::CongestedFb(receiving_rate, send_time_ms);
237 NadaFeedback not_congested_fb = NadaFbGenerator::NotCongestedFb( 237 NadaFeedback not_congested_fb = NadaFbGenerator::NotCongestedFb(
238 original_bitrate, kRefSignalMs, send_time_ms); 238 original_bitrate, kRefSignalMs, send_time_ms);
239 239
240 nada_sender_.set_bitrate_kbps(original_bitrate); 240 nada_sender_.set_bitrate_kbps(original_bitrate);
241 double smoothing_factor = 0.0; 241 double smoothing_factor = 0.0;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 for (int i = 1; i < kNumElements; ++i) { 489 for (int i = 1; i < kNumElements; ++i) {
490 EXPECT_EQ( 490 EXPECT_EQ(
491 exp_smoothed[i], 491 exp_smoothed[i],
492 static_cast<int64_t>(exp_smoothed[i - 1] * (1.0f - kAlpha) + 0.5f)); 492 static_cast<int64_t>(exp_smoothed[i - 1] * (1.0f - kAlpha) + 0.5f));
493 } 493 }
494 } 494 }
495 495
496 } // namespace bwe 496 } // namespace bwe
497 } // namespace testing 497 } // namespace testing
498 } // namespace webrtc 498 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698