VPI - Vision Programming Interface

1.2 Release

Fast Fourier Transform

Operations that applies the Fast Fourier Transform and its inverse to 2D images. More...

Functions

VPIStatus vpiCreateFFT (uint32_t backends, int32_t inputWidth, int32_t inputHeight, const VPIImageFormat inFormat, const VPIImageFormat outFormat, VPIPayload *payload)
 Creates payload for direct Fast Fourier Transform algorithm. More...
 
VPIStatus vpiSubmitFFT (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage input, VPIImage output, uint32_t flags)
 Runs the direct Fast Fourier Transform on single image. More...
 
VPIStatus vpiCreateIFFT (uint32_t backends, int32_t outputWidth, int32_t outputHeight, const VPIImageFormat inFormat, const VPIImageFormat outFormat, VPIPayload *payload)
 Creates payload for inverse Fast Fourier Transform algorithm. More...
 
VPIStatus vpiSubmitIFFT (VPIStream stream, uint32_t backend, VPIPayload payload, VPIImage input, VPIImage output, uint32_t flags)
 Runs the inverse Fast Fourier Transform on single image. More...
 

Detailed Description

Operations that applies the Fast Fourier Transform and its inverse to 2D images.

Both FFT and inverse FFT need a payload created during application initialization phase, where image dimensions, input and output types are defined. The payload then can be used to submit operations on different images, as long as their dimensions and types match what was defined during payload creation.

Function Documentation

◆ vpiCreateFFT()

VPIStatus vpiCreateFFT ( uint32_t  backends,
int32_t  inputWidth,
int32_t  inputHeight,
const VPIImageFormat  inFormat,
const VPIImageFormat  outFormat,
VPIPayload payload 
)

#include <vpi/algo/FFT.h>

Creates payload for direct Fast Fourier Transform algorithm.

The created payload can then be used with vpiSubmitFFT.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm. Currently only one backend is accepted.
[in]inputWidth,inputHeightDimensions of the input/output images to be used.
[in]inFormatInput image format.
[in]outFormatOutput image format.
[out]payloadPointer to memory where the created payload handle will be written to.
Returns
an error code on failure else VPI_SUCCESS.

◆ vpiCreateIFFT()

VPIStatus vpiCreateIFFT ( uint32_t  backends,
int32_t  outputWidth,
int32_t  outputHeight,
const VPIImageFormat  inFormat,
const VPIImageFormat  outFormat,
VPIPayload payload 
)

#include <vpi/algo/FFT.h>

Creates payload for inverse Fast Fourier Transform algorithm.

The created payload can then be used with vpiSubmitIFFT.

Parameters
[in]backendsVPI backends that are eligible to execute the algorithm. Currently only one backend is accepted.
[in]outputWidth,outputHeightOutput image dimensions.
[in]inFormatInput image format.
[in]outFormatOutput image format.
[out]payloadPointer to memory where the created payload handle will be written to.
Returns
an error code on failure else VPI_SUCCESS

◆ vpiSubmitFFT()

VPIStatus vpiSubmitFFT ( VPIStream  stream,
uint32_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage  output,
uint32_t  flags 
)

#include <vpi/algo/FFT.h>

Runs the direct Fast Fourier Transform on single image.

Parameters
[in]streamThe stream where the operation will be queued in.
[in]backendBackend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one.
[in]payloadPayload created with vpiCreateFFT
[in]inputInput image in space domain.
[out]outputImage where the result in frequency domain will be written to.
[in]flagsControl flags, currently it must be set to 0.
Returns
an error code on failure else VPI_SUCCESS

◆ vpiSubmitIFFT()

VPIStatus vpiSubmitIFFT ( VPIStream  stream,
uint32_t  backend,
VPIPayload  payload,
VPIImage  input,
VPIImage  output,
uint32_t  flags 
)

#include <vpi/algo/FFT.h>

Runs the inverse Fast Fourier Transform on single image.

Parameters
[in]streamA stream handle where the operation will be queued in.
[in]backendBackend that will execute the algorithm. Must be one of the backends specified during payload creation. If 0, VPI will select one of the eligible backends from the payload that accepts the given parameters, usually the fastest one.
[in]payloadPayload created with vpiCreateIFFT
[in]inputInput image in frequency domain.
[out]outputImage where the result in space domain will be written to.
[in]flagsControl flags. Valid values:
  • 0 for default processing, where output scaled.
  • VPI_DENORMALIZED_OUTPUT : Output is left denormalized. This leads to faster execution as normalization isn't usually needed. Absense of this flag will scale the output, dividing it by the total pixel count. This makes the output the exact inverse of direct Fast Fourier Transform.
Returns
an error code on failure else VPI_SUCCESS