OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 int16_t voice_mix_factor; /* Q14 */ | 113 int16_t voice_mix_factor; /* Q14 */ |
114 int16_t current_voice_mix_factor; /* Q14 */ | 114 int16_t current_voice_mix_factor; /* Q14 */ |
115 AudioVector expand_vector0; | 115 AudioVector expand_vector0; |
116 AudioVector expand_vector1; | 116 AudioVector expand_vector1; |
117 bool onset; | 117 bool onset; |
118 int mute_slope; /* Q20 */ | 118 int mute_slope; /* Q20 */ |
119 }; | 119 }; |
120 | 120 |
121 // Calculate the auto-correlation of |input|, with length |input_length| | 121 // Calculate the auto-correlation of |input|, with length |input_length| |
122 // samples. The correlation is calculated from a downsampled version of | 122 // samples. The correlation is calculated from a downsampled version of |
123 // |input|, and is written to |output|. | 123 // |input|, and is written to |output|. The scale factor is written to |
| 124 // |output_scale|. |
124 void Correlation(const int16_t* input, | 125 void Correlation(const int16_t* input, |
125 size_t input_length, | 126 size_t input_length, |
126 int16_t* output) const; | 127 int16_t* output, |
| 128 int* output_scale) const; |
127 | 129 |
128 void UpdateLagIndex(); | 130 void UpdateLagIndex(); |
129 | 131 |
130 BackgroundNoise* const background_noise_; | 132 BackgroundNoise* const background_noise_; |
131 StatisticsCalculator* const statistics_; | 133 StatisticsCalculator* const statistics_; |
132 const size_t overlap_length_; | 134 const size_t overlap_length_; |
133 size_t max_lag_; | 135 size_t max_lag_; |
134 size_t expand_lags_[kNumLags]; | 136 size_t expand_lags_[kNumLags]; |
135 int lag_index_direction_; | 137 int lag_index_direction_; |
136 int current_lag_index_; | 138 int current_lag_index_; |
(...skipping 11 matching lines...) Expand all Loading... |
148 virtual Expand* Create(BackgroundNoise* background_noise, | 150 virtual Expand* Create(BackgroundNoise* background_noise, |
149 SyncBuffer* sync_buffer, | 151 SyncBuffer* sync_buffer, |
150 RandomVector* random_vector, | 152 RandomVector* random_vector, |
151 StatisticsCalculator* statistics, | 153 StatisticsCalculator* statistics, |
152 int fs, | 154 int fs, |
153 size_t num_channels) const; | 155 size_t num_channels) const; |
154 }; | 156 }; |
155 | 157 |
156 } // namespace webrtc | 158 } // namespace webrtc |
157 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ | 159 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_EXPAND_H_ |
OLD | NEW |