vrshoot

annotate libs/vorbis/mdct.h @ 2:334d17aed7de

visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 18:36:38 +0200
parents
children
rev   line source
nuclear@0 1 /********************************************************************
nuclear@0 2 * *
nuclear@0 3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
nuclear@0 4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
nuclear@0 5 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
nuclear@0 6 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
nuclear@0 7 * *
nuclear@0 8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 *
nuclear@0 9 * by the Xiph.Org Foundation http://www.xiph.org/ *
nuclear@0 10 * *
nuclear@0 11 ********************************************************************
nuclear@0 12
nuclear@0 13 function: modified discrete cosine transform prototypes
nuclear@0 14 last mod: $Id: mdct.h 16227 2009-07-08 06:58:46Z xiphmont $
nuclear@0 15
nuclear@0 16 ********************************************************************/
nuclear@0 17
nuclear@0 18 #ifndef _OGG_mdct_H_
nuclear@0 19 #define _OGG_mdct_H_
nuclear@0 20
nuclear@0 21 #include "vorbis/codec.h"
nuclear@0 22
nuclear@0 23
nuclear@0 24
nuclear@0 25
nuclear@0 26
nuclear@0 27 /*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/
nuclear@0 28 #ifdef MDCT_INTEGERIZED
nuclear@0 29
nuclear@0 30 #define DATA_TYPE int
nuclear@0 31 #define REG_TYPE register int
nuclear@0 32 #define TRIGBITS 14
nuclear@0 33 #define cPI3_8 6270
nuclear@0 34 #define cPI2_8 11585
nuclear@0 35 #define cPI1_8 15137
nuclear@0 36
nuclear@0 37 #define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
nuclear@0 38 #define MULT_NORM(x) ((x)>>TRIGBITS)
nuclear@0 39 #define HALVE(x) ((x)>>1)
nuclear@0 40
nuclear@0 41 #else
nuclear@0 42
nuclear@0 43 #define DATA_TYPE float
nuclear@0 44 #define REG_TYPE float
nuclear@0 45 #define cPI3_8 .38268343236508977175F
nuclear@0 46 #define cPI2_8 .70710678118654752441F
nuclear@0 47 #define cPI1_8 .92387953251128675613F
nuclear@0 48
nuclear@0 49 #define FLOAT_CONV(x) (x)
nuclear@0 50 #define MULT_NORM(x) (x)
nuclear@0 51 #define HALVE(x) ((x)*.5f)
nuclear@0 52
nuclear@0 53 #endif
nuclear@0 54
nuclear@0 55
nuclear@0 56 typedef struct {
nuclear@0 57 int n;
nuclear@0 58 int log2n;
nuclear@0 59
nuclear@0 60 DATA_TYPE *trig;
nuclear@0 61 int *bitrev;
nuclear@0 62
nuclear@0 63 DATA_TYPE scale;
nuclear@0 64 } mdct_lookup;
nuclear@0 65
nuclear@0 66 extern void mdct_init(mdct_lookup *lookup,int n);
nuclear@0 67 extern void mdct_clear(mdct_lookup *l);
nuclear@0 68 extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
nuclear@0 69 extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
nuclear@0 70
nuclear@0 71 #endif