00001 /********************************************************** 00002 *********************************************************** 00003 * European Southern Observatory 00004 * VLTI MIDI Data Reduction Software 00005 * 00006 * Module name: fft.h 00007 * Description: 00008 * 00009 * 00010 * History: 00011 * 03-Feb-03 (jmeisner) Created 00012 * 03-Mar-03 (csabet) Added title, directives and included in the MIDI pipeline 00013 *********************************************************** 00014 **********************************************************/ 00015 #ifndef _FFT_H 00016 #define _FFT_H 00017 00018 /********************************************************** 00019 * Include files 00020 **********************************************************/ 00021 00022 /********************************************************** 00023 * Constant definitions 00024 **********************************************************/ 00025 #define MAXFFTSIZE (4096) // Possible values are power of 2 00026 00027 /********************************************************** 00028 * Global Variables 00029 **********************************************************/ 00030 extern struct Complex *FFTarray; // New, array in which FFT is processed, and results delivered: 00031 extern int FFTsize; 00032 extern int FFThalfsize; 00033 extern int FFTlevel; 00034 extern int shuffle[]; 00035 extern float ScaleFFTby; 00036 00037 /********************************************************** 00038 * Type definitions 00039 **********************************************************/ 00040 00041 /********************************************************** 00042 * Function Prototypes 00043 **********************************************************/ 00044 void FFT(struct Complex *Input, int level); 00045 void IFT(struct Complex *Input, int level); 00046 void FFTofReal(float *Input, int InputSize); 00047 void FFTfullReal(float *Input, int InputSize, float scale); 00048 00049 // Also might be used externally (usually not!): 00050 00051 void FFTInit(int level); // , int inverse); 00052 void SetFFTsize(int InputSize); 00053 void DoFFT(void); 00054 void DoIFT(void); 00055 void Type2DoIFT(void); 00056 int determineFFTsize( 00057 int framesPerScan); 00058 00059 /* void ButterflyXfwd (int AIndex, int BIndex, int TwiddleIndex, */ 00060 /* struct Complex arr1[]); */ 00061 /* void ButterflyXinv (int AIndex, int BIndex, int TwiddleIndex, */ 00062 /* struct Complex arr1[]); */ 00063 /* void Type2ButterflyXinv (int AIndex, int BIndex, int TwiddleIndex, */ 00064 /* struct Complex arr1[]); */ 00065 /* void Type2IFT(struct Complex *Output, int newlevel); */ 00066 /* void Type2IFTtoReal(float *Output, int newlevel); */ 00067 /* void FFTofShortArray(struct Complex *Input, int InputSize); */ 00068 00069 /*********************************************************/ 00070 #endif 00071 /*********************************************************/