annotate tremor/codec_internal.h @ 31511:13ca93203358

Factorize MPlayer/MEncoder version string handling. The string now resides in a central object file instead of being duplicated in every file that requires a version string.
author diego
date Mon, 28 Jun 2010 08:26:14 +0000
parents e83eef58b30a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
1 /********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
2 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
3 * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
4 * *
19251
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
5 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
6 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
7 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
cd6b211be811 Replace tremor files that had old headers saying "ALL REDISTRIBUTION
uau
parents: 14280
diff changeset
8 * *
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
9 * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
10 * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
11 * *
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
12 ********************************************************************
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
13
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
14 function: libvorbis codec headers
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
15
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
16 ********************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
17
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
18 #ifndef _V_CODECI_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
19 #define _V_CODECI_H_
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
20
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
21 #include "codebook.h"
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
22
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
23 typedef void vorbis_look_mapping;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
24 typedef void vorbis_look_floor;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
25 typedef void vorbis_look_residue;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
26 typedef void vorbis_look_transform;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
27
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
28 /* mode ************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
29 typedef struct {
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
30 int blockflag;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
31 int windowtype;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
32 int transformtype;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
33 int mapping;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
34 } vorbis_info_mode;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
35
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
36 typedef void vorbis_info_floor;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
37 typedef void vorbis_info_residue;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
38 typedef void vorbis_info_mapping;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
39
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
40 typedef struct backend_lookup_state {
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
41 /* local lookup storage */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
42 ogg_int32_t *window[2];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
43
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
44 /* backend lookups are tied to the mode, not the backend or naked mapping */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
45 int modebits;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
46 vorbis_look_mapping **mode;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
47
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
48 } backend_lookup_state;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
49
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
50 /* codec_setup_info contains all the setup information specific to the
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
51 specific compression/decompression mode in progress (eg,
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
52 psychoacoustic settings, channel setup, options, codebook
29264
e83eef58b30a Remove all kind of trailing whitespaces from all MPlayer's files.
bircoph
parents: 19251
diff changeset
53 etc).
14280
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
54 *********************************************************************/
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
55
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
56 typedef struct codec_setup_info {
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
57
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
58 /* Vorbis supports only short and long blocks, but allows the
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
59 encoder to choose the sizes */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
60
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
61 long blocksizes[2];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
62
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
63 /* modes are the primary means of supporting on-the-fly different
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
64 blocksizes, different channel mappings (LR or M/A),
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
65 different residue backends, etc. Each mode consists of a
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
66 blocksize flag and a mapping (along with the mapping setup */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
67
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
68 int modes;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
69 int maps;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
70 int times;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
71 int floors;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
72 int residues;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
73 int books;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
74
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
75 vorbis_info_mode *mode_param[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
76 int map_type[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
77 vorbis_info_mapping *map_param[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
78 int time_type[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
79 int floor_type[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
80 vorbis_info_floor *floor_param[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
81 int residue_type[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
82 vorbis_info_residue *residue_param[64];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
83 static_codebook *book_param[256];
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
84 codebook *fullbooks;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
85
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
86 int passlimit[32]; /* iteration limit per couple/quant pass */
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
87 int coupling_passes;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
88 } codec_setup_info;
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
89
8631a3803289 internal Tremor decoder for Ogg/Vorbis
henry
parents:
diff changeset
90 #endif