mode_C.h 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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_C.h,v 1.1.2.3 2000/11/04 06:22:08 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_MODES_C_H_
  17. #define _V_MODES_C_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_192.vqh"
  24. #include "books/resaux0_1024a_192.vqh"
  25. #include "books/res0_128a_192_1.vqh"
  26. #include "books/res0_128a_192_2.vqh"
  27. #include "books/res0_128a_192_3.vqh"
  28. #include "books/res0_128a_192_4.vqh"
  29. #include "books/res0_128a_192_5.vqh"
  30. #include "books/res0_1024a_192_1.vqh"
  31. #include "books/res0_1024a_192_2.vqh"
  32. #include "books/res0_1024a_192_3.vqh"
  33. #include "books/res0_1024a_192_4.vqh"
  34. #include "books/res0_1024a_192_5.vqh"
  35. static vorbis_info_psy _psy_set_C={
  36. 1,/*athp*/
  37. 0,/*decayp*/
  38. 1,/*smoothp*/
  39. 0,.1,
  40. -100.,
  41. -140.,
  42. /* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */
  43. /* x: 63 88 125 175 250 350 500 700 1k 1.4k 2k 2.8k 4k 5.6k 8k 11.5k 16k Hz */
  44. /* y: 0 10 20 30 40 50 60 70 80 90 100 dB */
  45. 1,/* tonemaskp */
  46. /* 0 10 20 30 40 50 60 70 80 90 100 */
  47. {{-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*63*/
  48. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*88*/
  49. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*125*/
  50. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*175*/
  51. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*250*/
  52. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*350*/
  53. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*500*/
  54. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*700*/
  55. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1000*/
  56. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*1400*/
  57. {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2000*/
  58. {-40.,-40.,-40.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*2800*/
  59. {-30.,-35.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*4000*/
  60. {-30.,-30.,-35.,-40.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*5600*/
  61. {-30.,-30.,-35.,-35.,-40.,-50.,-60.,-70.,-80.,-90.,-100.}, /*8000*/
  62. {-30.,-30.,-35.,-33.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*11500*/
  63. {-30.,-28.,-30.,-32.,-35.,-45.,-55.,-65.,-75.,-90.,-100.}, /*16000*/
  64. },
  65. 1,/* peakattp */
  66. {{-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*63*/
  67. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*88*/
  68. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*125*/
  69. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  70. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  71. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  72. { -7., -8., -9.,-10.,-10.,-11.,-12.,-13.,-15.,-18.,-20.}, /*8000*/
  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.,-16.,-17.}, /*8000*/
  81. { -6., -7., -9., -9., -9., -9.,-10.,-11.,-12.,-13.,-14.}, /*11500*/
  82. { -6., -6., -9., -9., -9., -9., -9., -9.,-10.,-11.,-12.}, /*16000*/
  83. },
  84. 1,/*noisemaskp */
  85. /* 0 10 20 30 40 50 60 70 80 90 100 */
  86. {{-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*63*/
  87. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*88*/
  88. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*125*/
  89. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*175*/
  90. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*250*/
  91. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*350*/
  92. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*500*/
  93. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*700*/
  94. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1000*/
  95. {-99.,-99.,-99.,-99.,-99.,-99.,-99.,-199.,-199.,-199.,-199.}, /*1400*/
  96. { 0., -4., -4., -4., -6., -6., -6., -6., -6., -6., -6.}, /*2000*/
  97. { 0., -3., -4., -4., -4., -5., -6., -6., -6., -6., -6.}, /*2800*/
  98. { 0., -2., -2., -2., -2., -2., -2., -2., -4., -4., -4.}, /*4000*/
  99. { 0., -0., -0., -0., -0., -2., -2., -2., -2., -2., -2.}, /*5600*/
  100. { 0., 0., 0., 0., 0., 0., 0., 0., 0., -2., -4.}, /*8000*/
  101. { 2., 2., 2., 2., 2., 2., 0., 0., 0., 0., 0.}, /*11500*/
  102. { 2., 2., 2., 2., 2., 4., 4., 4., 4., 4., 4.}, /*16000*/
  103. },
  104. 100.,
  105. -0., -.004 /* attack/decay control */
  106. };
  107. /* with GNUisms, this could be short and readable. Oh well */
  108. static vorbis_info_time0 _time_set0C={0};
  109. static vorbis_info_floor0 _floor_set0C={12, 44100, 64, 12,150, 1, {0} };
  110. static vorbis_info_floor0 _floor_set1C={30, 44100, 256, 12,150, 1, {1} };
  111. static vorbis_info_residue0 _residue_set0C={0,128, 32,6,2,
  112. {0,1,1,1,1,1},
  113. {4,5,6,7,8},
  114. {0,99999,9999,9999,9999},
  115. {99,1.5,2.5,3.5,5},
  116. {5,5,5,5,5},
  117. {99,99,99,99,99}};
  118. static vorbis_info_residue0 _residue_set1C={0,1024, 32,6,3,
  119. {0,1,1,1,1,1},
  120. {9,10,11,12,13},
  121. {0,99999,9999,9999,9999},
  122. {99,1.5,2.5,3.5,5},
  123. {5,5,5,5,5},
  124. {99,99,99,99,99}};
  125. static vorbis_info_mapping0 _mapping_set0C={1, {0,0}, {0}, {0}, {0}, {0}};
  126. static vorbis_info_mapping0 _mapping_set1C={1, {0,0}, {0}, {1}, {1}, {0}};
  127. static vorbis_info_mode _mode_set0C={0,0,0,0};
  128. static vorbis_info_mode _mode_set1C={1,0,0,1};
  129. /* CD quality stereo, no channel coupling */
  130. codec_setup_info info_C={
  131. /* smallblock, largeblock */
  132. {256, 2048},
  133. /* modes,maps,times,floors,residues,books,psys */
  134. 2, 2, 1, 2, 2, 14, 1,
  135. /* modes */
  136. {&_mode_set0C,&_mode_set1C},
  137. /* maps */
  138. {0,0},{&_mapping_set0C,&_mapping_set1C},
  139. /* times */
  140. {0,0},{&_time_set0C},
  141. /* floors */
  142. {0,0},{&_floor_set0C,&_floor_set1C},
  143. /* residue */
  144. {0,0},{&_residue_set0C,&_residue_set1C},
  145. /* books */
  146. {&_vq_book_lsp12_0, /* 0 */
  147. &_vq_book_lsp30_0, /* 1 */
  148. &_huff_book_resaux0_128a_192,
  149. &_huff_book_resaux0_1024a_192,
  150. &_vq_book_res0_128a_192_1,
  151. &_vq_book_res0_128a_192_2,
  152. &_vq_book_res0_128a_192_3,
  153. &_vq_book_res0_128a_192_4,
  154. &_vq_book_res0_128a_192_5,
  155. &_vq_book_res0_1024a_192_1,
  156. &_vq_book_res0_1024a_192_2,
  157. &_vq_book_res0_1024a_192_3,
  158. &_vq_book_res0_1024a_192_4,
  159. &_vq_book_res0_1024a_192_5,
  160. },
  161. /* psy */
  162. {&_psy_set_C},
  163. /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  164. 256, 24, 6, -96.
  165. };
  166. #define PREDEF_INFO_MAX 0
  167. #endif