]> git.sesse.net Git - vlc/blob - modules/codec/wmafixed/fft.h
wma-fixed: Forward port of fixed integer WMA v1/2 decoder.
[vlc] / modules / codec / wmafixed / fft.h
1 /*
2  * WMA compatible decoder
3  * Copyright (c) 2002 The FFmpeg Project.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19
20 #ifndef WMA_FFT_H
21 #define WMA_FFT_H 1
22
23 #include <inttypes.h>
24
25 typedef int32_t FFTSample;
26
27 typedef struct FFTComplex
28 {
29     int32_t re, im;
30 }
31 FFTComplex;
32
33 typedef struct FFTContext
34 {
35     int nbits;
36     int inverse;
37     uint16_t *revtab;
38     FFTComplex *exptab;
39     FFTComplex *exptab1; /* only used by SSE code */
40     int (*fft_calc)(struct FFTContext *s, FFTComplex *z);
41 }
42 FFTContext;
43
44 int fft_calc_unscaled(FFTContext *s, FFTComplex *z);
45 int fft_init_global(void);
46
47 #endif