doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mdct.h
Go to the documentation of this file.
1 /********************************************************************
2  * *
3  * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4  * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
5  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
6  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
7  * *
8  * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
9  * by the XIPHOPHORUS Company http://www.xiph.org/ *
10  * *
11  ********************************************************************
12 
13  function: modified discrete cosine transform prototypes
14  last mod: $Id: mdct.h,v 1.20 2002/01/22 11:59:00 xiphmont Exp $
15 
16  ********************************************************************/
17 
18 #ifndef _OGG_mdct_H_
19 #define _OGG_mdct_H_
20 
21 #include "../vorbis/codec.h"
22 
23 
24 
25 
26 
27 /*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/
28 #ifdef MDCT_INTEGERIZED
29 
30 #define DATA_TYPE int
31 #define REG_TYPE register int
32 #define TRIGBITS 14
33 #define cPI3_8 6270
34 #define cPI2_8 11585
35 #define cPI1_8 15137
36 
37 #define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
38 #define MULT_NORM(x) ((x)>>TRIGBITS)
39 #define HALVE(x) ((x)>>1)
40 
41 #else
42 
43 #define DATA_TYPE float
44 #define REG_TYPE float
45 #define cPI3_8 .38268343236508977175F
46 #define cPI2_8 .70710678118654752441F
47 #define cPI1_8 .92387953251128675613F
48 
49 #define FLOAT_CONV(x) (x)
50 #define MULT_NORM(x) (x)
51 #define HALVE(x) ((x)*.5f)
52 
53 #endif
54 
55 
56 typedef struct {
57  int n;
58  int log2n;
59 
61  int *bitrev;
62 
64 } mdct_lookup;
65 
66 extern void mdct_init(mdct_lookup *lookup,int n);
67 extern void mdct_clear(mdct_lookup *l);
68 extern void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
69 extern void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out);
70 
71 #endif
72 
73 
74 
75 
76 
77 
78 
79 
80 
81 
82 
83 
GLenum GLsizei n
Definition: glext.h:3705
int * bitrev
Definition: mdct.h:61
list l
Definition: prepare.py:17
DATA_TYPE scale
Definition: mdct.h:63
DATA_TYPE * trig
Definition: mdct.h:60
void mdct_clear(mdct_lookup *l)
Definition: mdct.c:339
void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out)
Definition: mdct.c:493
int n
Definition: mdct.h:57
GLuint in
Definition: glext.h:5388
#define DATA_TYPE
Definition: mdct.h:43
int log2n
Definition: mdct.h:58
void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out)
Definition: mdct.c:397
void mdct_init(mdct_lookup *lookup, int n)
Definition: mdct.c:52