mode_44c_Z.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
  5. * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  6. * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2001 *
  9. * by the XIPHOPHORUS Company http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: predefined encoding modes; 44kHz stereo ~64kbps true VBR
  13. last mod: $Id: mode_44c_Z.h,v 1.1.2.1 2001/08/13 00:20:27 xiphmont Exp $
  14. ********************************************************************/
  15. #ifndef _V_MODES_44c_Z_H_
  16. #define _V_MODES_44c_Z_H_
  17. #include <stdio.h>
  18. #include "vorbis/codec.h"
  19. #include "backends.h"
  20. #include "books/line_128x7_class1.vqh"
  21. #include "books/line_128x7_class2.vqh"
  22. #include "books/line_128x7_0sub0.vqh"
  23. #include "books/line_128x7_1sub1.vqh"
  24. #include "books/line_128x7_1sub2.vqh"
  25. #include "books/line_128x7_1sub3.vqh"
  26. #include "books/line_128x7_2sub1.vqh"
  27. #include "books/line_128x7_2sub2.vqh"
  28. #include "books/line_128x7_2sub3.vqh"
  29. #include "books/line_1024x31_class0.vqh"
  30. #include "books/line_1024x31_class1.vqh"
  31. #include "books/line_1024x31_class2.vqh"
  32. #include "books/line_1024x31_class3.vqh"
  33. #include "books/line_1024x31_0sub0.vqh"
  34. #include "books/line_1024x31_0sub1.vqh"
  35. #include "books/line_1024x31_1sub0.vqh"
  36. #include "books/line_1024x31_1sub1.vqh"
  37. #include "books/line_1024x31_2sub1.vqh"
  38. #include "books/line_1024x31_2sub2.vqh"
  39. #include "books/line_1024x31_2sub3.vqh"
  40. #include "books/line_1024x31_3sub1.vqh"
  41. #include "books/line_1024x31_3sub2.vqh"
  42. #include "books/line_1024x31_3sub3.vqh"
  43. #include "books/res_Zc_128aux.vqh"
  44. #include "books/res_Zc_1024aux.vqh"
  45. #include "books/res_Zc_1.vqh"
  46. #include "books/res_Zc_2.vqh"
  47. #include "books/res_Zc_3.vqh"
  48. #include "books/res_Zc_4.vqh"
  49. #include "books/res_Zc_5.vqh"
  50. #include "books/res_Zc_6.vqh"
  51. #include "books/res_Zc_7.vqh"
  52. #include "books/res_Zc_8.vqh"
  53. #include "books/res_Zc_9.vqh"
  54. #include "books/res_Zc_9a.vqh"
  55. #include "books/res_Zc_9b.vqh"
  56. #include "maskadj_Z.h"
  57. static vorbis_info_psy_global _psy_set_44c_ZG={
  58. 0, /* decaydBpms */
  59. 8, /* lines per eighth octave */
  60. /* thresh sample period, preecho clamp trigger threshhold, range, minenergy */
  61. 256, {26.f,26.f,26.f,30.f}, {-90.f,-90.f,-90.f,-90.f}, -90.f,
  62. -6.f,
  63. 0,
  64. };
  65. static struct vp_couple_pass _psy_pass_44c_Z0[]={
  66. {1.f,1.f,
  67. {{24, 0,0, 0,0, 0,0},
  68. {9999, 0,0, 7.5f,12, 7.5f,0}}
  69. },
  70. };
  71. static vp_couple_pass _psy_pass_44c_Z[]={
  72. {1.f,1.f,
  73. {{288, 0,0, 0,0, 0,0},
  74. {9999, 0,0, 7.5f,12, 7.5f,0}}
  75. }
  76. };
  77. static vorbis_info_psy _psy_set_44c_Z0={
  78. ATH_Bark_dB_lineaggressive,
  79. -100.,-110.,
  80. /* tonemaskp */
  81. 3.f, -24.f,&_vp_tonemask_consbass_Z,
  82. /* peakattp, curvelimitp */
  83. 1, 0, &_vp_peakatt_Z,
  84. /*noisemaskp */
  85. 1,-24.f, /* suppress any noise curve over maxspec+n */
  86. 1.f, 1.f, /* low/high window */
  87. 2, 2, -1,
  88. /*63 125 250 500 1k 2k 4k 8k 16k*/
  89. {-20,-20,-20,-20,-20,-20,-10, -5, 3, 3, 4, 4, 4, 4, 4, 4, 8},
  90. {1.f,1.f,1.f,1.f,1.f,1.f,.8f,.7f,.7f,.7f,.7f,.7f,.8f,.88f,.89f,.9f,.9f},
  91. 95.f, /* even decade + 5 is important; saves an rint() later in a
  92. tight loop) */
  93. 1,
  94. _psy_pass_44c_Z0
  95. };
  96. static vorbis_info_psy _psy_set_44c_ZT={
  97. ATH_Bark_dB_lineaggressive,
  98. -100.f,-110.f,
  99. /* tonemask */
  100. 3.f,-20.f,&_vp_tonemask_consbass_Z,
  101. /* peakattp,curvelimitp */
  102. 1, 0, &_vp_peakatt_Z,
  103. /*noisemaskp */
  104. 1, -24.f, /* suppress any noise curve over maxspec+n */
  105. .5f,.5f, /* low/high window */
  106. 10,10,100,
  107. /*63 125 250 500 1k 2k 4k 8k 16k*/
  108. {-20,-20,-20,-20,-20,-20,-20, -6, 3, 3, 4, 5, 5, 5, 5, 6, 10},
  109. {1.f,1.f,1.f,1.f,1.f,1.f,.8f,.7f,.7f,.7f,.7f,.7f,.8f,.88f,.89f,.9f,.9f},
  110. 95.f, /* even decade + 5 is important; saves an rint() later in a
  111. tight loop) */
  112. 1,_psy_pass_44c_Z
  113. };
  114. static vorbis_info_psy _psy_set_44c_Z={
  115. ATH_Bark_dB_lineaggressive,
  116. -100.f, -110.f,
  117. /* tonemask */
  118. 3.f,-20.f,&_vp_tonemask_Z,
  119. /* peakattp, curvelimitp */
  120. 1, 0, &_vp_peakatt_Z,
  121. /*noisemaskp */
  122. 1, -24.f, /* suppress any noise curve over maxspec+n */
  123. .5f,.5f, /* low/high window */
  124. 10,10,100,
  125. /*63 125 250 500 1k 2k 4k 8k 16k*/
  126. {-20,-20,-20,-20,-20,-20,-10,-6, 3, 3, 4, 5, 5, 5, 5, 6, 10},
  127. {1.f,1.f,1.f,1.f,1.f,1.f,.8f,.7f,.7f,.7f,.7f,.8f,.85f,.88f,.89f,.9f,.9f},
  128. 95.f, /* even decade + 5 is important; saves an rint() later in a
  129. tight loop) */
  130. 1,_psy_pass_44c_Z
  131. };
  132. static vorbis_info_time0 _time_set_44c_Z={0};
  133. static vorbis_info_floor1 _floor_set_44c_Z0={
  134. 3,
  135. {0,1,2},
  136. {1,3,3},
  137. {0,2,2},
  138. {-1,0,1},
  139. {{2},{-1,3,4,5},{-1,6,7,8}},
  140. 4,
  141. {0,128,
  142. 7,
  143. 2,1,4,
  144. 23,13,45},
  145. 60,30,500,
  146. 999,999,0,18.,
  147. 8,70,
  148. 90};
  149. static vorbis_info_floor1 _floor_set_44c_Z={
  150. 10,
  151. {0,1,2,2,2,2,2, 3,3,3},
  152. {3,4,3,3},
  153. {1,1,2,2},
  154. {9,10,11,12},
  155. {{13,14},
  156. {15,16},
  157. {-1,17,18,19},
  158. {-1,20,21,22},
  159. },
  160. 4,
  161. {0,1024,
  162. 88,31,243,
  163. 14,54,143,460,
  164. 6,3,10, 22,18,26, 41,36,47,
  165. 69,61,78, 112,99,126, 185,162,211,
  166. 329,282,387, 672,553,825
  167. },
  168. 60,30,400,
  169. 20,8,1,18.,
  170. 20,600,
  171. 720};
  172. static vorbis_info_residue0 _residue_set_44c_Z0={
  173. 0,180, 12, 10,23,
  174. {0,1,1,1,1,1,1,1,1,7},
  175. {25, 26, 27, 28, 29, 30, 31, 32, 33,34,35},
  176. {9999, 9999, 9999, 9999, 2,9999, 9999, 9999, 9999, 9999},
  177. {.5, 1.5, 2.5f, 7.5, 1.5f,1.5, 2.5, 7.5, 22.5f},
  178. {0},
  179. {99, 4, 4, 4, 99,99, 99, 99, 99},
  180. {3}};
  181. static vorbis_info_residue0 _residue_set_44c_Z={
  182. 0,1408, 32, 10,24,
  183. {0,1,1,1,1,1,1,1,1,7},
  184. {25, 26, 27, 28, 29, 30, 31, 32, 33,34,35},
  185. {9999, 9999, 9999, 9999, 3,9999, 9999, 9999, 9999, 9999},
  186. {.5, 1.5, 2.5f, 7.5, 1.5f,1.5, 2.5, 7.5, 22.5f},
  187. {0},
  188. {99, 18, 18, 18, 99,99, 99, 99, 99},
  189. {3}};
  190. static vorbis_info_mapping0 _mapping_set_44c_Z0={
  191. 1, {0,0}, {0}, {0}, {0}, {0,0}, 1,{0},{1}};
  192. static vorbis_info_mapping0 _mapping_set_44c_Z={
  193. 1, {0,0}, {0}, {1}, {1}, {1,2}, 1,{0},{1}};
  194. static vorbis_info_mode _mode_set_44c_Z0={0,0,0,0};
  195. static vorbis_info_mode _mode_set_44c_Z={1,0,0,1};
  196. /* CD quality stereo, no channel coupling */
  197. codec_setup_info info_44c_Z={
  198. /* smallblock, largeblock */
  199. {256, 2048},
  200. /* modes,maps,times,floors,residues,books,psys */
  201. 2, 2, 1, 2, 2, 36, 3,
  202. /* modes */
  203. {&_mode_set_44c_Z0,&_mode_set_44c_Z},
  204. /* maps */
  205. {0,0},{&_mapping_set_44c_Z0,&_mapping_set_44c_Z},
  206. /* times */
  207. {0,0},{&_time_set_44c_Z},
  208. /* floors */
  209. {1,1},{&_floor_set_44c_Z0,&_floor_set_44c_Z},
  210. /* residue */
  211. {2,2},{&_residue_set_44c_Z0,&_residue_set_44c_Z},
  212. /* books */
  213. {
  214. &_huff_book_line_128x7_class1,
  215. &_huff_book_line_128x7_class2, /* 1 */
  216. &_huff_book_line_128x7_0sub0, /* 2 */
  217. &_huff_book_line_128x7_1sub1, /* 3 */
  218. &_huff_book_line_128x7_1sub2,
  219. &_huff_book_line_128x7_1sub3, /* 5 */
  220. &_huff_book_line_128x7_2sub1,
  221. &_huff_book_line_128x7_2sub2, /* 7 */
  222. &_huff_book_line_128x7_2sub3,
  223. &_huff_book_line_1024x31_class0,
  224. &_huff_book_line_1024x31_class1, /* 10 */
  225. &_huff_book_line_1024x31_class2,
  226. &_huff_book_line_1024x31_class3, /* 12 */
  227. &_huff_book_line_1024x31_0sub0,
  228. &_huff_book_line_1024x31_0sub1, /* 14 */
  229. &_huff_book_line_1024x31_1sub0,
  230. &_huff_book_line_1024x31_1sub1,
  231. &_huff_book_line_1024x31_2sub1,
  232. &_huff_book_line_1024x31_2sub2, /* 18 */
  233. &_huff_book_line_1024x31_2sub3,
  234. &_huff_book_line_1024x31_3sub1,
  235. &_huff_book_line_1024x31_3sub2,
  236. &_huff_book_line_1024x31_3sub3, /* 22 */
  237. &_huff_book_res_Zc_128aux,
  238. &_huff_book_res_Zc_1024aux,
  239. &_vq_book_res_Zc_1,
  240. &_vq_book_res_Zc_2,
  241. &_vq_book_res_Zc_3,
  242. &_vq_book_res_Zc_4,
  243. &_vq_book_res_Zc_5,
  244. &_vq_book_res_Zc_6,
  245. &_vq_book_res_Zc_7,
  246. &_vq_book_res_Zc_8,
  247. &_vq_book_res_Zc_9,
  248. &_vq_book_res_Zc_9a,
  249. &_vq_book_res_Zc_9b,
  250. },
  251. /* psy */
  252. {&_psy_set_44c_Z0,&_psy_set_44c_ZT,&_psy_set_44c_Z},
  253. &_psy_set_44c_ZG
  254. };
  255. #endif