1 /********************************************************************
3 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
4 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
5 * THE GNU LESSER/LIBRARY PUBLIC LICENSE, WHICH IS INCLUDED WITH *
6 * THIS SOURCE. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
8 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
9 * by Monty <monty@xiph.org> and the XIPHOPHORUS Company *
10 * http://www.xiph.org/ *
12 ********************************************************************
14 function: libvorbis codec headers
15 last mod: $Id: codec_internal.h,v 1.2 2000/11/06 00:07:00 xiphmont Exp $
17 ********************************************************************/
26 typedef void vorbis_look_time;
27 typedef void vorbis_look_mapping;
28 typedef void vorbis_look_floor;
29 typedef void vorbis_look_residue;
30 typedef void vorbis_look_transform;
32 typedef struct backend_lookup_state {
33 /* local lookup storage */
34 envelope_lookup *ve; /* envelope lookup */
35 float **window[2][2][2]; /* block, leadin, leadout, type */
36 vorbis_look_transform **transform[2]; /* block, type */
39 /* backend lookups are tied to the mode, not the backend or naked mapping */
41 vorbis_look_mapping **mode;
43 /* local storage, only used on the encoding side. This way the
44 application does not need to worry about freeing some packets'
45 memory and not others'; packet storage is always tracked.
46 Cleared next call to a _dsp_ function */
47 unsigned char *header;
48 unsigned char *header1;
49 unsigned char *header2;
51 } backend_lookup_state;
53 /* mode ************************************************************/
61 typedef void vorbis_info_time;
62 typedef void vorbis_info_floor;
63 typedef void vorbis_info_residue;
64 typedef void vorbis_info_mapping;
66 /* vorbis_info contains all the setup information specific to the
67 specific compression/decompression mode in progress (eg,
68 psychoacoustic settings, channel setup, options, codebook
70 *********************************************************************/
72 typedef struct codec_setup_info {
74 /* Vorbis supports only short and long blocks, but allows the
75 encoder to choose the sizes */
79 /* modes are the primary means of supporting on-the-fly different
80 blocksizes, different channel mappings (LR or mid-side),
81 different residue backends, etc. Each mode consists of a
82 blocksize flag and a mapping (along with the mapping setup */
90 int psys; /* encode only */
92 vorbis_info_mode *mode_param[64];
94 vorbis_info_mapping *map_param[64];
96 vorbis_info_time *time_param[64];
98 vorbis_info_floor *floor_param[64];
100 vorbis_info_residue *residue_param[64];
101 static_codebook *book_param[256];
102 vorbis_info_psy *psy_param[64]; /* encode only */
104 /* for block long/sort tuning; encode only */
106 float preecho_thresh;
108 float preecho_minenergy;