nuclear@1: /******************************************************************** nuclear@1: * * nuclear@1: * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * nuclear@1: * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * nuclear@1: * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * nuclear@1: * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * nuclear@1: * * nuclear@1: * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * nuclear@1: * by the Xiph.Org Foundation http://www.xiph.org/ * nuclear@1: * * nuclear@1: ******************************************************************** nuclear@1: nuclear@1: function: modified discrete cosine transform prototypes nuclear@1: last mod: $Id: mdct.h 16227 2009-07-08 06:58:46Z xiphmont $ nuclear@1: nuclear@1: ********************************************************************/ nuclear@1: nuclear@1: #ifndef _OGG_mdct_H_ nuclear@1: #define _OGG_mdct_H_ nuclear@1: nuclear@1: #include "vorbis/codec.h" nuclear@1: nuclear@1: nuclear@1: nuclear@1: nuclear@1: nuclear@1: /*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/ nuclear@1: #ifdef MDCT_INTEGERIZED nuclear@1: nuclear@1: #define DATA_TYPE int nuclear@1: #define REG_TYPE register int nuclear@1: #define TRIGBITS 14 nuclear@1: #define cPI3_8 6270 nuclear@1: #define cPI2_8 11585 nuclear@1: #define cPI1_8 15137 nuclear@1: nuclear@1: #define FLOAT_CONV(x) ((int)((x)*(1<>TRIGBITS) nuclear@1: #define HALVE(x) ((x)>>1) nuclear@1: nuclear@1: #else nuclear@1: nuclear@1: #define DATA_TYPE float nuclear@1: #define REG_TYPE float nuclear@1: #define cPI3_8 .38268343236508977175F nuclear@1: #define cPI2_8 .70710678118654752441F nuclear@1: #define cPI1_8 .92387953251128675613F nuclear@1: nuclear@1: #define FLOAT_CONV(x) (x) nuclear@1: #define MULT_NORM(x) (x) nuclear@1: #define HALVE(x) ((x)*.5f) nuclear@1: nuclear@1: #endif nuclear@1: nuclear@1: nuclear@1: typedef struct { nuclear@1: int n; nuclear@1: int log2n; nuclear@1: nuclear@1: DATA_TYPE *trig; nuclear@1: int *bitrev; nuclear@1: nuclear@1: DATA_TYPE scale; nuclear@1: } mdct_lookup; nuclear@1: nuclear@1: extern void mdct_init(mdct_lookup *lookup,int n); nuclear@1: extern void mdct_clear(mdct_lookup *l); nuclear@1: extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); nuclear@1: extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out); nuclear@1: nuclear@1: #endif