mode_E.h 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. /********************************************************************
  2. * *
  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. *
  7. * *
  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/ *
  11. * *
  12. ********************************************************************
  13. function: predefined encoding modes
  14. last mod: $Id: mode_E.h,v 1.1.2.3 2000/11/04 06:22:08 xiphmont Exp $
  15. ********************************************************************/
  16. /* this is really a freeform VBR mode. It roughly centers on 350 kbps stereo */
  17. #ifndef _V_MODES_E_H_
  18. #define _V_MODES_E_H_
  19. #include <stdio.h>
  20. #include "vorbis/codec.h"
  21. #include "backends.h"
  22. #include "books/lsp12_0.vqh"
  23. #include "books/lsp30_0.vqh"
  24. #include "books/resaux0_128a_350.vqh"
  25. #include "books/resaux0_1024a_350.vqh"
  26. #include "books/res0_128a_350_1.vqh"
  27. #include "books/res0_128a_350_2.vqh"
  28. #include "books/res0_128a_350_3.vqh"
  29. #include "books/res0_128a_350_4.vqh"
  30. #include "books/res0_128a_350_5.vqh"
  31. #include "books/res0_1024a_350_1.vqh"
  32. #include "books/res0_1024a_350_2.vqh"
  33. #include "books/res0_1024a_350_3.vqh"
  34. #include "books/res0_1024a_350_4.vqh"
  35. #include "books/res0_1024a_350_5.vqh"
  36. static vorbis_info_psy _psy_set_E ={
  37. 1,/*athp*/
  38. 0,/*decayp*/
  39. 1,/*smoothp*/
  40. 0,.1,
  41. -140.,
  42. -180.,
  43. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
  44. /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
  45. /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
  46. 0,/* tonemaskp */
  47. /* 0 10 20 30 40 50 60 70 80 90 100 */
  48. {{0}},
  49. 1,/* peakattp */
  50. {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*63*/
  51. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*88*/
  52. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*125*/
  53. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*175*/
  54. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*250*/
  55. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*350*/
  56. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*500*/
  57. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*700*/
  58. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1000*/
  59. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*1400*/
  60. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2000*/
  61. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*2800*/
  62. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*4000*/
  63. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*5600*/
  64. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*8000*/
  65. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*11500*/
  66. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-24.,-24.}, /*16000*/
  67. },
  68. 0,/*noisemaskp */
  69. /* 0 10 20 30 40 50 60 70 80 90 100 */
  70. {{0}},
  71. 110.,
  72. -0., -.004 /* attack/decay control */
  73. };
  74. /* with GNUisms, this could be short and readable. Oh well */
  75. static vorbis_info_time0 _time_set0_E={0};
  76. static vorbis_info_floor0 _floor_set0_E={12, 44100, 64, 12,150, 1, {0} };
  77. static vorbis_info_floor0 _floor_set1_E={30, 44100, 256, 12,150, 1, {1} };
  78. static vorbis_info_residue0 _residue_set0_E={0,128, 32,6,2,
  79. {0,1,1,1,1,1},
  80. {4,5,6,7,8},
  81. {0,9999,9999,9999,9999},
  82. {99,2.5,7,13.5,27.5},
  83. {5,5,5,5,5},
  84. {99,99,99,99,99}};
  85. static vorbis_info_residue0 _residue_set1_E={0,1024, 32,6,3,
  86. {0,1,1,1,1,1},
  87. {9,10,11,12,13},
  88. {0,9999,9999,9999,9999},
  89. {99,2.5,7,13.5,27.5},
  90. {5,5,5,5,5},
  91. {99,99,99,99,99}};
  92. static vorbis_info_mapping0 _mapping_set0_E={1, {0,0}, {0}, {0}, {0}, {0}};
  93. static vorbis_info_mapping0 _mapping_set1_E={1, {0,0}, {0}, {1}, {1}, {0}};
  94. static vorbis_info_mode _mode_set0_E={0,0,0,0};
  95. static vorbis_info_mode _mode_set1_E={1,0,0,1};
  96. /* CD quality stereo, no channel coupling */
  97. codec_setup_info info_E={
  98. /* smallblock, largeblock */
  99. {256, 2048},
  100. /* modes,maps,times,floors,residues,books,psys */
  101. 2, 2, 1, 2, 2, 14, 1,
  102. /* modes */
  103. {&_mode_set0_E,&_mode_set1_E},
  104. /* maps */
  105. {0,0},{&_mapping_set0_E,&_mapping_set1_E},
  106. /* times */
  107. {0,0},{&_time_set0_E},
  108. /* floors */
  109. {0,0},{&_floor_set0_E,&_floor_set1_E},
  110. /* residue */
  111. {0,0},{&_residue_set0_E,&_residue_set1_E},
  112. /* books */
  113. {&_vq_book_lsp12_0, /* 0 */
  114. &_vq_book_lsp30_0, /* 1 */
  115. &_huff_book_resaux0_128a_350,
  116. &_huff_book_resaux0_1024a_350,
  117. &_vq_book_res0_128a_350_1,
  118. &_vq_book_res0_128a_350_2,
  119. &_vq_book_res0_128a_350_3,
  120. &_vq_book_res0_128a_350_4,
  121. &_vq_book_res0_128a_350_5,
  122. &_vq_book_res0_1024a_350_1,
  123. &_vq_book_res0_1024a_350_2,
  124. &_vq_book_res0_1024a_350_3,
  125. &_vq_book_res0_1024a_350_4,
  126. &_vq_book_res0_1024a_350_5,
  127. },
  128. /* psy */
  129. {&_psy_set_E},
  130. /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  131. 256, 24, 6, -96.
  132. };
  133. #define PREDEF_INFO_MAX 0
  134. #endif