FFmpeg 5.1.6
Files | Data Structures | Typedefs | Enumerations | Functions

Files

file  avfft.h
 FFT functions.
 

Data Structures

struct  FFTComplex
 

Typedefs

typedef float FFTSample
 
typedef struct FFTContext FFTContext
 
typedef struct RDFTContext RDFTContext
 
typedef struct DCTContext DCTContext
 

Enumerations

enum  RDFTransformType { DFT_R2C , IDFT_C2R , IDFT_R2C , DFT_C2R }
 
enum  DCTTransformType { DCT_II = 0 , DCT_III , DCT_I , DST_I }
 

Functions

FFTContextav_fft_init (int nbits, int inverse)
 Set up a complex FFT. More...
 
void av_fft_permute (FFTContext *s, FFTComplex *z)
 Do the permutation needed BEFORE calling ff_fft_calc(). More...
 
void av_fft_calc (FFTContext *s, FFTComplex *z)
 Do a complex FFT with the parameters defined in av_fft_init(). More...
 
void av_fft_end (FFTContext *s)
 
FFTContextav_mdct_init (int nbits, int inverse, double scale)
 
void av_imdct_calc (FFTContext *s, FFTSample *output, const FFTSample *input)
 
void av_imdct_half (FFTContext *s, FFTSample *output, const FFTSample *input)
 
void av_mdct_calc (FFTContext *s, FFTSample *output, const FFTSample *input)
 
void av_mdct_end (FFTContext *s)
 
RDFTContextav_rdft_init (int nbits, enum RDFTransformType trans)
 Set up a real FFT. More...
 
void av_rdft_calc (RDFTContext *s, FFTSample *data)
 
void av_rdft_end (RDFTContext *s)
 
DCTContextav_dct_init (int nbits, enum DCTTransformType type)
 Set up DCT. More...
 
void av_dct_calc (DCTContext *s, FFTSample *data)
 
void av_dct_end (DCTContext *s)
 

Detailed Description

Typedef Documentation

◆ FFTSample

typedef float FFTSample

Definition at line 35 of file avfft.h.

◆ FFTContext

typedef struct FFTContext FFTContext

Definition at line 41 of file avfft.h.

◆ RDFTContext

typedef struct RDFTContext RDFTContext

Definition at line 78 of file avfft.h.

◆ DCTContext

typedef struct DCTContext DCTContext

Definition at line 91 of file avfft.h.

Enumeration Type Documentation

◆ RDFTransformType

Enumerator
DFT_R2C 
IDFT_C2R 
IDFT_R2C 
DFT_C2R 

Definition at line 71 of file avfft.h.

◆ DCTTransformType

Enumerator
DCT_II 
DCT_III 
DCT_I 
DST_I 

Definition at line 93 of file avfft.h.

Function Documentation

◆ av_fft_init()

FFTContext * av_fft_init ( int  nbits,
int  inverse 
)

Set up a complex FFT.

Parameters
nbitslog2 of the length of the input array
inverseif 0 perform the forward transform, if 1 perform the inverse

◆ av_fft_permute()

void av_fft_permute ( FFTContext s,
FFTComplex z 
)

Do the permutation needed BEFORE calling ff_fft_calc().

◆ av_fft_calc()

void av_fft_calc ( FFTContext s,
FFTComplex z 
)

Do a complex FFT with the parameters defined in av_fft_init().

The input data must be permuted before. No 1.0/sqrt(n) normalization is done.

◆ av_fft_end()

void av_fft_end ( FFTContext s)

◆ av_mdct_init()

FFTContext * av_mdct_init ( int  nbits,
int  inverse,
double  scale 
)

◆ av_imdct_calc()

void av_imdct_calc ( FFTContext s,
FFTSample output,
const FFTSample input 
)

◆ av_imdct_half()

void av_imdct_half ( FFTContext s,
FFTSample output,
const FFTSample input 
)

◆ av_mdct_calc()

void av_mdct_calc ( FFTContext s,
FFTSample output,
const FFTSample input 
)

◆ av_mdct_end()

void av_mdct_end ( FFTContext s)

◆ av_rdft_init()

RDFTContext * av_rdft_init ( int  nbits,
enum RDFTransformType  trans 
)

Set up a real FFT.

Parameters
nbitslog2 of the length of the input array
transthe type of transform

◆ av_rdft_calc()

void av_rdft_calc ( RDFTContext s,
FFTSample data 
)

◆ av_rdft_end()

void av_rdft_end ( RDFTContext s)

◆ av_dct_init()

DCTContext * av_dct_init ( int  nbits,
enum DCTTransformType  type 
)

Set up DCT.

Parameters
nbitssize of the input array: (1 << nbits) for DCT-II, DCT-III and DST-I (1 << nbits) + 1 for DCT-I
typethe type of transform
Note
the first element of the input of DST-I is ignored

◆ av_dct_calc()

void av_dct_calc ( DCTContext s,
FFTSample data 
)

◆ av_dct_end()

void av_dct_end ( DCTContext s)