omxsp_fftgetbufsize_r_s32.c

来自「The OpenMAX DL (Development Layer) APIs 」· C语言 代码 · 共 85 行

C
85
字号
/** *  * File Name:  omxSP_FFTGetBufSize_R_S32.c * OpenMAX DL: v1.0.2 * Revision:   10586 * Date:       Wednesday, March 5, 2008 *  * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. *  *  * Description: * Computes the size of the specification structure required. */#include "omxtypes.h"#include "armOMX.h"#include "omxSP.h"#include "armCOMM.h"#include "armSP.h"/** * Function:  omxSP_FFTGetBufSize_R_S32   (2.2.4.1.8) * * Description: * These functions compute the size of the specification structure  * required for the length 2^order real FFT and IFFT functions.  The function  * <FFTGetBufSize_R_S32> is used in conjunction with the 32-bit functions  * <FFTFwd_RToCCS_S32_Sfs> and <FFTInv_CCSToR_S32_Sfs>.  * * Input Arguments: *    *   order - base-2 logarithm of the 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  *    OMX_Sts_BadArgErr - bad arguments The function returns  *              OMX_Sts_BadArgErr if one or more of the following is true:  *    pSize is NULL  *    order < 0 or order > 12  * */OMXResult omxSP_FFTGetBufSize_R_S32(     OMX_INT order,          OMX_INT *pSize ){    OMX_INT     NBy2;        /* Input parameter check */     armRetArgErrIf(pSize == NULL, OMX_Sts_BadArgErr)    armRetArgErrIf(order < 0, OMX_Sts_BadArgErr)    armRetArgErrIf(order > 12, OMX_Sts_BadArgErr)    /* Check for order zero */    if (order == 0)    {        *pSize = sizeof(ARMsFFTSpec_FC64);           return OMX_Sts_NoErr;    }        NBy2 = 1 << (order - 1);        /* 2 pointers to store bitreversed array and twiddle factor array */    *pSize = sizeof(ARMsFFTSpec_FC64)    /* N bitreversed Numbers */           + sizeof(OMX_U16) * NBy2    /* Twiddle factors  */           + sizeof(OMX_FC64) * NBy2           + sizeof(OMX_F64) * (2 + (NBy2 << 1));    return OMX_Sts_NoErr;}/***************************************************************************** *                              END OF FILE *****************************************************************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?