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

Side by Side Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_utils.cc

Issue 2308043002: Fix chromium-style errors in IntelligibilityEnhancer (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h ('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) 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 template class PowerEstimator<float>; 50 template class PowerEstimator<float>;
51 template class PowerEstimator<std::complex<float>>; 51 template class PowerEstimator<std::complex<float>>;
52 52
53 GainApplier::GainApplier(size_t freqs, float relative_change_limit) 53 GainApplier::GainApplier(size_t freqs, float relative_change_limit)
54 : num_freqs_(freqs), 54 : num_freqs_(freqs),
55 relative_change_limit_(relative_change_limit), 55 relative_change_limit_(relative_change_limit),
56 target_(freqs, 1.f), 56 target_(freqs, 1.f),
57 current_(freqs, 1.f) {} 57 current_(freqs, 1.f) {}
58 58
59 GainApplier::~GainApplier() {}
60
59 void GainApplier::Apply(const std::complex<float>* in_block, 61 void GainApplier::Apply(const std::complex<float>* in_block,
60 std::complex<float>* out_block) { 62 std::complex<float>* out_block) {
61 for (size_t i = 0; i < num_freqs_; ++i) { 63 for (size_t i = 0; i < num_freqs_; ++i) {
62 current_[i] = UpdateFactor(target_[i], current_[i], relative_change_limit_); 64 current_[i] = UpdateFactor(target_[i], current_[i], relative_change_limit_);
63 out_block[i] = sqrtf(fabsf(current_[i])) * in_block[i]; 65 out_block[i] = sqrtf(fabsf(current_[i])) * in_block[i];
64 } 66 }
65 } 67 }
66 68
67 } // namespace intelligibility 69 } // namespace intelligibility
68 70
69 } // namespace webrtc 71 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698