1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/libtremor/lib/codec_internal.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,92 @@ 1.4 +/******************************************************************** 1.5 + * * 1.6 + * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. * 1.7 + * * 1.8 + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * 1.9 + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * 1.10 + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * 1.11 + * * 1.12 + * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 * 1.13 + * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ * 1.14 + * * 1.15 + ******************************************************************** 1.16 + 1.17 + function: libvorbis codec headers 1.18 + 1.19 + ********************************************************************/ 1.20 + 1.21 +#ifndef _V_CODECI_H_ 1.22 +#define _V_CODECI_H_ 1.23 + 1.24 +#include "codebook.h" 1.25 + 1.26 +typedef void vorbis_look_mapping; 1.27 +typedef void vorbis_look_floor; 1.28 +typedef void vorbis_look_residue; 1.29 +typedef void vorbis_look_transform; 1.30 + 1.31 +/* mode ************************************************************/ 1.32 +typedef struct { 1.33 + int blockflag; 1.34 + int windowtype; 1.35 + int transformtype; 1.36 + int mapping; 1.37 +} vorbis_info_mode; 1.38 + 1.39 +typedef void vorbis_info_floor; 1.40 +typedef void vorbis_info_residue; 1.41 +typedef void vorbis_info_mapping; 1.42 + 1.43 +typedef struct private_state { 1.44 + /* local lookup storage */ 1.45 + const void *window[2]; 1.46 + 1.47 + /* backend lookups are tied to the mode, not the backend or naked mapping */ 1.48 + int modebits; 1.49 + vorbis_look_mapping **mode; 1.50 + 1.51 + ogg_int64_t sample_count; 1.52 + 1.53 +} private_state; 1.54 + 1.55 +/* codec_setup_info contains all the setup information specific to the 1.56 + specific compression/decompression mode in progress (eg, 1.57 + psychoacoustic settings, channel setup, options, codebook 1.58 + etc). 1.59 +*********************************************************************/ 1.60 + 1.61 +typedef struct codec_setup_info { 1.62 + 1.63 + /* Vorbis supports only short and long blocks, but allows the 1.64 + encoder to choose the sizes */ 1.65 + 1.66 + long blocksizes[2]; 1.67 + 1.68 + /* modes are the primary means of supporting on-the-fly different 1.69 + blocksizes, different channel mappings (LR or M/A), 1.70 + different residue backends, etc. Each mode consists of a 1.71 + blocksize flag and a mapping (along with the mapping setup */ 1.72 + 1.73 + int modes; 1.74 + int maps; 1.75 + int times; 1.76 + int floors; 1.77 + int residues; 1.78 + int books; 1.79 + 1.80 + vorbis_info_mode *mode_param[64]; 1.81 + int map_type[64]; 1.82 + vorbis_info_mapping *map_param[64]; 1.83 + int time_type[64]; 1.84 + int floor_type[64]; 1.85 + vorbis_info_floor *floor_param[64]; 1.86 + int residue_type[64]; 1.87 + vorbis_info_residue *residue_param[64]; 1.88 + static_codebook *book_param[256]; 1.89 + codebook *fullbooks; 1.90 + 1.91 + int passlimit[32]; /* iteration limit per couple/quant pass */ 1.92 + int coupling_passes; 1.93 +} codec_setup_info; 1.94 + 1.95 +#endif