zenilib: zenilib/jni/external/libvorbis/lib/codec_internal.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
codec_internal.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 http://www.xiph.org/ *
10 * *
11 ********************************************************************
12
13 function: libvorbis codec headers
14 last mod: $Id: codec_internal.h 16227 2009-07-08 06:58:46Z xiphmont $
15
16 ********************************************************************/
17
18 #ifndef _V_CODECI_H_
19 #define _V_CODECI_H_
20
21 #include "envelope.h"
22 #include "codebook.h"
23
24 #define BLOCKTYPE_IMPULSE 0
25 #define BLOCKTYPE_PADDING 1
26 #define BLOCKTYPE_TRANSITION 0
27 #define BLOCKTYPE_LONG 1
28
29 #define PACKETBLOBS 15
30
31 typedef struct vorbis_block_internal{
32 float **pcmdelay; /* this is a pointer into local storage */
33 float ampmax;
34 int blocktype;
35
36 oggpack_buffer *packetblob[PACKETBLOBS]; /* initialized, must be freed;
37 blob [PACKETBLOBS/2] points to
38 the oggpack_buffer in the
39 main vorbis_block */
40 } vorbis_block_internal;
41
42 typedef void vorbis_look_floor;
43 typedef void vorbis_look_residue;
44 typedef void vorbis_look_transform;
45
46 /* mode ************************************************************/
47 typedef struct {
48 int blockflag;
49 int windowtype;
50 int transformtype;
51 int mapping;
52 } vorbis_info_mode;
53
54 typedef void vorbis_info_floor;
55 typedef void vorbis_info_residue;
56 typedef void vorbis_info_mapping;
57
58 #include "psy.h"
59 #include "bitrate.h"
60
61 typedef struct private_state {
62 /* local lookup storage */
63 envelope_lookup *ve; /* envelope lookup */
64 int window[2];
65 vorbis_look_transform **transform[2]; /* block, type */
66 drft_lookup fft_look[2];
67
68 int modebits;
69 vorbis_look_floor **flr;
70 vorbis_look_residue **residue;
71 vorbis_look_psy *psy;
72 vorbis_look_psy_global *psy_g_look;
73
74 /* local storage, only used on the encoding side. This way the
75 application does not need to worry about freeing some packets'
76 memory and not others'; packet storage is always tracked.
77 Cleared next call to a _dsp_ function */
78 unsigned char *header;
79 unsigned char *header1;
80 unsigned char *header2;
81
82 bitrate_manager_state bms;
83
84 ogg_int64_t sample_count;
85 } private_state;
86
87 /* codec_setup_info contains all the setup information specific to the
88 specific compression/decompression mode in progress (eg,
89 psychoacoustic settings, channel setup, options, codebook
90 etc).
91 *********************************************************************/
92
93 #include "highlevel.h"
94 typedef struct codec_setup_info {
95
96 /* Vorbis supports only short and long blocks, but allows the
97 encoder to choose the sizes */
98
99 long blocksizes[2];
100
101 /* modes are the primary means of supporting on-the-fly different
102 blocksizes, different channel mappings (LR or M/A),
103 different residue backends, etc. Each mode consists of a
104 blocksize flag and a mapping (along with the mapping setup */
105
106 int modes;
107 int maps;
108 int floors;
109 int residues;
110 int books;
111 int psys; /* encode only */
112
113 vorbis_info_mode *mode_param[64];
114 int map_type[64];
115 vorbis_info_mapping *map_param[64];
116 int floor_type[64];
117 vorbis_info_floor *floor_param[64];
118 int residue_type[64];
119 vorbis_info_residue *residue_param[64];
120 static_codebook *book_param[256];
121 codebook *fullbooks;
122
123 vorbis_info_psy *psy_param[4]; /* encode only */
124 vorbis_info_psy_global psy_g_param;
125
126 bitrate_manager_info bi;
127 highlevel_encode_setup hi; /* used only by vorbisenc.c. It's a
128 highly redundant structure, but
129 improves clarity of program flow. */
130 int halfrate_flag; /* painless downsample for decode */
131 } codec_setup_info;
132
133 extern vorbis_look_psy_global *_vp_global_look(vorbis_info *vi);
134 extern void _vp_global_free(vorbis_look_psy_global *look);
135
136
137
138 typedef struct {
139 int sorted_index[VIF_POSIT+2];
140 int forward_index[VIF_POSIT+2];
141 int reverse_index[VIF_POSIT+2];
142
143 int hineighbor[VIF_POSIT];
144 int loneighbor[VIF_POSIT];
145 int posts;
146
147 int n;
148 int quant_q;
149 vorbis_info_floor1 *vi;
150
151 long phrasebits;
152 long postbits;
153 long frames;
154 } vorbis_look_floor1;
155
156
157
158 extern int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
159 const float *logmdct, /* in */
160 const float *logmask);
161 extern int *floor1_interpolate_fit(vorbis_block *vb,vorbis_look_floor1 *look,
162 int *A,int *B,
163 int del);
164 extern int floor1_encode(oggpack_buffer *opb,vorbis_block *vb,
165 vorbis_look_floor1 *look,
166 int *post,int *ilogmask);
167 #endif
vorbis_info_mode
Definition: codec_internal.h:47
vorbis_info_mode::blockflag
int blockflag
Definition: codec_internal.h:48
bitrate_manager_state
Definition: bitrate.h:26
VIF_POSIT
#define VIF_POSIT
Definition: backends.h:58
highlevel.h
codec_setup_info::residue_param
vorbis_info_residue * residue_param[64]
Definition: codec_internal.h:119
PACKETBLOBS
#define PACKETBLOBS
Definition: codec_internal.h:29
vorbis_info_psy
Definition: psy.h:36
private_state::psy_g_look
vorbis_look_psy_global * psy_g_look
Definition: codec_internal.h:72
vorbis_look_floor1
Definition: codec_internal.h:138
static_codebook
Definition: codebook.h:36
codec_setup_info::floor_param
vorbis_info_floor * floor_param[64]
Definition: codec_internal.h:117
codec_setup_info::book_param
static_codebook * book_param[256]
Definition: codec_internal.h:120
vorbis_info_floor
void vorbis_info_floor
Definition: codec_internal.h:54
private_state::header
unsigned char * header
Definition: codec_internal.h:78
codebook.h
codec_setup_info::books
int books
Definition: codec_internal.h:110
private_state::modebits
int modebits
Definition: codec_internal.h:68
vorbis_info_mode::transformtype
int transformtype
Definition: codec_internal.h:50
private_state::window
int window[2]
Definition: codec_internal.h:64
bitrate.h
highlevel_encode_setup
Definition: highlevel.h:25
private_state::psy
vorbis_look_psy * psy
Definition: codec_internal.h:71
vorbis_look_psy
Definition: psy.h:95
private_state::sample_count
ogg_int64_t sample_count
Definition: codec_internal.h:84
vorbis_look_psy_global
Definition: psy.h:86
private_state::fft_look
drft_lookup fft_look[2]
Definition: codec_internal.h:66
vorbis_block_internal::ampmax
float ampmax
Definition: codec_internal.h:33
codec_setup_info
struct codec_setup_info codec_setup_info
vorbis_look_floor1::postbits
long postbits
Definition: codec_internal.h:152
codec_setup_info::mode_param
vorbis_info_mode * mode_param[64]
Definition: codec_internal.h:113
_vp_global_look
vorbis_look_psy_global * _vp_global_look(vorbis_info *vi)
Definition: psy.c:36
private_state::flr
vorbis_look_floor ** flr
Definition: codec_internal.h:69
vorbis_look_residue
void vorbis_look_residue
Definition: codec_internal.h:43
vorbis_info_floor1
Definition: backends.h:61
vorbis_look_floor1::quant_q
int quant_q
Definition: codec_internal.h:148
codec_setup_info::psy_g_param
vorbis_info_psy_global psy_g_param
Definition: codec_internal.h:124
vorbis_block_internal::blocktype
int blocktype
Definition: codec_internal.h:34
private_state::header2
unsigned char * header2
Definition: codec_internal.h:80
codec_setup_info::residue_type
int residue_type[64]
Definition: codec_internal.h:118
private_state::bms
bitrate_manager_state bms
Definition: codec_internal.h:82
vorbis_look_floor
void vorbis_look_floor
Definition: codec_internal.h:42
codec_setup_info::hi
highlevel_encode_setup hi
Definition: codec_internal.h:127
codec_setup_info::psys
int psys
Definition: codec_internal.h:111
vorbis_block_internal
struct vorbis_block_internal vorbis_block_internal
codec_setup_info::blocksizes
long blocksizes[2]
Definition: codec_internal.h:99
bitrate_manager_info
Definition: bitrate.h:42
vorbis_info_mode::windowtype
int windowtype
Definition: codec_internal.h:49
vorbis_block_internal::packetblob
oggpack_buffer * packetblob[PACKETBLOBS]
Definition: codec_internal.h:36
codec_setup_info::modes
int modes
Definition: codec_internal.h:106
codec_setup_info::map_type
int map_type[64]
Definition: codec_internal.h:114
vorbis_block_internal
Definition: codec_internal.h:31
envelope.h
codebook
Definition: codebook.h:58
codec_setup_info::maps
int maps
Definition: codec_internal.h:107
oggpack_buffer
Definition: ogg.h:32
vorbis_info_psy_global
Definition: psy.h:66
psy.h
vorbis_block
Definition: codec.h:88
envelope_lookup
Definition: envelope.h:52
vorbis_look_floor1::posts
int posts
Definition: codec_internal.h:145
codec_setup_info::halfrate_flag
int halfrate_flag
Definition: codec_internal.h:130
floor1_interpolate_fit
int * floor1_interpolate_fit(vorbis_block *vb, vorbis_look_floor1 *look, int *A, int *B, int del)
Definition: floor1.c:746
vi
XVisualInfo * vi
Definition: glewinfo_tail.c:221
private_state::residue
vorbis_look_residue ** residue
Definition: codec_internal.h:70
private_state::ve
envelope_lookup * ve
Definition: codec_internal.h:63
vorbis_block_internal::pcmdelay
float ** pcmdelay
Definition: codec_internal.h:32
vorbis_info_residue
void vorbis_info_residue
Definition: codec_internal.h:55
transform
GLuint GLenum GLenum transform
Definition: glew.h:13408
codec_setup_info
Definition: codec_internal.h:94
vorbis_look_transform
void vorbis_look_transform
Definition: codec_internal.h:44
codec_setup_info::fullbooks
codebook * fullbooks
Definition: codec_internal.h:121
codec_setup_info::floor_type
int floor_type[64]
Definition: codec_internal.h:116
codec_setup_info::psy_param
vorbis_info_psy * psy_param[4]
Definition: codec_internal.h:123
vorbis_info_mapping
void vorbis_info_mapping
Definition: codec_internal.h:56
private_state::header1
unsigned char * header1
Definition: codec_internal.h:79
_vp_global_free
void _vp_global_free(vorbis_look_psy_global *look)
Definition: psy.c:48
drft_lookup
Definition: smallft.h:23
private_state
Definition: codec_internal.h:61
private_state
struct private_state private_state
vorbis_info_mode::mapping
int mapping
Definition: codec_internal.h:51
floor1_fit
int * floor1_fit(vorbis_block *vb, vorbis_look_floor1 *look, const float *logmdct, const float *logmask)
Definition: floor1.c:591
vorbis_look_floor1::phrasebits
long phrasebits
Definition: codec_internal.h:151
vorbis_look_floor1::frames
long frames
Definition: codec_internal.h:153
ogg_int64_t
long ogg_int64_t
Definition: config_types.h:23
codec_setup_info::bi
bitrate_manager_info bi
Definition: codec_internal.h:126
codec_setup_info::residues
int residues
Definition: codec_internal.h:109
vorbis_info
Definition: codec.h:28
codec_setup_info::floors
int floors
Definition: codec_internal.h:108
vorbis_look_floor1::n
int n
Definition: codec_internal.h:147
floor1_encode
int floor1_encode(oggpack_buffer *opb, vorbis_block *vb, vorbis_look_floor1 *look, int *post, int *ilogmask)
Definition: floor1.c:768
vorbis_look_floor1::vi
vorbis_info_floor1 * vi
Definition: codec_internal.h:149
codec_setup_info::map_param
vorbis_info_mapping * map_param[64]
Definition: codec_internal.h:115