author | koda |
Fri, 21 Sep 2012 01:29:33 +0200 | |
changeset 7699 | 2455207a2c71 |
parent 7697 | 767d3c4153a1 |
child 7849 | a12155461b34 |
permissions | -rw-r--r-- |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
1 |
/******************************************************************** |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
2 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
3 |
* THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
4 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
5 |
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
6 |
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
7 |
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
8 |
* * |
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
9 |
* THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003 * |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
10 |
* BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
11 |
* * |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
12 |
******************************************************************** |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
13 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
14 |
function: libvorbis codec headers |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
15 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
16 |
********************************************************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
17 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
18 |
#ifndef _V_CODECI_H_ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
19 |
#define _V_CODECI_H_ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
20 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
21 |
#define CHUNKSIZE 1024 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
22 |
|
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
23 |
#include "codebook.h" |
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
24 |
#include "ivorbiscodec.h" |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
25 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
26 |
#define VI_TRANSFORMB 1 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
27 |
#define VI_WINDOWB 1 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
28 |
#define VI_TIMEB 1 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
29 |
#define VI_FLOORB 2 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
30 |
#define VI_RESB 3 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
31 |
#define VI_MAPB 1 |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
32 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
33 |
typedef void vorbis_info_floor; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
34 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
35 |
/* vorbis_dsp_state buffers the current vorbis audio |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
36 |
analysis/synthesis state. The DSP state belongs to a specific |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
37 |
logical bitstream ****************************************************/ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
38 |
struct vorbis_dsp_state{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
39 |
vorbis_info *vi; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
40 |
oggpack_buffer opb; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
41 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
42 |
ogg_int32_t **work; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
43 |
ogg_int32_t **mdctright; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
44 |
int out_begin; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
45 |
int out_end; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
46 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
47 |
long lW; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
48 |
long W; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
49 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
50 |
ogg_int64_t granulepos; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
51 |
ogg_int64_t sequence; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
52 |
ogg_int64_t sample_count; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
53 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
54 |
}; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
55 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
56 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
57 |
/* Floor backend generic *****************************************/ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
58 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
59 |
extern vorbis_info_floor *floor0_info_unpack(vorbis_info *,oggpack_buffer *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
60 |
extern void floor0_free_info(vorbis_info_floor *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
61 |
extern int floor0_memosize(vorbis_info_floor *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
62 |
extern ogg_int32_t *floor0_inverse1(struct vorbis_dsp_state *, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
63 |
vorbis_info_floor *,ogg_int32_t *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
64 |
extern int floor0_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
65 |
ogg_int32_t *buffer,ogg_int32_t *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
66 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
67 |
extern vorbis_info_floor *floor1_info_unpack(vorbis_info *,oggpack_buffer *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
68 |
extern void floor1_free_info(vorbis_info_floor *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
69 |
extern int floor1_memosize(vorbis_info_floor *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
70 |
extern ogg_int32_t *floor1_inverse1(struct vorbis_dsp_state *, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
71 |
vorbis_info_floor *,ogg_int32_t *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
72 |
extern int floor1_inverse2 (struct vorbis_dsp_state *,vorbis_info_floor *, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
73 |
ogg_int32_t *buffer,ogg_int32_t *); |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
74 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
75 |
typedef struct{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
76 |
int order; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
77 |
long rate; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
78 |
long barkmap; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
79 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
80 |
int ampbits; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
81 |
int ampdB; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
82 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
83 |
int numbooks; /* <= 16 */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
84 |
char books[16]; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
85 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
86 |
} vorbis_info_floor0; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
87 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
88 |
typedef struct{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
89 |
char class_dim; /* 1 to 8 */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
90 |
char class_subs; /* 0,1,2,3 (bits: 1<<n poss) */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
91 |
unsigned char class_book; /* subs ^ dim entries */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
92 |
unsigned char class_subbook[8]; /* [VIF_CLASS][subs] */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
93 |
} floor1class; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
94 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
95 |
typedef struct{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
96 |
floor1class *class; /* [VIF_CLASS] */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
97 |
char *partitionclass; /* [VIF_PARTS]; 0 to 15 */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
98 |
ogg_uint16_t *postlist; /* [VIF_POSIT+2]; first two implicit */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
99 |
char *forward_index; /* [VIF_POSIT+2]; */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
100 |
char *hineighbor; /* [VIF_POSIT]; */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
101 |
char *loneighbor; /* [VIF_POSIT]; */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
102 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
103 |
int partitions; /* 0 to 31 */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
104 |
int posts; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
105 |
int mult; /* 1 2 3 or 4 */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
106 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
107 |
} vorbis_info_floor1; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
108 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
109 |
/* Residue backend generic *****************************************/ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
110 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
111 |
typedef struct vorbis_info_residue{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
112 |
int type; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
113 |
unsigned char *stagemasks; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
114 |
unsigned char *stagebooks; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
115 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
116 |
/* block-partitioned VQ coded straight residue */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
117 |
long begin; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
118 |
long end; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
119 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
120 |
/* first stage (lossless partitioning) */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
121 |
int grouping; /* group n vectors per partition */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
122 |
char partitions; /* possible codebooks for a partition */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
123 |
unsigned char groupbook; /* huffbook for partitioning */ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
124 |
char stages; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
125 |
} vorbis_info_residue; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
126 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
127 |
extern void res_clear_info(vorbis_info_residue *info); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
128 |
extern int res_unpack(vorbis_info_residue *info, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
129 |
vorbis_info *vi,oggpack_buffer *opb); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
130 |
extern int res_inverse(vorbis_dsp_state *,vorbis_info_residue *info, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
131 |
ogg_int32_t **in,int *nonzero,int ch); |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
132 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
133 |
/* mode ************************************************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
134 |
typedef struct { |
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
135 |
unsigned char blockflag; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
136 |
unsigned char mapping; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
137 |
} vorbis_info_mode; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
138 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
139 |
/* Mapping backend generic *****************************************/ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
140 |
typedef struct coupling_step{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
141 |
unsigned char mag; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
142 |
unsigned char ang; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
143 |
} coupling_step; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
144 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
145 |
typedef struct submap{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
146 |
char floor; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
147 |
char residue; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
148 |
} submap; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
149 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
150 |
typedef struct vorbis_info_mapping{ |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
151 |
int submaps; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
152 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
153 |
unsigned char *chmuxlist; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
154 |
submap *submaplist; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
155 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
156 |
int coupling_steps; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
157 |
coupling_step *coupling; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
158 |
} vorbis_info_mapping; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
159 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
160 |
extern int mapping_info_unpack(vorbis_info_mapping *,vorbis_info *, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
161 |
oggpack_buffer *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
162 |
extern void mapping_clear_info(vorbis_info_mapping *); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
163 |
extern int mapping_inverse(struct vorbis_dsp_state *,vorbis_info_mapping *); |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
164 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
165 |
/* codec_setup_info contains all the setup information specific to the |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
166 |
specific compression/decompression mode in progress (eg, |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
167 |
psychoacoustic settings, channel setup, options, codebook |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
168 |
etc). |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
169 |
*********************************************************************/ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
170 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
171 |
typedef struct codec_setup_info { |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
172 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
173 |
/* Vorbis supports only short and long blocks, but allows the |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
174 |
encoder to choose the sizes */ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
175 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
176 |
long blocksizes[2]; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
177 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
178 |
/* modes are the primary means of supporting on-the-fly different |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
179 |
blocksizes, different channel mappings (LR or M/A), |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
180 |
different residue backends, etc. Each mode consists of a |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
181 |
blocksize flag and a mapping (along with the mapping setup */ |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
182 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
183 |
int modes; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
184 |
int maps; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
185 |
int floors; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
186 |
int residues; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
187 |
int books; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
188 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
189 |
vorbis_info_mode *mode_param; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
190 |
vorbis_info_mapping *map_param; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
191 |
char *floor_type; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
192 |
vorbis_info_floor **floor_param; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
193 |
vorbis_info_residue *residue_param; |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
194 |
codebook *book_param; |
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
195 |
|
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
196 |
} codec_setup_info; |
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
197 |
|
7697
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
198 |
extern vorbis_dsp_state *vorbis_dsp_create(vorbis_info *vi); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
199 |
extern void vorbis_dsp_destroy(vorbis_dsp_state *v); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
200 |
extern int vorbis_dsp_headerin(vorbis_info *vi,vorbis_comment *vc, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
201 |
ogg_packet *op); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
202 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
203 |
extern int vorbis_dsp_restart(vorbis_dsp_state *v); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
204 |
extern int vorbis_dsp_synthesis(vorbis_dsp_state *vd, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
205 |
ogg_packet *op,int decodep); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
206 |
extern int vorbis_dsp_pcmout(vorbis_dsp_state *v, |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
207 |
ogg_int16_t *pcm,int samples); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
208 |
extern int vorbis_dsp_read(vorbis_dsp_state *v,int samples); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
209 |
extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); |
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
210 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
211 |
|
767d3c4153a1
switch the Tremor implementation from the Cocos2D one to the lowmem-no-byte branch and let's see what happens
koda
parents:
6045
diff
changeset
|
212 |
|
5170
f7e49eff3708
add libTremor sources (integer-only libvorbis implementation) to repo and ios project
koda
parents:
diff
changeset
|
213 |
#endif |