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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // real_data_in - the input signal. For an ARM Neon platform, it must be | 50 // real_data_in - the input signal. For an ARM Neon platform, it must be |
51 // aligned on a 32-byte boundary. | 51 // aligned on a 32-byte boundary. |
52 // | 52 // |
53 // Output Arguments: | 53 // Output Arguments: |
54 // complex_data_out - the output complex signal with (2^order + 2) 16-bit | 54 // complex_data_out - the output complex signal with (2^order + 2) 16-bit |
55 // elements. For an ARM Neon platform, it must be different | 55 // elements. For an ARM Neon platform, it must be different |
56 // from real_data_in, and aligned on a 32-byte boundary. | 56 // from real_data_in, and aligned on a 32-byte boundary. |
57 // | 57 // |
58 // Return Value: | 58 // Return Value: |
59 // 0 - FFT calculation is successful. | 59 // 0 - FFT calculation is successful. |
60 // -1 - Error with bad arguments (NULL pointers). | 60 // -1 - Error with bad arguments (null pointers). |
61 int WebRtcSpl_RealForwardFFT(struct RealFFT* self, | 61 int WebRtcSpl_RealForwardFFT(struct RealFFT* self, |
62 const int16_t* real_data_in, | 62 const int16_t* real_data_in, |
63 int16_t* complex_data_out); | 63 int16_t* complex_data_out); |
64 | 64 |
65 // Compute the inverse FFT for a conjugate-symmetric input sequence of length of | 65 // Compute the inverse FFT for a conjugate-symmetric input sequence of length of |
66 // 2^order, where 1 < order <= MAX_FFT_ORDER. Transform length is determined by | 66 // 2^order, where 1 < order <= MAX_FFT_ORDER. Transform length is determined by |
67 // the specification structure, which must be initialized prior to calling the | 67 // the specification structure, which must be initialized prior to calling the |
68 // FFT function with WebRtcSpl_CreateRealFFT(). | 68 // FFT function with WebRtcSpl_CreateRealFFT(). |
69 // For a transform of length M, the input sequence is represented using a packed | 69 // For a transform of length M, the input sequence is represented using a packed |
70 // CCS vector of length M+2, which is explained in the comments for | 70 // CCS vector of length M+2, which is explained in the comments for |
71 // WebRtcSpl_RealForwardFFTC above. | 71 // WebRtcSpl_RealForwardFFTC above. |
72 // | 72 // |
73 // Input Arguments: | 73 // Input Arguments: |
74 // self - pointer to preallocated and initialized FFT specification structure. | 74 // self - pointer to preallocated and initialized FFT specification structure. |
75 // complex_data_in - the input complex signal with (2^order + 2) 16-bit | 75 // complex_data_in - the input complex signal with (2^order + 2) 16-bit |
76 // elements. For an ARM Neon platform, it must be aligned on | 76 // elements. For an ARM Neon platform, it must be aligned on |
77 // a 32-byte boundary. | 77 // a 32-byte boundary. |
78 // | 78 // |
79 // Output Arguments: | 79 // Output Arguments: |
80 // real_data_out - the output real signal. For an ARM Neon platform, it must | 80 // real_data_out - the output real signal. For an ARM Neon platform, it must |
81 // be different to complex_data_in, and aligned on a 32-byte | 81 // be different to complex_data_in, and aligned on a 32-byte |
82 // boundary. | 82 // boundary. |
83 // | 83 // |
84 // Return Value: | 84 // Return Value: |
85 // 0 or a positive number - a value that the elements in the |real_data_out| | 85 // 0 or a positive number - a value that the elements in the |real_data_out| |
86 // should be shifted left with in order to get | 86 // should be shifted left with in order to get |
87 // correct physical values. | 87 // correct physical values. |
88 // -1 - Error with bad arguments (NULL pointers). | 88 // -1 - Error with bad arguments (null pointers). |
89 int WebRtcSpl_RealInverseFFT(struct RealFFT* self, | 89 int WebRtcSpl_RealInverseFFT(struct RealFFT* self, |
90 const int16_t* complex_data_in, | 90 const int16_t* complex_data_in, |
91 int16_t* real_data_out); | 91 int16_t* real_data_out); |
92 | 92 |
93 #ifdef __cplusplus | 93 #ifdef __cplusplus |
94 } | 94 } |
95 #endif | 95 #endif |
96 | 96 |
97 #endif // WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_REAL_FFT_H_ | 97 #endif // WEBRTC_COMMON_AUDIO_SIGNAL_PROCESSING_INCLUDE_REAL_FFT_H_ |
OLD | NEW |