199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com/*
299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  Use of this source code is governed by a BSD-style license
599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  that can be found in the LICENSE file in the root of the source
699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  tree. An additional intellectual property rights grant can be found
799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  in the file PATENTS.  All contributing project authors may
899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *  be found in the AUTHORS file in the root of the source tree.
999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com */
1099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
11bdf981cb383b7ec472ee86d2fedb53937285f894rtoy@google.com#include "dl/api/arm/armOMX.h"
12048e632be7693f6198bfdd54130a0220a2ccb5abrtoy@google.com#include "dl/api/omxtypes.h"
13048e632be7693f6198bfdd54130a0220a2ccb5abrtoy@google.com#include "dl/sp/api/armSP.h"
14048e632be7693f6198bfdd54130a0220a2ccb5abrtoy@google.com#include "dl/sp/api/omxSP.h"
1599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
1699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
1799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com/**
1899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * Function:  omxSP_FFTGetBufSize_C_FC32
1999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
2099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * Description:
2199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * These functions compute the size of the specification structure
2299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * required for the length 2^order complex FFT and IFFT functions. The function
2399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * <FFTGetBufSize_C_FC32> is used in conjunction with the 32-bit functions
2499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * <FFTFwd_CToC_FC32_Sfs> and <FFTInv_CToC_FC32_Sfs>.
2599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
2699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * Input Arguments:
2799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
2899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *   order - base-2 logarithm of the desired block length; valid in the range
296ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com *            [1,12] ([1,15] if BIG_FFT_TABLE is defined.)
3099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
3199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * Output Arguments:
3299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
3399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *   pSize - pointer to the number of bytes required for the specification
3499b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *            structure
3599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
3699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com * Return Value:
3799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
3899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *    OMX_Sts_NoErr - no error
3999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
4099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com *
4199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com */
4299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com
4399b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.comOMXResult omxSP_FFTGetBufSize_C_FC32(OMX_INT order, OMX_INT *pSize) {
446ae14cb23aa5d478d267519f29d05558fd8f2f0drtoy@google.com  if (!pSize || (order < 1) || (order > TWIDDLE_TABLE_ORDER))
4599b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com    return OMX_Sts_BadArgErr;
4699b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com  /*
4799b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com   * The required size is the same as for C_SC32, because the
4899b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com   * elements are the same size and because ARMsFFTSpec_SC32 is
4999b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com   * the same size as ARMsFFTSpec_FC32.
5099b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com   */
5199b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com  return omxSP_FFTGetBufSize_C_SC32(order, pSize);
5299b31ea5d0f4629ceddf4852f96757c9c73654artoy@google.com}
53