mode_D.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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_D.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 256 kbps stereo */
  17. #ifndef _V_MODES_D_H_
  18. #define _V_MODES_D_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_256.vqh"
  25. #include "books/resaux0_1024a_256.vqh"
  26. #include "books/res0_128a_256_1.vqh"
  27. #include "books/res0_128a_256_2.vqh"
  28. #include "books/res0_128a_256_3.vqh"
  29. #include "books/res0_128a_256_4.vqh"
  30. #include "books/res0_128a_256_5.vqh"
  31. #include "books/res0_1024a_256_1.vqh"
  32. #include "books/res0_1024a_256_2.vqh"
  33. #include "books/res0_1024a_256_3.vqh"
  34. #include "books/res0_1024a_256_4.vqh"
  35. #include "books/res0_1024a_256_5.vqh"
  36. static vorbis_info_psy _psy_set_256 ={
  37. 1,/*athp*/
  38. 0,/*decayp*/
  39. 1,/*smoothp*/
  40. 0,.1,
  41. -100.,
  42. -140.,
  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. 1,/* tonemaskp */
  47. /* 0 10 20 30 40 50 60 70 80 90 100 */
  48. {{-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*63*/
  49. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*125*/
  50. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*175*/
  51. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*250*/
  52. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*350*/
  53. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*500*/
  54. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*700*/
  55. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1000*/
  56. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*1400*/
  57. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2000*/
  58. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*2800*/
  59. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*4000*/
  60. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*5600*/
  61. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*8000*/
  62. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*11500*/
  63. {-40.,-40.,-40.,-45.,-45.,-55.,-65.,-75.,-85.,-95.,-105.}, /*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. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*175*/
  70. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*250*/
  71. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*350*/
  72. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*500*/
  73. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*700*/
  74. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1000*/
  75. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*1400*/
  76. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2000*/
  77. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*2800*/
  78. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*4000*/
  79. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*5600*/
  80. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*8000*/
  81. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*11500*/
  82. {-14.,-16.,-18.,-19.,-20.,-21.,-22.,-22.,-22.,-22.,-22.}, /*16000*/
  83. },
  84. 0,/*noisemaskp */
  85. /* 0 10 20 30 40 50 60 70 80 90 100 */
  86. {{0}},
  87. 110.,
  88. -0., -.004 /* attack/decay control */
  89. };
  90. /* with GNUisms, this could be short and readable. Oh well */
  91. static vorbis_info_time0 _time_set0_256={0};
  92. static vorbis_info_floor0 _floor_set0_256={12, 44100, 64, 12,150, 1, {0} };
  93. static vorbis_info_floor0 _floor_set1_256={30, 44100, 256, 12,150, 1, {1} };
  94. static vorbis_info_residue0 _residue_set0_256={0,128, 32,6,2,
  95. {0,1,1,1,1,1},
  96. {4,5,6,7,8},
  97. {0,9999,9999,9999,9999},
  98. {99,2.5,7,13.5,27.5},
  99. {5,5,5,5,5},
  100. {99,99,99,99,99}};
  101. static vorbis_info_residue0 _residue_set1_256={0,1024, 32,6,3,
  102. {0,1,1,1,1,1},
  103. {9,10,11,12,13},
  104. {0,9999,9999,9999,9999},
  105. {99,2.5,7,13.5,27.5},
  106. {5,5,5,5,5},
  107. {99,99,99,99,99}};
  108. static vorbis_info_mapping0 _mapping_set0_256={1, {0,0}, {0}, {0}, {0}, {0}};
  109. static vorbis_info_mapping0 _mapping_set1_256={1, {0,0}, {0}, {1}, {1}, {0}};
  110. static vorbis_info_mode _mode_set0_256={0,0,0,0};
  111. static vorbis_info_mode _mode_set1_256={1,0,0,1};
  112. /* CD quality stereo, no channel coupling */
  113. codec_setup_info info_D={
  114. /* smallblock, largeblock */
  115. {256, 2048},
  116. /* modes,maps,times,floors,residues,books,psys */
  117. 2, 2, 1, 2, 2, 14, 1,
  118. /* modes */
  119. {&_mode_set0_256,&_mode_set1_256},
  120. /* maps */
  121. {0,0},{&_mapping_set0_256,&_mapping_set1_256},
  122. /* times */
  123. {0,0},{&_time_set0_256},
  124. /* floors */
  125. {0,0},{&_floor_set0_256,&_floor_set1_256},
  126. /* residue */
  127. {0,0},{&_residue_set0_256,&_residue_set1_256},
  128. /* books */
  129. {&_vq_book_lsp12_0, /* 0 */
  130. &_vq_book_lsp30_0, /* 1 */
  131. &_huff_book_resaux0_128a_256,
  132. &_huff_book_resaux0_1024a_256,
  133. &_vq_book_res0_128a_256_1,
  134. &_vq_book_res0_128a_256_2,
  135. &_vq_book_res0_128a_256_3,
  136. &_vq_book_res0_128a_256_4,
  137. &_vq_book_res0_128a_256_5,
  138. &_vq_book_res0_1024a_256_1,
  139. &_vq_book_res0_1024a_256_2,
  140. &_vq_book_res0_1024a_256_3,
  141. &_vq_book_res0_1024a_256_4,
  142. &_vq_book_res0_1024a_256_5,
  143. },
  144. /* psy */
  145. {&_psy_set_256},
  146. /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  147. 256, 24, 6, -96.
  148. };
  149. #define PREDEF_INFO_MAX 0
  150. #endif