mode_A.h 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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_A.h,v 1.1.2.3 2000/11/04 06:22:08 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_MODES_A_H_
  17. #define _V_MODES_A_H_
  18. #include <stdio.h>
  19. #include "vorbis/codec.h"
  20. #include "backends.h"
  21. #include "books/lsp12_0.vqh"
  22. #include "books/lsp30_0.vqh"
  23. #include "books/resaux0_128a_128.vqh"
  24. #include "books/resaux0_1024a_128.vqh"
  25. #include "books/res0_128a_128_1.vqh"
  26. #include "books/res0_128a_128_2.vqh"
  27. #include "books/res0_128a_128_3.vqh"
  28. #include "books/res0_128a_128_4.vqh"
  29. #include "books/res0_128a_128_5.vqh"
  30. #include "books/res0_1024a_128_1.vqh"
  31. #include "books/res0_1024a_128_2.vqh"
  32. #include "books/res0_1024a_128_3.vqh"
  33. #include "books/res0_1024a_128_4.vqh"
  34. #include "books/res0_1024a_128_5.vqh"
  35. #include "books/res0_1024a_128_6.vqh"
  36. #include "books/res0_1024a_128_7.vqh"
  37. #include "books/res0_1024a_128_8.vqh"
  38. #include "books/res0_1024a_128_9.vqh"
  39. static vorbis_info_psy _psy_set_A={
  40. 1,/*athp*/
  41. 1,/*decayp*/
  42. 1,/*smoothp*/
  43. 0,.1,
  44. -100.,
  45. -140.,
  46. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
  47. /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
  48. /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
  49. 1,/* tonemaskp */
  50. /* 0 10 20 30 40 50 60 70 80 90 100 */
  51. {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
  52. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
  53. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
  54. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
  55. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
  56. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
  57. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
  58. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
  59. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
  60. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
  61. {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
  62. {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
  63. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
  64. {-30.,-30.,-35.,-37.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
  65. {-20.,-25.,-30.,-35.,-35.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
  66. {-20.,-25.,-30.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
  67. {-20.,-24.,-26.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
  68. },
  69. 1,/* peakattp */
  70. {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
  71. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
  72. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
  73. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  74. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  75. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  76. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  77. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  78. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  79. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  80. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  81. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  82. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  83. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  84. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-16.,-17.}, /*8000*/
  85. { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
  86. { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
  87. },
  88. 1,/*noisemaskp */
  89. /* 0 10 20 30 40 50 60 70 80 90 100 */
  90. {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
  91. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
  92. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
  93. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
  94. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
  95. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
  96. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
  97. { 6., 6., 6., 2., 2., 2., 2., 2., 2., 1., 0.}, /*700*/
  98. { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1000*/
  99. { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*1400*/
  100. { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2000*/
  101. { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*2800*/
  102. { 6., 6., 6., 5., 5., 5., 5., 5., 5., 4., 3.}, /*4000*/
  103. { 10., 10., 10., 10., 10., 10., 8., 8., 6., 6., 6.}, /*5600*/
  104. { 10., 10., 10., 10., 10., 10., 8., 8., 8., 8., 8.}, /*8000*/
  105. { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*11500*/
  106. { 10., 10., 10., 10., 10., 10., 10., 10., 10., 10., 10.}, /*16000*/
  107. },
  108. 100.,
  109. -0., -.004 /* attack/decay control */
  110. };
  111. /* with GNUisms, this could be short and readable. Oh well */
  112. static vorbis_info_time0 _time_set0A={0};
  113. static vorbis_info_floor0 _floor_set0A={12, 44100, 64, 12,150, 1, {0} };
  114. static vorbis_info_floor0 _floor_set1A={30, 44100, 256, 12,150, 1, {1} };
  115. static vorbis_info_residue0 _residue_set0A={0,128, 32,6,2,
  116. {0,1,1,1,1,1},
  117. {4,5,6,7,8},
  118. {0,99999,9999,9999,9999},
  119. {99,1.5,2.5,3.5,5},
  120. {5,5,5,5,5},
  121. {99,99,99,99,99}};
  122. static vorbis_info_residue0 _residue_set1A={0,1024, 32,10,3,
  123. {0,1,1,1,1,1,1,1,1,1},
  124. {9,10,11,12,13,14,15,16,17},
  125. {0,9,9999,17,9999,
  126. 27,9999,9999,9999},
  127. {99,1.5,1.5,2.5,2.5,3.5,3.5,7,13},
  128. {5,5,5,5,5,5,5,5,5},
  129. {99,99,99,99,99,99,99,99,99}};
  130. static vorbis_info_mapping0 _mapping_set0A={1, {0,0}, {0}, {0}, {0}, {0}};
  131. static vorbis_info_mapping0 _mapping_set1A={1, {0,0}, {0}, {1}, {1}, {0}};
  132. static vorbis_info_mode _mode_set0A={0,0,0,0};
  133. static vorbis_info_mode _mode_set1A={1,0,0,1};
  134. /* CD quality stereo, no channel coupling */
  135. codec_setup_info info_A={
  136. /* smallblock, largeblock */
  137. {256, 2048},
  138. /* modes,maps,times,floors,residues,books,psys */
  139. 2, 2, 1, 2, 2, 18, 1,
  140. /* modes */
  141. {&_mode_set0A,&_mode_set1A},
  142. /* maps */
  143. {0,0},{&_mapping_set0A,&_mapping_set1A},
  144. /* times */
  145. {0,0},{&_time_set0A},
  146. /* floors */
  147. {0,0},{&_floor_set0A,&_floor_set1A},
  148. /* residue */
  149. {0,0},{&_residue_set0A,&_residue_set1A},
  150. /* books */
  151. {&_vq_book_lsp12_0, /* 0 */
  152. &_vq_book_lsp30_0, /* 1 */
  153. &_huff_book_resaux0_128a_128,
  154. &_huff_book_resaux0_1024a_128,
  155. &_vq_book_res0_128a_128_1,
  156. &_vq_book_res0_128a_128_2,
  157. &_vq_book_res0_128a_128_3,
  158. &_vq_book_res0_128a_128_4,
  159. &_vq_book_res0_128a_128_5,
  160. &_vq_book_res0_1024a_128_1,
  161. &_vq_book_res0_1024a_128_2,
  162. &_vq_book_res0_1024a_128_3,
  163. &_vq_book_res0_1024a_128_4,
  164. &_vq_book_res0_1024a_128_5,
  165. &_vq_book_res0_1024a_128_6,
  166. &_vq_book_res0_1024a_128_7,
  167. &_vq_book_res0_1024a_128_8,
  168. &_vq_book_res0_1024a_128_9,
  169. },
  170. /* psy */
  171. {&_psy_set_A},
  172. /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  173. 256, 32, 6, -96.
  174. };
  175. #define PREDEF_INFO_MAX 0
  176. #endif