LMMS
Loading...
Searching...
No Matches
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-2009 *
9 * by the Xiph.Org Foundation https://xiph.org/ *
10 * *
11 ********************************************************************
12
13 function: modified discrete cosine transform prototypes
14
15 ********************************************************************/
16
17#ifndef _OGG_mdct_H_
18#define _OGG_mdct_H_
19
20#include "../../codec.h"
21
22
23
24
25
26/*#define MDCT_INTEGERIZED <- be warned there could be some hurt left here*/
27#ifdef MDCT_INTEGERIZED
28
29#define DATA_TYPE int
30#define REG_TYPE register int
31#define TRIGBITS 14
32#define cPI3_8 6270
33#define cPI2_8 11585
34#define cPI1_8 15137
35
36#define FLOAT_CONV(x) ((int)((x)*(1<<TRIGBITS)+.5))
37#define MULT_NORM(x) ((x)>>TRIGBITS)
38#define HALVE(x) ((x)>>1)
39
40#else
41
42#define DATA_TYPE float
43#define REG_TYPE float
44#define cPI3_8 .38268343236508977175F
45#define cPI2_8 .70710678118654752441F
46#define cPI1_8 .92387953251128675613F
47
48#define FLOAT_CONV(x) (x)
49#define MULT_NORM(x) (x)
50#define HALVE(x) ((x)*.5f)
51
52#endif
53
54
55typedef struct {
56 int n;
57 int log2n;
58
60 int *bitrev;
61
64
65extern void mdct_init(mdct_lookup *lookup,int n);
66extern void mdct_clear(mdct_lookup *l);
69
70#endif
int * l
Definition inflate.c:1579
float in
Definition lilv_test.c:1460
float out
Definition lilv_test.c:1461
void mdct_backward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out)
Definition mdct.c:396
void mdct_init(mdct_lookup *lookup, int n)
Definition mdct.c:51
void mdct_clear(mdct_lookup *l)
Definition mdct.c:338
void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out)
Definition mdct.c:492
#define DATA_TYPE
Definition mdct.h:42
Definition mdct.h:55
int log2n
Definition mdct.h:57
int n
Definition mdct.h:56
DATA_TYPE scale
Definition mdct.h:62
int * bitrev
Definition mdct.h:60
DATA_TYPE * trig
Definition mdct.h:59
int n
Definition crypt.c:458
ZCONST uch * init
Definition extract.c:2392