xine-lib: xine-lib-1.2.13/src/post/visualizations/fft.h Source File

xine-lib 1.2.13-20230125hg15249

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;
37 int *PermuteTable;
38 int bmask;
39};
40 typedef struct fft_s fft_t;
41
42 fft_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 */
fft_amp2
double fft_amp2(fft_t *fft, int n, complex_t wave[])
Definition fft.c:218
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
fft_new
fft_t * fft_new(int bits)
Definition fft.c:136
fft_dispose
void fft_dispose(fft_t *fft)
Definition fft.c:184
fft_amp
double fft_amp(int n, complex_t wave[], int bits)
Definition fft.c:212
fft_window
void fft_window(fft_t *fft, complex_t wave[])
Definition fft.c:197
bits
#define bits
complex_s
Definition fft.h:25
complex_s::re
double re
Definition fft.h:26
complex_s::im
double im
Definition fft.h:27
fft_s
Definition fft.h:32
fft_s::bmask
int bmask
Definition fft.h:38
fft_s::bits
int bits
Definition fft.h:33
fft_s::SineTable
double * SineTable
Definition fft.h:34
fft_s::PermuteTable
int * PermuteTable
Definition fft.h:37
fft_s::CosineTable
double * CosineTable
Definition fft.h:35
fft_s::WinTable
double * WinTable
Definition fft.h:36