examples/SFExamples/oggvorbiscodec94/src/libvorbis/lib/mdct.h

00001 /********************************************************************
00002  *                                                                  *
00003  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
00004  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
00005  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
00006  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
00007  *                                                                  *
00008  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002             *
00009  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
00010  *                                                                  *
00011  ********************************************************************
00012 
00013  function: modified discrete cosine transform prototypes
00014  last mod: $Id: mdct.h 7187 2004-07-20 07:24:27Z xiphmont $
00015 
00016  ********************************************************************/
00017 
00018 #ifndef _OGG_mdct_H_
00019 #define _OGG_mdct_H_
00020 
00021 #include "vorbis/codec.h"
00022 
00023 
00024 
00025 
00026 
00027 /*#define MDCT_INTEGERIZED  <- be warned there could be some hurt left here*/
00028 #ifdef MDCT_INTEGERIZED
00029 
00030 #define DATA_TYPE int
00031 #define REG_TYPE  register int
00032 #define TRIGBITS 14
00033 #define cPI3_8 6270
00034 #define cPI2_8 11585
00035 #define cPI1_8 15137
00036 
00037 #define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
00038 #define MULT_NORM(x) ((x)>>TRIGBITS)
00039 #define HALVE(x) ((x)>>1)
00040 
00041 #else
00042 
00043 #define DATA_TYPE float
00044 #define REG_TYPE  float
00045 #define cPI3_8 .38268343236508977175F
00046 #define cPI2_8 .70710678118654752441F
00047 #define cPI1_8 .92387953251128675613F
00048 
00049 #define FLOAT_CONV(x) (x)
00050 #define MULT_NORM(x) (x)
00051 #define HALVE(x) ((x)*.5f)
00052 
00053 #endif
00054 
00055 
00056 typedef struct {
00057   int n;
00058   int log2n;
00059   
00060   DATA_TYPE *trig;
00061   int       *bitrev;
00062 
00063   DATA_TYPE scale;
00064 } mdct_lookup;
00065 
00066 extern void mdct_init(mdct_lookup *lookup,int n);
00067 extern void mdct_clear(mdct_lookup *l);
00068 extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
00069 extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
00070 
00071 #endif
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 

Generated by  doxygen 1.6.2