MloFft.h

00001 /*****************************************************************
00002 |
00003 |    Copyright 2004-2006 Axiomatic Systems LLC
00004 |
00005 |    This file is part of Melo (Melo AAC Decoder).
00006 |
00007 |    Unless you have obtained Melo under a difference license,
00008 |    this version of Melo is Melo|GPL.
00009 |    Melo|GPL is free software; you can redistribute it and/or modify
00010 |    it under the terms of the GNU General Public License as published by
00011 |    the Free Software Foundation; either version 2, or (at your option)
00012 |    any later version.
00013 |
00014 |    Melo|GPL is distributed in the hope that it will be useful,
00015 |    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 |    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 |    GNU General Public License for more details.
00018 |
00019 |    You should have received a copy of the GNU General Public License
00020 |    along with Melo|GPL; see the file COPYING.  If not, write to the
00021 |    Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
00022 |    02111-1307, USA.
00023 |
00024  ****************************************************************/
00025 
00026 #ifndef _MLO_FFT_H_
00027 #define _MLO_FFT_H_
00028 
00029 
00030 
00031 /*----------------------------------------------------------------------
00032 |       Includes
00033 +---------------------------------------------------------------------*/
00034 
00035 
00036 
00037 #include "MloDefs.h"
00038 #include "MloFloat.h"
00039 #include "MloTypes.h"
00040 
00041 
00042 
00043 /*----------------------------------------------------------------------
00044 |       Constants
00045 +---------------------------------------------------------------------*/
00046 
00047 
00048 
00049 enum {   MLO_FFT_BR_PACK         = 4   };
00050 enum {   MLO_FFT_TABLE_LEN_BR_L  = MLO_DEFS_FRAME_LEN_LONG  / MLO_FFT_BR_PACK  };
00051 enum {   MLO_FFT_TABLE_LEN_BR_S  = MLO_DEFS_FRAME_LEN_SHORT / MLO_FFT_BR_PACK  };
00052 
00053 /* For tables */
00054 enum {   MLO_FFT_TABLE_LEN_COS   = MLO_DEFS_FRAME_LEN_LONG >> 2   };
00055 
00056 
00057 
00058 /*----------------------------------------------------------------------
00059 |       Types
00060 +---------------------------------------------------------------------*/
00061 
00062 
00063 
00064 typedef struct MLO_Fft
00065 {
00066    MLO_Float      buffer [MLO_DEFS_FRAME_LEN_LONG];
00067    MLO_Int16      table_br_l [MLO_FFT_TABLE_LEN_BR_L];   /* Bit-reverse table (only multiples of MLO_FFT_BR_PACK) */
00068    MLO_Int16      table_br_s [MLO_FFT_TABLE_LEN_BR_S];
00069 }  MLO_Fft;
00070 
00071 
00072 
00073 /*----------------------------------------------------------------------
00074 |       Function prototypes
00075 +---------------------------------------------------------------------*/
00076 
00077 
00078 
00079 #ifdef __cplusplus
00080 extern "C" {
00081 #endif /* __cplusplus */
00082 
00083 
00084 
00085 void  MLO_Fft_Init (MLO_Fft *fft_ptr);
00086 void  MLO_Fft_Process (MLO_Fft *fft_ptr, MLO_Float x_ptr [], const MLO_Float f_ptr [], int len);
00087 
00088 
00089 
00090 #ifdef __cplusplus
00091 }
00092 #endif /* __cplusplus */
00093 
00094 
00095 
00096 #endif /* _MLO_FFT_H_ */