doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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-2002 *
9  * by the XIPHOPHORUS Company http://www.xiph.org/ *
10  * *
11  ********************************************************************
12 
13  function: libvorbis codec headers
14  last mod: $Id: codec_internal.h,v 1.17 2003/08/18 05:34:01 xiphmont Exp $
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 
38 
39 typedef void vorbis_look_floor;
40 typedef void vorbis_look_residue;
41 typedef void vorbis_look_transform;
42 
43 /* mode ************************************************************/
44 typedef struct {
45  int blockflag;
48  int mapping;
50 
51 typedef void vorbis_info_floor;
52 typedef void vorbis_info_residue;
53 typedef void vorbis_info_mapping;
54 
55 #include "psy.h"
56 #include "bitrate.h"
57 
58 typedef struct private_state {
59  /* local lookup storage */
60  envelope_lookup *ve; /* envelope lookup */
61  int window[2];
62  vorbis_look_transform **transform[2]; /* block, type */
64 
65  int modebits;
70 
71  /* local storage, only used on the encoding side. This way the
72  application does not need to worry about freeing some packets'
73  memory and not others'; packet storage is always tracked.
74  Cleared next call to a _dsp_ function */
75  unsigned char *header;
76  unsigned char *header1;
77  unsigned char *header2;
78 
80 
83 
84 /* codec_setup_info contains all the setup information specific to the
85  specific compression/decompression mode in progress (eg,
86  psychoacoustic settings, channel setup, options, codebook
87  etc).
88 *********************************************************************/
89 
90 #include "highlevel.h"
91 typedef struct codec_setup_info {
92 
93  /* Vorbis supports only short and long blocks, but allows the
94  encoder to choose the sizes */
95 
96  long blocksizes[2];
97 
98  /* modes are the primary means of supporting on-the-fly different
99  blocksizes, different channel mappings (LR or M/A),
100  different residue backends, etc. Each mode consists of a
101  blocksize flag and a mapping (along with the mapping setup */
102 
103  int modes;
104  int maps;
105  int floors;
106  int residues;
107  int books;
108  int psys; /* encode only */
109 
111  int map_type[64];
113  int floor_type[64];
115  int residue_type[64];
119 
120  vorbis_info_psy *psy_param[4]; /* encode only */
122 
124  highlevel_encode_setup hi; /* used only by vorbisenc.c. It's a
125  highly redundant structure, but
126  improves clarity of program flow. */
127  int halfrate_flag; /* painless downsample for decode */
129 
131 extern void _vp_global_free(vorbis_look_psy_global *look);
132 
133 #endif
134 
vorbis_info_residue * residue_param[64]
#define PACKETBLOBS
vorbis_look_psy_global * psy_g_look
u_int32_t ogg_uint32_t
Definition: os_types.h:139
vorbis_info_floor * floor_param[64]
static_codebook * book_param[256]
void vorbis_info_floor
unsigned char * header
vorbis_look_psy * psy
ogg_int64_t sample_count
drft_lookup fft_look[2]
struct codec_setup_info codec_setup_info
vorbis_info_mode * mode_param[64]
vorbis_look_psy_global * _vp_global_look(vorbis_info *vi)
Definition: psy.c:35
vorbis_look_floor ** flr
void vorbis_look_residue
ogg_uint32_t packetblob_markers[PACKETBLOBS]
vorbis_info_psy_global psy_g_param
unsigned char * header2
bitrate_manager_state bms
void vorbis_look_floor
highlevel_encode_setup hi
struct vorbis_block_internal vorbis_block_internal
vorbis_look_residue ** residue
envelope_lookup * ve
void vorbis_info_residue
void vorbis_look_transform
codebook * fullbooks
vorbis_info_psy * psy_param[4]
GLuint GLenum GLenum transform
Definition: glext.h:5179
void vorbis_info_mapping
unsigned char * header1
void _vp_global_free(vorbis_look_psy_global *look)
Definition: psy.c:47
int64_t ogg_int64_t
Definition: os_types.h:140
struct private_state private_state
bitrate_manager_info bi
vorbis_info_mapping * map_param[64]