internal checkpoint

split kiss_fft.c into multiple files.  It seems the best approach, all things considered.
This commit is contained in:
Mark Borgerding
2003-12-04 02:38:50 +00:00
parent 164ab47a25
commit f3c4a9e9ca
10 changed files with 256 additions and 202 deletions

View File

@ -1,6 +1,12 @@
#ifndef KISS_FFT_H
#define KISS_FFT_H
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <memory.h>
#ifdef FIXED_POINT
# define kiss_fft_scalar short
#else
@ -31,22 +37,27 @@ void* kiss_fft_alloc(int nfft,int inverse_fft);
/*
* kiss_fft(cfg,in_out_buf)
*
* Perform an in-place FFT on a complex input buffer.
* Perform an FFT on a complex input buffer.
* for a forward FFT,
* the input should be f[0] , f[1] , ... ,f[nfft-1]
* the output will be F[0] , F[1] , ... ,F[nfft-1]
* Note that each element is complex.
* */
void kiss_fft( const void* cfg_from_alloc , kiss_fft_cpx *f ); /* call for each buffer */
* fin should be f[0] , f[1] , ... ,f[nfft-1]
* fout will be F[0] , F[1] , ... ,F[nfft-1]
* Note that each element is complex and can be accessed like
f[k].r and f[k].i
Apologies to previous users of KISS FFT, this function has changed from 2 args to 3 args.
To maintain the original behavior , use fout == fin
* */
void kiss_fft(const void * cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
/* two buffer version */
void kiss_fft_io(const void * cfg,const kiss_fft_cpx *fin,kiss_fft_cpx *fout);
/* allocate a 2-dimensional FFT
kiss_fft() is used as in the 1d case, but the data should be stored rowwise,
the data should be stored rowwise,
in other words, an array made up of row[0], then row[1], etc
*/
void * kiss_fft2d_alloc(int nrows,int ncols,int inverse_fft);
void kiss_fft2d(const void* cfg_from_alloc , const kiss_fft_cpx *fin,kiss_fft_cpx *fout );
/* when done with the cfg for a given fft size and direction, simply free it*/
#define kiss_fft_free free