1 | #ifndef FFTMAYER_H_SEEN
|
---|
2 | #define FFTMAYER_H_SEEN
|
---|
3 | /*
|
---|
4 | ** FFT and FHT routines
|
---|
5 | ** Copyright 1988, 1993; Ron Mayer
|
---|
6 | **
|
---|
7 | ** fht(fz,n);
|
---|
8 | ** Does a hartley transform of "n" points in the array "fz".
|
---|
9 | ** fft(n,real,imag)
|
---|
10 | ** Does a fourier transform of "n" points of the "real" and
|
---|
11 | ** "imag" arrays.
|
---|
12 | ** ifft(n,real,imag)
|
---|
13 | ** Does an inverse fourier transform of "n" points of the "real"
|
---|
14 | ** and "imag" arrays.
|
---|
15 | ** realfft(n,real)
|
---|
16 | ** Does a real-valued fourier transform of "n" points of the
|
---|
17 | ** "real" arrays. The real part of the transform ends
|
---|
18 | ** up in the first half of the array and the imaginary part of the
|
---|
19 | ** transform ends up in the second half of the array.
|
---|
20 | ** realifft(n,real)
|
---|
21 | ** The inverse of the realfft() routine above.
|
---|
22 | **
|
---|
23 | **
|
---|
24 | ** NOTE: This routine uses at least 2 patented algorithms, and may be
|
---|
25 | ** under the restrictions of a bunch of different organizations.
|
---|
26 | ** Although I wrote it completely myself; it is kind of a derivative
|
---|
27 | ** of a routine I once authored and released under the GPL, so it
|
---|
28 | ** may fall under the free software foundation's restrictions;
|
---|
29 | ** it was worked on as a Stanford Univ project, so they claim
|
---|
30 | ** some rights to it; it was further optimized at work here, so
|
---|
31 | ** I think this company claims parts of it. The patents are
|
---|
32 | ** held by R. Bracewell (the FHT algorithm) and O. Buneman (the
|
---|
33 | ** trig generator), both at Stanford Univ.
|
---|
34 | ** If it were up to me, I'd say go do whatever you want with it;
|
---|
35 | ** but it would be polite to give credit to the following people
|
---|
36 | ** if you use this anywhere:
|
---|
37 | ** Euler - probable inventor of the fourier transform.
|
---|
38 | ** Gauss - probable inventor of the FFT.
|
---|
39 | ** Hartley - probable inventor of the hartley transform.
|
---|
40 | ** Buneman - for a really cool trig generator
|
---|
41 | ** Mayer(me) - for authoring this particular version and
|
---|
42 | ** including all the optimizations in one package.
|
---|
43 | ** Thanks,
|
---|
44 | ** Ron Mayer; mayer@acuson.com
|
---|
45 | **
|
---|
46 | */
|
---|
47 |
|
---|
48 | /* Reza 4/02/99 : Introduced double AND float version */
|
---|
49 | #include "machdefs.h"
|
---|
50 |
|
---|
51 | #ifdef __cplusplus
|
---|
52 | extern "C" {
|
---|
53 | #endif
|
---|
54 |
|
---|
55 | void fht_r4( r_4 *fz,int n);
|
---|
56 | void ifft_r4(int n, r_4 *real, r_4 *imag);
|
---|
57 | void realfft_r4(int n, r_4 *real);
|
---|
58 | void fft_r4(int n, r_4 *real,r_4 *imag);
|
---|
59 | void realifft_r4(int n,r_4 *real);
|
---|
60 |
|
---|
61 | void fht_r8( r_8 *fz,int n);
|
---|
62 | void ifft_r8(int n, r_8 *real, r_8 *imag);
|
---|
63 | void realfft_r8(int n, r_8 *real);
|
---|
64 | void fft_r8(int n, r_8 *real,r_8 *imag);
|
---|
65 | void realifft_r8(int n,r_8 *real);
|
---|
66 |
|
---|
67 | #ifdef __cplusplus
|
---|
68 | }
|
---|
69 | #endif
|
---|
70 |
|
---|
71 | #endif
|
---|