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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Redid the experiment settings initialization slightly and set the default threshold back to 12.5. Created 5 years, 5 months 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 22 matching lines...) Expand all
33 int64_t GetFeedbackInterval() const override; 33 int64_t GetFeedbackInterval() const override;
34 // Returns true if the bitrate estimate hasn't been changed for more than 34 // Returns true if the bitrate estimate hasn't been changed for more than
35 // an RTT, or if the incoming_bitrate is more than 5% above the current 35 // an RTT, or if the incoming_bitrate is more than 5% above the current
36 // estimate. Should be used to decide if we should reduce the rate further 36 // estimate. Should be used to decide if we should reduce the rate further
37 // when over-using. 37 // when over-using.
38 bool TimeToReduceFurther(int64_t time_now, 38 bool TimeToReduceFurther(int64_t time_now,
39 uint32_t incoming_bitrate_bps) const override; 39 uint32_t incoming_bitrate_bps) const override;
40 uint32_t LatestEstimate() const override; 40 uint32_t LatestEstimate() const override;
41 uint32_t UpdateBandwidthEstimate(int64_t now_ms) override; 41 uint32_t UpdateBandwidthEstimate(int64_t now_ms) override;
42 void SetRtt(int64_t rtt) override; 42 void SetRtt(int64_t rtt) override;
43 RateControlRegion Update(const RateControlInput* input, 43 void Update(const RateControlInput* input, int64_t now_ms) override;
44 int64_t now_ms) override;
45 void SetEstimate(int bitrate_bps, int64_t now_ms) override; 44 void SetEstimate(int bitrate_bps, int64_t now_ms) override;
46 45
47 private: 46 private:
48 // Update the target bitrate according based on, among other things, 47 // Update the target bitrate according based on, among other things,
49 // the current rate control state, the current target bitrate and the incoming 48 // the current rate control state, the current target bitrate and the incoming
50 // bitrate. When in the "increase" state the bitrate will be increased either 49 // bitrate. When in the "increase" state the bitrate will be increased either
51 // additively or multiplicatively depending on the rate control region. When 50 // additively or multiplicatively depending on the rate control region. When
52 // in the "decrease" state the bitrate will be decreased to slightly below the 51 // in the "decrease" state the bitrate will be decreased to slightly below the
53 // incoming bitrate. When in the "hold" state the bitrate will be kept 52 // incoming bitrate. When in the "hold" state the bitrate will be kept
54 // constant to allow built up queues to drain. 53 // constant to allow built up queues to drain.
(...skipping 10 matching lines...) Expand all
65 void ChangeState(RateControlState new_state); 64 void ChangeState(RateControlState new_state);
66 void ChangeRegion(RateControlRegion region); 65 void ChangeRegion(RateControlRegion region);
67 66
68 uint32_t min_configured_bitrate_bps_; 67 uint32_t min_configured_bitrate_bps_;
69 uint32_t max_configured_bitrate_bps_; 68 uint32_t max_configured_bitrate_bps_;
70 uint32_t current_bitrate_bps_; 69 uint32_t current_bitrate_bps_;
71 uint32_t max_hold_rate_bps_; 70 uint32_t max_hold_rate_bps_;
72 float avg_max_bitrate_kbps_; 71 float avg_max_bitrate_kbps_;
73 float var_max_bitrate_kbps_; 72 float var_max_bitrate_kbps_;
74 RateControlState rate_control_state_; 73 RateControlState rate_control_state_;
75 RateControlState came_from_state_;
76 RateControlRegion rate_control_region_; 74 RateControlRegion rate_control_region_;
77 int64_t time_last_bitrate_change_; 75 int64_t time_last_bitrate_change_;
78 RateControlInput current_input_; 76 RateControlInput current_input_;
79 bool updated_; 77 bool updated_;
80 int64_t time_first_incoming_estimate_; 78 int64_t time_first_incoming_estimate_;
81 bool bitrate_is_initialized_; 79 bool bitrate_is_initialized_;
82 float beta_; 80 float beta_;
83 int64_t rtt_; 81 int64_t rtt_;
84 int64_t time_of_last_log_; 82 int64_t time_of_last_log_;
83 bool in_experiment_;
85 84
86 DISALLOW_IMPLICIT_CONSTRUCTORS(AimdRateControl); 85 DISALLOW_IMPLICIT_CONSTRUCTORS(AimdRateControl);
87 }; 86 };
88 } // namespace webrtc 87 } // namespace webrtc
89 88
90 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ 89 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698