xine-lib 1.2.11
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
25{
26 double re;
27 double im;
28};
29typedef struct complex_s complex_t;
30
31
32struct fft_s {
33 int bits;
34 double *SineTable;
35 double *CosineTable;
36 double *WinTable;
38 int bmask;
39};
40typedef struct fft_s fft_t;
41
42fft_t *fft_new (int bits);
43void fft_dispose(fft_t *fft);
44
45void fft_compute (fft_t *fft, complex_t wave[]);
46void fft_window (fft_t *fft, complex_t wave[]);
47
48double fft_amp (int n, complex_t wave[], int bits);
49void fft_scale (complex_t wave[], int bits);
50
51double fft_amp2 (fft_t *fft, int n, complex_t wave[]);
52
53#endif /* FFT_H */
double fft_amp2(fft_t *fft, int n, complex_t wave[])
Definition: fft.c:218
void fft_scale(complex_t wave[], int bits)
Definition: fft.c:228
void fft_compute(fft_t *fft, complex_t wave[])
Definition: fft.c:75
fft_t * fft_new(int bits)
Definition: fft.c:136
void fft_dispose(fft_t *fft)
Definition: fft.c:184
double fft_amp(int n, complex_t wave[], int bits)
Definition: fft.c:212
void fft_window(fft_t *fft, complex_t wave[])
Definition: fft.c:197
#define bits
Definition: fft.h:25
double re
Definition: fft.h:26
double im
Definition: fft.h:27
Definition: fft.h:32
int bmask
Definition: fft.h:38
int bits
Definition: fft.h:33
double * SineTable
Definition: fft.h:34
int * PermuteTable
Definition: fft.h:37
double * CosineTable
Definition: fft.h:35
double * WinTable
Definition: fft.h:36