123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- #ifndef AVCODEC_AVFFT_H
- #define AVCODEC_AVFFT_H
- typedef float FFTSample;
- typedef struct FFTComplex {
- FFTSample re, im;
- } FFTComplex;
- typedef struct FFTContext FFTContext;
- FFTContext *av_fft_init(int nbits, int inverse);
- void av_fft_permute(FFTContext *s, FFTComplex *z);
- void av_fft_calc(FFTContext *s, FFTComplex *z);
- void av_fft_end(FFTContext *s);
- FFTContext *av_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);
- enum RDFTransformType {
- DFT_R2C,
- IDFT_C2R,
- IDFT_R2C,
- DFT_C2R,
- };
- typedef struct RDFTContext RDFTContext;
- RDFTContext *av_rdft_init(int nbits, enum RDFTransformType trans);
- void av_rdft_calc(RDFTContext *s, FFTSample *data);
- void av_rdft_end(RDFTContext *s);
- typedef struct DCTContext DCTContext;
- enum DCTTransformType {
- DCT_II = 0,
- DCT_III,
- DCT_I,
- DST_I,
- };
- DCTContext *av_dct_init(int nbits, enum DCTTransformType type);
- void av_dct_calc(DCTContext *s, FFTSample *data);
- void av_dct_end (DCTContext *s);
- #endif
|