diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c')
-rw-r--r-- | media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c b/media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c new file mode 100644 index 000000000..0ca3b5664 --- /dev/null +++ b/media/openmax_dl/dl/sp/src/omxSP_FFTGetBufSize_C_SC32.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + * + * This file was originally licensed as follows. It has been + * relicensed with permission from the copyright holders. + */ + +/** + * + * File Name: omxSP_FFTGetBufSize_C_SC32.c + * OpenMAX DL: v1.0.2 + * Last Modified Revision: 9468 + * Last Modified Date: Thu, 03 Jan 2008 + * + * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. + * + * + * Description: + * Compute the size of the specification structure required + */ + +#include "dl/api/armOMX.h" +#include "dl/api/omxtypes.h" +#include "dl/sp/api/armSP.h" +#include "dl/sp/api/omxSP.h" + + +/** + * Function: omxSP_FFTGetBufSize_C_SC32 (2.2.4.1.6) + * + * Description: + * These functions compute the size of the specification structure + * required for the length 2^order complex FFT and IFFT functions. The function + * <FFTGetBufSize_C_SC32> is used in conjunction with the 32-bit functions + * <FFTFwd_CToC_SC32_Sfs> and <FFTInv_CToC_SC32_Sfs>. + * + * Input Arguments: + * + * order - base-2 logarithm of the desired block length; valid in the range + * [0,12] + * + * Output Arguments: + * + * pSize - pointer to the number of bytes required for the specification + * structure + * + * Return Value: + * + * OMX_Sts_NoErr - no error + * + * + */ + + +OMXResult omxSP_FFTGetBufSize_C_SC32( + OMX_INT order, + OMX_INT *pSize) +{ + + OMX_INT N,twiddleSize; + + /* Check for order zero */ + if (order == 0) + { + *pSize = sizeof(ARMsFFTSpec_SC32); + return OMX_Sts_NoErr; + } + + + N = 1 << order; + + /*The max size of the twiddle table needed is 3N/4 for a radix-4 stage*/ + twiddleSize = 3*N/4; + + *pSize = sizeof(ARMsFFTSpec_SC32) + /* N Twiddle factors */ + + sizeof(OMX_SC32) * twiddleSize + /* Ping Pong buffer */ + + sizeof(OMX_SC32) * N + + 62 ; /* Extra bytes to get 32 byte alignment of ptwiddle and pBuf */ + + return OMX_Sts_NoErr; +} + +/***************************************************************************** + * END OF FILE + *****************************************************************************/ + |