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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve.h

Issue 2899303002: Rename elad.alon to eladalon, to avoid confusion between repositories. (Closed)
Patch Set: Created 3 years, 7 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) 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2017 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // | | 42 // | |
43 // | | 43 // | |
44 // | | 44 // | |
45 // | P|__________ 45 // | P|__________
46 // |---------------> bandwidth 46 // |---------------> bandwidth
47 ThresholdCurve(const Point& left, const Point& right) 47 ThresholdCurve(const Point& left, const Point& right)
48 : a(GetPoint(left, right, true)), 48 : a(GetPoint(left, right, true)),
49 b(GetPoint(left, right, false)), 49 b(GetPoint(left, right, false)),
50 slope(b.x - a.x == 0.0f ? 0.0f : (b.y - a.y) / (b.x - a.x)), 50 slope(b.x - a.x == 0.0f ? 0.0f : (b.y - a.y) / (b.x - a.x)),
51 offset(a.y - slope * a.x) { 51 offset(a.y - slope * a.x) {
52 // TODO(elad.alon): We might want to introduce some numerical validations. 52 // TODO(eladalon): We might want to introduce some numerical validations.
53 } 53 }
54 54
55 ThresholdCurve(float a_x, float a_y, float b_x, float b_y) 55 ThresholdCurve(float a_x, float a_y, float b_x, float b_y)
56 : ThresholdCurve(Point{a_x, a_y}, Point{b_x, b_y}) {} 56 : ThresholdCurve(Point{a_x, a_y}, Point{b_x, b_y}) {}
57 57
58 // Checks if a point is strictly below the curve. 58 // Checks if a point is strictly below the curve.
59 bool IsBelowCurve(const Point& p) const { 59 bool IsBelowCurve(const Point& p) const {
60 if (p.x < a.x) { 60 if (p.x < a.x) {
61 return true; 61 return true;
62 } else if (p.x == a.x) { 62 } else if (p.x == a.x) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 const Point a; 110 const Point a;
111 const Point b; 111 const Point b;
112 const float slope; 112 const float slope;
113 const float offset; 113 const float offset;
114 }; 114 };
115 115
116 } // namespace webrtc 116 } // namespace webrtc
117 117
118 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_UTIL_THRESHOLD_CURV E_H_ 118 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_UTIL_THRESHOLD_CURV E_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/audio_network_adaptor/controller_manager.h ('k') | webrtc/voice_engine/channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698