/media/libtremor/lib/codec_internal.h

http://github.com/zpao/v8monkey · C Header · 92 lines · 44 code · 18 blank · 30 comment · 0 complexity · a887ce7bd3c40a419519b8de376cb9f5 MD5 · raw file

  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis 'TREMOR' CODEC SOURCE CODE. *
  4. * *
  5. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  6. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  7. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  8. * *
  9. * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
  10. * BY THE Xiph.Org FOUNDATION http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: libvorbis codec headers
  14. ********************************************************************/
  15. #ifndef _V_CODECI_H_
  16. #define _V_CODECI_H_
  17. #include "codebook.h"
  18. typedef void vorbis_look_mapping;
  19. typedef void vorbis_look_floor;
  20. typedef void vorbis_look_residue;
  21. typedef void vorbis_look_transform;
  22. /* mode ************************************************************/
  23. typedef struct {
  24. int blockflag;
  25. int windowtype;
  26. int transformtype;
  27. int mapping;
  28. } vorbis_info_mode;
  29. typedef void vorbis_info_floor;
  30. typedef void vorbis_info_residue;
  31. typedef void vorbis_info_mapping;
  32. typedef struct private_state {
  33. /* local lookup storage */
  34. const void *window[2];
  35. /* backend lookups are tied to the mode, not the backend or naked mapping */
  36. int modebits;
  37. vorbis_look_mapping **mode;
  38. ogg_int64_t sample_count;
  39. } private_state;
  40. /* codec_setup_info contains all the setup information specific to the
  41. specific compression/decompression mode in progress (eg,
  42. psychoacoustic settings, channel setup, options, codebook
  43. etc).
  44. *********************************************************************/
  45. typedef struct codec_setup_info {
  46. /* Vorbis supports only short and long blocks, but allows the
  47. encoder to choose the sizes */
  48. long blocksizes[2];
  49. /* modes are the primary means of supporting on-the-fly different
  50. blocksizes, different channel mappings (LR or M/A),
  51. different residue backends, etc. Each mode consists of a
  52. blocksize flag and a mapping (along with the mapping setup */
  53. int modes;
  54. int maps;
  55. int times;
  56. int floors;
  57. int residues;
  58. int books;
  59. vorbis_info_mode *mode_param[64];
  60. int map_type[64];
  61. vorbis_info_mapping *map_param[64];
  62. int time_type[64];
  63. int floor_type[64];
  64. vorbis_info_floor *floor_param[64];
  65. int residue_type[64];
  66. vorbis_info_residue *residue_param[64];
  67. static_codebook *book_param[256];
  68. codebook *fullbooks;
  69. int passlimit[32]; /* iteration limit per couple/quant pass */
  70. int coupling_passes;
  71. } codec_setup_info;
  72. #endif