xine-lib  1.2.9
fft.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2009 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  */
21 #ifndef FFT_H
22 #define FFT_H
23 
24 struct complex_s
25 {
26  double re;
27  double im;
28 };
29 typedef struct complex_s complex_t;
30 
31 
32 struct fft_s {
33  int bits;
34  double *SineTable;
35  double *CosineTable;
36  double *WinTable;
37 };
38 typedef struct fft_s fft_t;
39 
40 fft_t *fft_new (int bits);
41 void fft_dispose(fft_t *fft);
42 
43 void fft_compute (fft_t *fft, complex_t wave[]);
44 void fft_window (fft_t *fft, complex_t wave[]);
45 
46 double fft_amp (int n, complex_t wave[], int bits);
47 void fft_scale (complex_t wave[], int bits);
48 
49 #endif /* FFT_H */
void fft_scale(complex_t wave[], int bits)
Definition: fft.c:198
void fft_window(fft_t *fft, complex_t wave[])
Definition: fft.c:173
double im
Definition: fft.h:27
void fft_compute(fft_t *fft, complex_t wave[])
Definition: fft.c:75
double * CosineTable
Definition: fft.h:35
Definition: fft.h:24
int bits
Definition: fft.h:33
void fft_dispose(fft_t *fft)
Definition: fft.c:159
fft_t * fft_new(int bits)
Definition: fft.c:128
double re
Definition: fft.h:26
double * SineTable
Definition: fft.h:34
double * WinTable
Definition: fft.h:36
Definition: fft.h:32
#define bits
double fft_amp(int n, complex_t wave[], int bits)
Definition: fft.c:188