| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| 11 #include "webrtc/modules/audio_processing/transient/transient_detector.h" | 11 #include "webrtc/modules/audio_processing/transient/transient_detector.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 #include <float.h> | 14 #include <float.h> |
| 15 #include <math.h> | 15 #include <math.h> |
| 16 #include <string.h> | 16 #include <string.h> |
| 17 | 17 |
| 18 #include <algorithm> |
| 19 |
| 18 #include "webrtc/modules/audio_processing/transient/common.h" | 20 #include "webrtc/modules/audio_processing/transient/common.h" |
| 19 #include "webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.
h" | 21 #include "webrtc/modules/audio_processing/transient/daubechies_8_wavelet_coeffs.
h" |
| 20 #include "webrtc/modules/audio_processing/transient/moving_moments.h" | 22 #include "webrtc/modules/audio_processing/transient/moving_moments.h" |
| 21 #include "webrtc/modules/audio_processing/transient/wpd_tree.h" | 23 #include "webrtc/modules/audio_processing/transient/wpd_tree.h" |
| 22 | 24 |
| 23 namespace webrtc { | 25 namespace webrtc { |
| 24 | 26 |
| 25 static const int kTransientLengthMs = 30; | 27 static const int kTransientLengthMs = 30; |
| 26 static const int kChunksAtStartupLeftToDelete = | 28 static const int kChunksAtStartupLeftToDelete = |
| 27 kTransientLengthMs / ts::kChunkSizeMs; | 29 kTransientLengthMs / ts::kChunkSizeMs; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 reference_energy / reference_energy_))); | 166 reference_energy / reference_energy_))); |
| 165 reference_energy_ = | 167 reference_energy_ = |
| 166 kMemory * reference_energy_ + (1.f - kMemory) * reference_energy; | 168 kMemory * reference_energy_ + (1.f - kMemory) * reference_energy; |
| 167 | 169 |
| 168 using_reference_ = true; | 170 using_reference_ = true; |
| 169 | 171 |
| 170 return result; | 172 return result; |
| 171 } | 173 } |
| 172 | 174 |
| 173 } // namespace webrtc | 175 } // namespace webrtc |
| OLD | NEW |