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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.h

Issue 2585293002: Reducing calling to SmoothingFilter in Fec Controller. (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 | « no previous file | webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.cc » ('j') | 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 struct ThresholdInfo { 80 struct ThresholdInfo {
81 explicit ThresholdInfo(const Config::Threshold& threshold); 81 explicit ThresholdInfo(const Config::Threshold& threshold);
82 float slope; 82 float slope;
83 float offset; 83 float offset;
84 }; 84 };
85 85
86 float GetPacketLossThreshold(int bandwidth_bps, 86 float GetPacketLossThreshold(int bandwidth_bps,
87 const Config::Threshold& threshold, 87 const Config::Threshold& threshold,
88 const ThresholdInfo& threshold_info) const; 88 const ThresholdInfo& threshold_info) const;
89 89
90 bool FecEnablingDecision(const NetworkMetrics& metrics) const; 90 bool FecEnablingDecision(const NetworkMetrics& metrics,
91 bool FecDisablingDecision(const NetworkMetrics& metrics) const; 91 const rtc::Optional<float>& packet_loss) const;
hlundin-webrtc 2016/12/22 10:42:39 I think you can pass an Optional<float> by value.
minyue-webrtc 2016/12/27 13:43:33 I am not sure about the efficiency between ref and
hlundin-webrtc 2017/01/09 14:46:16 I think the argument from ArrayView applies here a
kwiberg-webrtc 2017/01/09 14:55:19 I'm pretty sure Henrik is right (and if I were wri
kwiberg-webrtc 2017/01/10 02:19:28 So, I did the experiment, and it seems like even f
hlundin-webrtc 2017/01/10 08:34:07 Wow! Interesting findings. I stand corrected.
92 bool FecDisablingDecision(const NetworkMetrics& metrics,
93 const rtc::Optional<float>& packet_loss) const;
hlundin-webrtc 2016/12/22 10:42:39 And here.
92 94
93 const Config config_; 95 const Config config_;
94 bool fec_enabled_; 96 bool fec_enabled_;
95 std::unique_ptr<SmoothingFilter> packet_loss_smoothed_; 97 std::unique_ptr<SmoothingFilter> packet_loss_smoothed_;
96 98
97 const ThresholdInfo fec_enabling_threshold_info_; 99 const ThresholdInfo fec_enabling_threshold_info_;
98 const ThresholdInfo fec_disabling_threshold_info_; 100 const ThresholdInfo fec_disabling_threshold_info_;
99 101
100 RTC_DISALLOW_COPY_AND_ASSIGN(FecController); 102 RTC_DISALLOW_COPY_AND_ASSIGN(FecController);
101 }; 103 };
102 104
103 } // namespace webrtc 105 } // namespace webrtc
104 106
105 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_ 107 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_FEC_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/audio_network_adaptor/fec_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698