OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 15 matching lines...) Expand all Loading... |
26 // Input & Output: | 26 // Input & Output: |
27 // - filter_state : Current filter states of the two all-pass filters. The | 27 // - filter_state : Current filter states of the two all-pass filters. The |
28 // |filter_state| is updated after all samples have been | 28 // |filter_state| is updated after all samples have been |
29 // processed. | 29 // processed. |
30 // | 30 // |
31 // Output: | 31 // Output: |
32 // - signal_out : Downsampled signal (of length |in_length| / 2). | 32 // - signal_out : Downsampled signal (of length |in_length| / 2). |
33 void WebRtcVad_Downsampling(const int16_t* signal_in, | 33 void WebRtcVad_Downsampling(const int16_t* signal_in, |
34 int16_t* signal_out, | 34 int16_t* signal_out, |
35 int32_t* filter_state, | 35 int32_t* filter_state, |
36 int in_length); | 36 size_t in_length); |
37 | 37 |
38 // Updates and returns the smoothed feature minimum. As minimum we use the | 38 // Updates and returns the smoothed feature minimum. As minimum we use the |
39 // median of the five smallest feature values in a 100 frames long window. | 39 // median of the five smallest feature values in a 100 frames long window. |
40 // As long as |handle->frame_counter| is zero, that is, we haven't received any | 40 // As long as |handle->frame_counter| is zero, that is, we haven't received any |
41 // "valid" data, FindMinimum() outputs the default value of 1600. | 41 // "valid" data, FindMinimum() outputs the default value of 1600. |
42 // | 42 // |
43 // Inputs: | 43 // Inputs: |
44 // - feature_value : New feature value to update with. | 44 // - feature_value : New feature value to update with. |
45 // - channel : Channel number. | 45 // - channel : Channel number. |
46 // | 46 // |
47 // Input & Output: | 47 // Input & Output: |
48 // - handle : State information of the VAD. | 48 // - handle : State information of the VAD. |
49 // | 49 // |
50 // Returns: | 50 // Returns: |
51 // : Smoothed minimum value for a moving window. | 51 // : Smoothed minimum value for a moving window. |
52 int16_t WebRtcVad_FindMinimum(VadInstT* handle, | 52 int16_t WebRtcVad_FindMinimum(VadInstT* handle, |
53 int16_t feature_value, | 53 int16_t feature_value, |
54 int channel); | 54 int channel); |
55 | 55 |
56 #endif // WEBRTC_COMMON_AUDIO_VAD_VAD_SP_H_ | 56 #endif // WEBRTC_COMMON_AUDIO_VAD_VAD_SP_H_ |
OLD | NEW |