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.3 2000/11/17 11:47:18 xiphmont Exp $
17 ********************************************************************/
25 #include "bitbuffer.h"
27 typedef void vorbis_look_time;
28 typedef void vorbis_look_mapping;
29 typedef void vorbis_look_floor;
30 typedef void vorbis_look_residue;
31 typedef void vorbis_look_transform;
33 typedef struct backend_lookup_state {
34 /* local lookup storage */
35 envelope_lookup *ve; /* envelope lookup */
36 float **window[2][2][2]; /* block, leadin, leadout, type */
37 vorbis_look_transform **transform[2]; /* block, type */
40 /* backend lookups are tied to the mode, not the backend or naked mapping */
42 vorbis_look_mapping **mode;
44 /* local storage, only used on the encoding side. This way the
45 application does not need to worry about freeing some packets'
46 memory and not others'; packet storage is always tracked.
47 Cleared next call to a _dsp_ function */
48 unsigned char *header;
49 unsigned char *header1;
50 unsigned char *header2;
52 } backend_lookup_state;
54 /* mode ************************************************************/
62 typedef void vorbis_info_time;
63 typedef void vorbis_info_floor;
64 typedef void vorbis_info_residue;
65 typedef void vorbis_info_mapping;
67 /* vorbis_info contains all the setup information specific to the
68 specific compression/decompression mode in progress (eg,
69 psychoacoustic settings, channel setup, options, codebook
71 *********************************************************************/
73 typedef struct codec_setup_info {
75 /* Vorbis supports only short and long blocks, but allows the
76 encoder to choose the sizes */
80 /* modes are the primary means of supporting on-the-fly different
81 blocksizes, different channel mappings (LR or mid-side),
82 different residue backends, etc. Each mode consists of a
83 blocksize flag and a mapping (along with the mapping setup */
91 int psys; /* encode only */
93 vorbis_info_mode *mode_param[64];
95 vorbis_info_mapping *map_param[64];
97 vorbis_info_time *time_param[64];
99 vorbis_info_floor *floor_param[64];
100 int residue_type[64];
101 vorbis_info_residue *residue_param[64];
102 static_codebook *book_param[256];
103 vorbis_info_psy *psy_param[64]; /* encode only */
105 /* for block long/sort tuning; encode only */
107 float preecho_thresh;
109 float preecho_minenergy;