Mercurial > libavcodec.hg
diff fft.h @ 11392:384d803faff4 libavcodec
Create a public API for FFT family of functions
author | mru |
---|---|
date | Sun, 07 Mar 2010 21:56:45 +0000 |
parents | 4c7afa50df6f |
children | 1382cfff33bb |
line wrap: on
line diff
--- a/fft.h Sun Mar 07 21:47:44 2010 +0000 +++ b/fft.h Sun Mar 07 21:56:45 2010 +0000 @@ -25,18 +25,11 @@ #include <stdint.h> #include "config.h" #include "libavutil/mem.h" +#include "avfft.h" /* FFT computation */ -/* NOTE: soon integer code will be added, so you must use the - FFTSample type */ -typedef float FFTSample; - -typedef struct FFTComplex { - FFTSample re, im; -} FFTComplex; - -typedef struct FFTContext { +struct FFTContext { int nbits; int inverse; uint16_t *revtab; @@ -57,7 +50,7 @@ int permutation; #define FF_MDCT_PERM_NONE 0 #define FF_MDCT_PERM_INTERLEAVE 1 -} FFTContext; +}; #if CONFIG_HARDCODED_TABLES #define COSTABLE_CONST const @@ -194,14 +187,7 @@ /* Real Discrete Fourier Transform */ -enum RDFTransformType { - DFT_R2C, - IDFT_C2R, - IDFT_R2C, - DFT_C2R, -}; - -typedef struct { +struct RDFTContext { int nbits; int inverse; int sign_convention; @@ -210,7 +196,7 @@ const FFTSample *tcos; SINTABLE_CONST FFTSample *tsin; FFTContext fft; -} RDFTContext; +}; /** * Sets up a real FFT. @@ -223,14 +209,14 @@ /* Discrete Cosine Transform */ -typedef struct { +struct DCTContext { int nbits; int inverse; FFTSample *data; RDFTContext rdft; const float *costab; FFTSample *csc2; -} DCTContext; +}; /** * Sets up (Inverse)DCT.