Developer Reference

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

DFTInit

Initializes the context structure for the image DFT functions.

Syntax

IppStatus ippiDFTInit_R_32f (IppiSize
roiSize
, int
flag
, IppHintAlgorithm
hint
, IppiDFTSpec_R_32f*
pDFTSpec
, Ipp8u* pMemInit
);
IppStatus ippiDFTInit_C_32fc (IppiSize
roiSize
, int
flag
, IppHintAlgorithm
hint
, IppiDFTSpec_C_32fc*
pDFTSpec
, Ipp8u*
pMemInit
);
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
roiSize
Size of the source and destination ROI in pixels.
flag
Flag to choose the option for results normalization.
hint
This parameter is deprecated. Set the value to
ippAlgHintNone
.
pDFTSpec
Pointer to the DFT context structure.
pMemInit
Pointer to the temporary work buffer.
Description
This function initializes the
pDFTSpec
context structure needed to compute the forward and inverse DFT 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
ippiDFTGetSize
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
ippiDFTFwd
and
ippiDFTInv
functions called with the pointer to the initialized
pDFTSpec
structure compute the discrete Fourier transform with the following characteristics:
The suffix after the function name indicates the type of the context structure to be initialized:
ippiDFTInit_C
is for the complex DFT context structure and
ippiDFTInit_R
is for the real DFT context structure.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when one of the specified pointers is
NULL
.
ippStsFftFlagErr
Indicates an error condition when the
flag
value is illegal.
ippStsFftOrderErr
Indicates an error when the amount of memory needed to compute the DFT for points in the ROI of size
roiSize
exceeds the limit.
ippStsSizeErr
Indicates an error condition when the
roiSize
has a field with a zero or negative value.

Example

The code example below demonstrates how to use the
ippiDFTGetSize
and
ippiDFTInit
functions.
/// get sizes for required buffers ippiDFTGetSize_R_32f( roiSize, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, &sizeSpec, &sizeInit, &sizeBuffer ); /// allocate memory for required buffers pMemSpec = (IppiDFTSpec_R_32f*) ippMalloc ( sizeSpec ); if ( sizeInit > 0 ) { pMemInit = ippMalloc ( sizeInit ); } if ( sizeBuffer > 0 ) { pMemBuffer = ippMalloc ( sizeBuffer ); } /// initialize DFT specification structure ippiDFTInit_R_32f( roiSize, IPP_FFT_DIV_INV_BY_N, ippAlgHintNone, pMemSpec, pMemInit ); /// free initialization buffer if ( sizeInit > 0 ) { ippFree( pMemInit ); } /// perform forward DFT to put source data to frequency domain ippiDFTFwd_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