FFmpeg
Data Structures | Macros | Typedefs | Enumerations | Functions
fft.h File Reference
#include <stdint.h>
#include "config.h"
#include "libavutil/mem.h"
#include "avfft.h"

Go to the source code of this file.

Data Structures

struct  FFTDComplex
 
struct  FFTContext
 

Macros

#define FFT_FLOAT   1
 
#define FFT_FIXED_32   0
 
#define FFT_NAME(x)   x
 
#define COSTABLE_CONST
 
#define COSTABLE(size)   COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2]
 
#define ff_init_ff_cos_tabs   FFT_NAME(ff_init_ff_cos_tabs)
 
#define ff_fft_init   FFT_NAME(ff_fft_init)
 
#define ff_fft_end   FFT_NAME(ff_fft_end)
 
#define ff_mdct_init   FFT_NAME(ff_mdct_init)
 
#define ff_mdct_end   FFT_NAME(ff_mdct_end)
 

Typedefs

typedef float FFTDouble
 

Enumerations

enum  fft_permutation_type { FF_FFT_PERM_DEFAULT, FF_FFT_PERM_SWAP_LSBS, FF_FFT_PERM_AVX }
 
enum  mdct_permutation_type { FF_MDCT_PERM_NONE, FF_MDCT_PERM_INTERLEAVE }
 

Functions

 COSTABLE (16)
 
 COSTABLE (32)
 
 COSTABLE (64)
 
 COSTABLE (128)
 
 COSTABLE (256)
 
 COSTABLE (512)
 
 COSTABLE (1024)
 
 COSTABLE (2048)
 
 COSTABLE (4096)
 
 COSTABLE (8192)
 
 COSTABLE (16384)
 
 COSTABLE (32768)
 
 COSTABLE (65536)
 
 COSTABLE (131072)
 
COSTABLE_CONST FFTSample *const FFT_NAME (ff_cos_tabs)[18]
 
void ff_init_ff_cos_tabs (int index)
 Initialize the cosine table in ff_cos_tabs[index]. More...
 
int ff_fft_init (FFTContext *s, int nbits, int inverse)
 Set up a complex FFT. More...
 
void ff_fft_init_aarch64 (FFTContext *s)
 
void ff_fft_init_x86 (FFTContext *s)
 
void ff_fft_init_arm (FFTContext *s)
 
void ff_fft_init_mips (FFTContext *s)
 FFT transform. More...
 
void ff_fft_init_ppc (FFTContext *s)
 
void ff_fft_fixed_init_arm (FFTContext *s)
 
void ff_fft_end (FFTContext *s)
 
int ff_mdct_init (FFTContext *s, int nbits, int inverse, double scale)
 init MDCT or IMDCT computation. More...
 
void ff_mdct_end (FFTContext *s)
 

Macro Definition Documentation

◆ FFT_FLOAT

#define FFT_FLOAT   1

Definition at line 26 of file fft.h.

◆ FFT_FIXED_32

#define FFT_FIXED_32   0

Definition at line 30 of file fft.h.

◆ FFT_NAME

#define FFT_NAME (   x)    x

Definition at line 41 of file fft.h.

◆ COSTABLE_CONST

#define COSTABLE_CONST

Definition at line 119 of file fft.h.

◆ COSTABLE

#define COSTABLE (   size)    COSTABLE_CONST DECLARE_ALIGNED(32, FFTSample, FFT_NAME(ff_cos_##size))[size/2]

Definition at line 122 of file fft.h.

◆ ff_init_ff_cos_tabs

#define ff_init_ff_cos_tabs   FFT_NAME(ff_init_ff_cos_tabs)

Definition at line 141 of file fft.h.

◆ ff_fft_init

#define ff_fft_init   FFT_NAME(ff_fft_init)

Definition at line 149 of file fft.h.

◆ ff_fft_end

#define ff_fft_end   FFT_NAME(ff_fft_end)

Definition at line 150 of file fft.h.

◆ ff_mdct_init

#define ff_mdct_init   FFT_NAME(ff_mdct_init)

Definition at line 169 of file fft.h.

◆ ff_mdct_end

#define ff_mdct_end   FFT_NAME(ff_mdct_end)

Definition at line 170 of file fft.h.

Typedef Documentation

◆ FFTDouble

typedef float FFTDouble

Definition at line 43 of file fft.h.

Enumeration Type Documentation

◆ fft_permutation_type

