Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

FFTInit

Initializes the context structure for the image FFT functions.

Syntax

IppStatus ippiFFTInit_R_32f (int
orderX
, int
orderY
, int
flag
, IppHintAlgorithm
hint
, IppiFFTSpec_R_32f*
pFFTSpec
, Ipp8u* pMemInit
);
IppStatus ippiFFTInit_C_32fc (int
orderX
, int
orderY
, int
flag
, IppHintAlgorithm
hint
, IppiFFTSpec_C_32fc*
pFFTSpec
, Ipp8u*
pMemInit
);
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
orderX, orderY
Order of the FFT in x- and y- directions, respectively.
flag
Flag to choose the option for results normalization.
hint
This parameter is deprecated. Set the value to
ippAlgHintNone
.
pFFTSpec
Pointer to the FFT context structure.
pMemInit
Pointer to the temporary work buffer.
Description
This function initializes the
pFFTSpec
context structure needed to compute the forward and inverse FFT of a two-dimensional image data.
Before calling this function, you need to allocate memory for the FFT context structure and temporary work buffer (if it is required). To compute the size of the FFT context structure and temporary work buffer, use the
ippiFFTGetSize
function.
The
pMemInit
parameter can be
NULL
only if the work buffer is not used. After initialization is done, you can free the temporary work buffer.
The
ippiFFTFwd
and
ippiFFTInv
functions called with the pointer to the initialized
pFFTSpec
structure, compute the fast Fourier transform with the following characteristics:
The suffix after the function name indicates the type of the context structure to be initialized:
ippiFFTInit_C
is for the complex FFT context structure and
ippiFFTInit_R
is for the real FFT context structure.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when one of the specified pointers is
NULL
.
ippStsFftOrderErr
Indicates an error condition when the FFT order value is illegal.
ippStsFFTFlagErr
Indicates an error condition when the
flag
value is illegal.

Example

The code example below demonstrates how to use the
ippiFFTGetSize
and
ippiFFTInit
functions.
/// get sizes for required buffers ippiFFTGetSize_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec, &sizeInit, &sizeBuffer ); /// allocate memory for required buffers pMemSpec = (IppiFFTSpec_R_32f*) ippMalloc ( sizeSpec ); if ( sizeInit > 0 ) { pMemInit = ippMalloc ( sizeInit ); } if ( sizeBuffer > 0 ) { pMemBuffer = ippMalloc ( sizeBuffer ); } /// initialize FFT specification structure ippiFFTInit_R_32f( orderX, orderY, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pMemSpec, pMemInit ); /// free initialization buffer if ( sizeInit > 0 ) { ippFree( pMemInit ); } /// perform forward FFT to put source data to frequency domain ippiFFTFwd_RToPack_32f_C1R( pSrc, srcStep, pDst, dstStep, pMemSpec, pMemBuffer ); /// ... /// free buffers if ( sizeBuffer > 0 ) { ippFree( pMemBuffer ); } ippFree( pMemSpec );

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804