1 /*
2  * FAAC - Freeware Advanced Audio Coder
3  * $Id: fft.h,v 1.6 2005/02/02 07:50:35 sur Exp $
4  * Copyright (C) 2002 Krzysztof Nikiel
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15 
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21 
22 #ifndef _FFT_H_
23 #define _FFT_H_
24 
25 typedef float fftfloat;
26 
27 #if defined DRM && !defined DRM_1024
28 
29 #define MAX_FFT 10
30 
31 typedef struct
32 {
33     /*      cfg[Max FFT][FFT and inverse FFT] */
34     void*   cfg[MAX_FFT][2];
35 } FFT_Tables;
36 
37 #else  /* use own FFT */
38 
39 typedef struct
40 {
41     fftfloat **costbl;
42     fftfloat **negsintbl;
43     unsigned short **reordertbl;
44 } FFT_Tables;
45 
46 #endif /* defined DRM && !defined DRM_1024 */
47 
48 void fft_initialize		( FFT_Tables *fft_tables );
49 void fft_terminate	( FFT_Tables *fft_tables );
50 
51 void rfft			( FFT_Tables *fft_tables, double *x, int logm );
52 void fft			( FFT_Tables *fft_tables, double *xr, double *xi, int logm );
53 void ffti			( FFT_Tables *fft_tables, double *xr, double *xi, int logm );
54 
55 #endif
56