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