Enumerator
FF_FFT_PERM_DEFAULT 
FF_FFT_PERM_SWAP_LSBS 
FF_FFT_PERM_AVX 

Definition at line 77 of file fft.h.

◆ mdct_permutation_type

Enumerator
FF_MDCT_PERM_NONE 
FF_MDCT_PERM_INTERLEAVE 

Definition at line 83 of file fft.h.

Function Documentation

◆ COSTABLE() [1/14]

COSTABLE ( 16  )

◆ COSTABLE() [2/14]

COSTABLE ( 32  )

◆ COSTABLE() [3/14]

COSTABLE ( 64  )

◆ COSTABLE() [4/14]

COSTABLE ( 128  )

◆ COSTABLE() [5/14]

COSTABLE ( 256  )

◆ COSTABLE() [6/14]

COSTABLE ( 512  )

◆ COSTABLE() [7/14]

COSTABLE ( 1024  )

◆ COSTABLE() [8/14]

COSTABLE ( 2048  )

◆ COSTABLE() [9/14]

COSTABLE ( 4096  )

◆ COSTABLE() [10/14]

COSTABLE ( 8192  )

◆ COSTABLE() [11/14]

COSTABLE ( 16384  )

◆ COSTABLE() [12/14]

COSTABLE ( 32768  )

◆ COSTABLE() [13/14]

COSTABLE ( 65536  )

◆ COSTABLE() [14/14]

COSTABLE ( 131072  )

◆ FFT_NAME()

static FFTSample *const FFT_NAME ( ff_cos_tabs  )
Initial value:
= {
FFT_NAME(ff_cos_16),
FFT_NAME(ff_cos_32),
FFT_NAME(ff_cos_64),
FFT_NAME(ff_cos_128),
FFT_NAME(ff_cos_256),
FFT_NAME(ff_cos_512),
FFT_NAME(ff_cos_1024),
FFT_NAME(ff_cos_2048),
FFT_NAME(ff_cos_4096),
FFT_NAME(ff_cos_8192),
FFT_NAME(ff_cos_16384),
FFT_NAME(ff_cos_32768),
FFT_NAME(ff_cos_65536),
FFT_NAME(ff_cos_131072),
}

◆ ff_init_ff_cos_tabs()

void ff_init_ff_cos_tabs ( int  index)

Initialize the cosine table in ff_cos_tabs[index].

Parameters
indexindex in ff_cos_tabs array of the table to initialize

Definition at line 158 of file fft_template.c.

Referenced by ff_fft_init().

◆ ff_fft_init()

int ff_fft_init ( FFTContext s,
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

Definition at line 203 of file fft_template.c.

◆ ff_fft_init_aarch64()

void ff_fft_init_aarch64 ( FFTContext s)

Definition at line 36 of file fft_init_aarch64.c.

Referenced by ff_fft_init().

◆ ff_fft_init_x86()

void ff_fft_init_x86 ( FFTContext s)

Definition at line 27 of file fft_init.c.

Referenced by ff_fft_init().

◆ ff_fft_init_arm()

void ff_fft_init_arm ( FFTContext s)

Definition at line 38 of file fft_init_arm.c.

Referenced by ff_fft_init().

◆ ff_fft_init_mips()

void ff_fft_init_mips ( FFTContext s)

FFT transform.

Definition at line 501 of file fft_mips.c.

Referenced by ff_fft_init().

◆ ff_fft_init_ppc()

void ff_fft_init_ppc ( FFTContext s)

Definition at line 151 of file fft_init.c.

Referenced by ff_fft_init().

◆ ff_fft_fixed_init_arm()

void ff_fft_fixed_init_arm ( FFTContext s)

Definition at line 32 of file fft_fixed_init_arm.c.

Referenced by ff_fft_init().

◆ ff_fft_end()

void ff_fft_end ( FFTContext s)

Definition at line 324 of file fft_template.c.

◆ ff_mdct_init()

int ff_mdct_init ( FFTContext s,
int  nbits,
int  inverse,
double  scale 
)

init MDCT or IMDCT computation.

Definition at line 48 of file mdct_template.c.

◆ ff_mdct_end()

void ff_mdct_end ( FFTContext s)

Definition at line 209 of file mdct_template.c.

Referenced by ff_mdct_init().

FFT_NAME
#define FFT_NAME(x)
Definition: fft.h:41
NULL
#define NULL
Definition: coverity.c:32