Revision c7094831 libavcodec/fft.h

View differences:

libavcodec/fft.h
25 25
#include <stdint.h>
26 26
#include "config.h"
27 27
#include "libavutil/mem.h"
28
#include "avfft.h"
28 29

  
29 30
/* FFT computation */
30 31

  
31
/* NOTE: soon integer code will be added, so you must use the
32
   FFTSample type */
33
typedef float FFTSample;
34

  
35
typedef struct FFTComplex {
36
    FFTSample re, im;
37
} FFTComplex;
38

  
39
typedef struct FFTContext {
32
struct FFTContext {
40 33
    int nbits;
41 34
    int inverse;
42 35
    uint16_t *revtab;
......
57 50
    int permutation;
58 51
#define FF_MDCT_PERM_NONE       0
59 52
#define FF_MDCT_PERM_INTERLEAVE 1
60
} FFTContext;
53
};
61 54

  
62 55
#if CONFIG_HARDCODED_TABLES
63 56
#define COSTABLE_CONST const
......
194 187

  
195 188
/* Real Discrete Fourier Transform */
196 189

  
197
enum RDFTransformType {
198
    DFT_R2C,
199
    IDFT_C2R,
200
    IDFT_R2C,
201
    DFT_C2R,
202
};
203

  
204
typedef struct {
190
struct RDFTContext {
205 191
    int nbits;
206 192
    int inverse;
207 193
    int sign_convention;
......
210 196
    const FFTSample *tcos;
211 197
    SINTABLE_CONST FFTSample *tsin;
212 198
    FFTContext fft;
213
} RDFTContext;
199
};
214 200

  
215 201
/**
216 202
 * Sets up a real FFT.
......
223 209

  
224 210
/* Discrete Cosine Transform */
225 211

  
226
typedef struct {
212
struct DCTContext {
227 213
    int nbits;
228 214
    int inverse;
229 215
    FFTSample *data;
230 216
    RDFTContext rdft;
231 217
    const float *costab;
232 218
    FFTSample *csc2;
233
} DCTContext;
219
};
234 220

  
235 221
/**
236 222
 * Sets up (Inverse)DCT.

Also available in: Unified diff