xine-lib  1.2.10
fft.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2000-2018 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;
38  int bmask;
39 };
40 typedef struct fft_s fft_t;
41 
42 fft_t *fft_new (int bits);
43 void fft_dispose(fft_t *fft);
44 
45 void fft_compute (fft_t *fft, complex_t wave[]);
46 void fft_window (fft_t *fft, complex_t wave[]);
47 
48 double fft_amp (int n, complex_t wave[], int bits);
49 void fft_scale (complex_t wave[], int bits);
50 
51 double fft_amp2 (fft_t *fft, int n, complex_t wave[]);
52 
53 #endif /* FFT_H */
complex_s
Definition: fft.h:24
SINE
#define SINE(x)
Definition: fft.c:38
fft_new
fft_t * fft_new(int bits)
Definition: fft.c:136
fft_amp
double fft_amp(int n, complex_t wave[], int bits)
Definition: fft.c:212
fft_s::bits
int bits
Definition: fft.h:33
reverse
static unsigned int reverse(unsigned int val, int bits)
Definition: fft.c:56
REAL
#define REAL(x)
Definition: fft.c:47
PERMUTE
#define PERMUTE(x, y)
Definition: fft.c:42
complex_s::im
double im
Definition: fft.h:27
fft_s::WinTable
double * WinTable
Definition: fft.h:36
SAMPLES
#define SAMPLES
Definition: fft.c:45
fft_compute
void fft_compute(fft_t *fft, complex_t wave[])
Definition: fft.c:75
fft_amp2
double fft_amp2(fft_t *fft, int n, complex_t wave[])
Definition: fft.c:218
fft_new
fft_t * fft_new(int bits)
Definition: fft.c:136
fft_s::SineTable
double * SineTable
Definition: fft.h:34
COSINE
#define COSINE(x)
Definition: fft.c:39
NULL
NULL
Definition: xine_plugin.c:78
fft_window
void fft_window(fft_t *fft, complex_t wave[])
Definition: fft.c:197
ALPHA
#define ALPHA
Definition: fft.c:49
fft_s::bmask
int bmask
Definition: fft.h:38
fft_dispose
void fft_dispose(fft_t *fft)
Definition: fft.c:184
complex_s::re
double re
Definition: fft.h:26
fft_scale
void fft_scale(complex_t wave[], int bits)
Definition: fft.c:228
IMAG
#define IMAG(x)
Definition: fft.c:48
fft_s
Definition: fft.h:32
WINDOW
#define WINDOW(x)
Definition: fft.c:40
fft_amp
double fft_amp(int n, complex_t wave[], int bits)
Definition: fft.c:212
fft_dispose
void fft_dispose(fft_t *fft)
Definition: fft.c:184
fft_s::PermuteTable
int * PermuteTable
Definition: fft.h:37
fft.h
fft_window
void fft_window(fft_t *fft, complex_t wave[])
Definition: fft.c:197
config.h
fft_scale
void fft_scale(complex_t wave[], int bits)
Definition: fft.c:228
fft_compute
void fft_compute(fft_t *fft, complex_t wave[])
Definition: fft.c:75
bits
#define bits
fft_amp2
double fft_amp2(fft_t *fft, int n, complex_t wave[])
Definition: fft.c:218
fft_s::CosineTable
double * CosineTable
Definition: fft.h:35