| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 65 |
| 66 extern void armSP_FFTInv_CCSToR_F32_preTwiddleRadix2( | 66 extern void armSP_FFTInv_CCSToR_F32_preTwiddleRadix2( |
| 67 const OMX_F32* pSrc, | 67 const OMX_F32* pSrc, |
| 68 const OMX_FC32* pTwiddle, | 68 const OMX_FC32* pTwiddle, |
| 69 OMX_F32* pBuf, | 69 OMX_F32* pBuf, |
| 70 long N); | 70 long N); |
| 71 | 71 |
| 72 /* | 72 /* |
| 73 * Scale FFT data by 1/|length|. |length| must be a power of two | 73 * Scale FFT data by 1/|length|. |length| must be a power of two |
| 74 */ | 74 */ |
| 75 static inline ScaleRFFTData(OMX_F32* fftData, unsigned length) { | 75 static inline void ScaleRFFTData(OMX_F32* fftData, unsigned length) { |
| 76 float32_t* data = (float32_t*)fftData; | 76 float32_t* data = (float32_t*)fftData; |
| 77 float32_t scale = 2.0f / length; | 77 float32_t scale = 2.0f / length; |
| 78 | 78 |
| 79 if (length >= 4) { | 79 if (length >= 4) { |
| 80 /* | 80 /* |
| 81 * Do 4 float elements at a time because |length| is always a | 81 * Do 4 float elements at a time because |length| is always a |
| 82 * multiple of 4 when |length| >= 4. | 82 * multiple of 4 when |length| >= 4. |
| 83 * | 83 * |
| 84 * TODO(rtoy): Figure out how to process 8 elements at a time | 84 * TODO(rtoy): Figure out how to process 8 elements at a time |
| 85 * using intrinsics or replace this with inline assembly. | 85 * using intrinsics or replace this with inline assembly. |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 pComplexSrc, pComplexDst, pTwiddle, &subFFTNum, &subFFTSize); | 250 pComplexSrc, pComplexDst, pTwiddle, &subFFTNum, &subFFTSize); |
| 251 } else { | 251 } else { |
| 252 /* Order = 0 */ | 252 /* Order = 0 */ |
| 253 *pComplexDst = *pComplexSrc; | 253 *pComplexDst = *pComplexSrc; |
| 254 } | 254 } |
| 255 | 255 |
| 256 ScaleRFFTData(pDst, spec->N); | 256 ScaleRFFTData(pDst, spec->N); |
| 257 return OMX_Sts_NoErr; | 257 return OMX_Sts_NoErr; |
| 258 } | 258 } |
| 259 | 259 |
| OLD | NEW |