michael@0: /******************************************************************** michael@0: * * michael@0: * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * michael@0: * * michael@0: * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * michael@0: * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * michael@0: * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * michael@0: * * michael@0: * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * michael@0: * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * michael@0: * * michael@0: ******************************************************************** michael@0: michael@0: function: libvorbis codec headers michael@0: michael@0: ********************************************************************/ michael@0: michael@0: #ifndef _V_CODECI_H_ michael@0: #define _V_CODECI_H_ michael@0: michael@0: #include "codebook.h" michael@0: michael@0: typedef void vorbis_look_mapping; michael@0: typedef void vorbis_look_floor; michael@0: typedef void vorbis_look_residue; michael@0: typedef void vorbis_look_transform; michael@0: michael@0: /* mode ************************************************************/ michael@0: typedef struct { michael@0: int blockflag; michael@0: int windowtype; michael@0: int transformtype; michael@0: int mapping; michael@0: } vorbis_info_mode; michael@0: michael@0: typedef void vorbis_info_floor; michael@0: typedef void vorbis_info_residue; michael@0: typedef void vorbis_info_mapping; michael@0: michael@0: typedef struct private_state { michael@0: /* local lookup storage */ michael@0: const void *window[2]; michael@0: michael@0: /* backend lookups are tied to the mode, not the backend or naked mapping */ michael@0: int modebits; michael@0: vorbis_look_mapping **mode; michael@0: michael@0: ogg_int64_t sample_count; michael@0: michael@0: } private_state; michael@0: michael@0: /* codec_setup_info contains all the setup information specific to the michael@0: specific compression/decompression mode in progress (eg, michael@0: psychoacoustic settings, channel setup, options, codebook michael@0: etc). michael@0: *********************************************************************/ michael@0: michael@0: typedef struct codec_setup_info { michael@0: michael@0: /* Vorbis supports only short and long blocks, but allows the michael@0: encoder to choose the sizes */ michael@0: michael@0: long blocksizes[2]; michael@0: michael@0: /* modes are the primary means of supporting on-the-fly different michael@0: blocksizes, different channel mappings (LR or M/A), michael@0: different residue backends, etc. Each mode consists of a michael@0: blocksize flag and a mapping (along with the mapping setup */ michael@0: michael@0: int modes; michael@0: int maps; michael@0: int times; michael@0: int floors; michael@0: int residues; michael@0: int books; michael@0: michael@0: vorbis_info_mode *mode_param[64]; michael@0: int map_type[64]; michael@0: vorbis_info_mapping *map_param[64]; michael@0: int time_type[64]; michael@0: int floor_type[64]; michael@0: vorbis_info_floor *floor_param[64]; michael@0: int residue_type[64]; michael@0: vorbis_info_residue *residue_param[64]; michael@0: static_codebook *book_param[256]; michael@0: codebook *fullbooks; michael@0: michael@0: int passlimit[32]; /* iteration limit per couple/quant pass */ michael@0: int coupling_passes; michael@0: } codec_setup_info; michael@0: michael@0: #endif