residue_16.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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-2009 *
  9. * by the Xiph.Org Foundation http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: toplevel residue templates 16/22kHz
  13. last mod: $Id: residue_16.h 16962 2010-03-11 07:30:34Z xiphmont $
  14. ********************************************************************/
  15. /***** residue backends *********************************************/
  16. static const static_bookblock _resbook_16s_0={
  17. {
  18. {0},
  19. {0,0,&_16c0_s_p1_0},
  20. {0},
  21. {0,0,&_16c0_s_p3_0},
  22. {0,0,&_16c0_s_p4_0},
  23. {0,0,&_16c0_s_p5_0},
  24. {0,0,&_16c0_s_p6_0},
  25. {&_16c0_s_p7_0,&_16c0_s_p7_1},
  26. {&_16c0_s_p8_0,&_16c0_s_p8_1},
  27. {&_16c0_s_p9_0,&_16c0_s_p9_1,&_16c0_s_p9_2}
  28. }
  29. };
  30. static const static_bookblock _resbook_16s_1={
  31. {
  32. {0},
  33. {0,0,&_16c1_s_p1_0},
  34. {0},
  35. {0,0,&_16c1_s_p3_0},
  36. {0,0,&_16c1_s_p4_0},
  37. {0,0,&_16c1_s_p5_0},
  38. {0,0,&_16c1_s_p6_0},
  39. {&_16c1_s_p7_0,&_16c1_s_p7_1},
  40. {&_16c1_s_p8_0,&_16c1_s_p8_1},
  41. {&_16c1_s_p9_0,&_16c1_s_p9_1,&_16c1_s_p9_2}
  42. }
  43. };
  44. static const static_bookblock _resbook_16s_2={
  45. {
  46. {0},
  47. {0,0,&_16c2_s_p1_0},
  48. {0,0,&_16c2_s_p2_0},
  49. {0,0,&_16c2_s_p3_0},
  50. {0,0,&_16c2_s_p4_0},
  51. {&_16c2_s_p5_0,&_16c2_s_p5_1},
  52. {&_16c2_s_p6_0,&_16c2_s_p6_1},
  53. {&_16c2_s_p7_0,&_16c2_s_p7_1},
  54. {&_16c2_s_p8_0,&_16c2_s_p8_1},
  55. {&_16c2_s_p9_0,&_16c2_s_p9_1,&_16c2_s_p9_2}
  56. }
  57. };
  58. static const vorbis_residue_template _res_16s_0[]={
  59. {2,0,32, &_residue_44_mid,
  60. &_huff_book__16c0_s_single,&_huff_book__16c0_s_single,
  61. &_resbook_16s_0,&_resbook_16s_0},
  62. };
  63. static const vorbis_residue_template _res_16s_1[]={
  64. {2,0,32, &_residue_44_mid,
  65. &_huff_book__16c1_s_short,&_huff_book__16c1_s_short,
  66. &_resbook_16s_1,&_resbook_16s_1},
  67. {2,0,32, &_residue_44_mid,
  68. &_huff_book__16c1_s_long,&_huff_book__16c1_s_long,
  69. &_resbook_16s_1,&_resbook_16s_1}
  70. };
  71. static const vorbis_residue_template _res_16s_2[]={
  72. {2,0,32, &_residue_44_high,
  73. &_huff_book__16c2_s_short,&_huff_book__16c2_s_short,
  74. &_resbook_16s_2,&_resbook_16s_2},
  75. {2,0,32, &_residue_44_high,
  76. &_huff_book__16c2_s_long,&_huff_book__16c2_s_long,
  77. &_resbook_16s_2,&_resbook_16s_2}
  78. };
  79. static const vorbis_mapping_template _mapres_template_16_stereo[3]={
  80. { _map_nominal, _res_16s_0 }, /* 0 */
  81. { _map_nominal, _res_16s_1 }, /* 1 */
  82. { _map_nominal, _res_16s_2 }, /* 2 */
  83. };
  84. static const static_bookblock _resbook_16u_0={
  85. {
  86. {0},
  87. {0,0,&_16u0__p1_0},
  88. {0,0,&_16u0__p2_0},
  89. {0,0,&_16u0__p3_0},
  90. {0,0,&_16u0__p4_0},
  91. {0,0,&_16u0__p5_0},
  92. {&_16u0__p6_0,&_16u0__p6_1},
  93. {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2}
  94. }
  95. };
  96. static const static_bookblock _resbook_16u_1={
  97. {
  98. {0},
  99. {0,0,&_16u1__p1_0},
  100. {0,0,&_16u1__p2_0},
  101. {0,0,&_16u1__p3_0},
  102. {0,0,&_16u1__p4_0},
  103. {0,0,&_16u1__p5_0},
  104. {0,0,&_16u1__p6_0},
  105. {&_16u1__p7_0,&_16u1__p7_1},
  106. {&_16u1__p8_0,&_16u1__p8_1},
  107. {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2}
  108. }
  109. };
  110. static const static_bookblock _resbook_16u_2={
  111. {
  112. {0},
  113. {0,0,&_16u2_p1_0},
  114. {0,0,&_16u2_p2_0},
  115. {0,0,&_16u2_p3_0},
  116. {0,0,&_16u2_p4_0},
  117. {&_16u2_p5_0,&_16u2_p5_1},
  118. {&_16u2_p6_0,&_16u2_p6_1},
  119. {&_16u2_p7_0,&_16u2_p7_1},
  120. {&_16u2_p8_0,&_16u2_p8_1},
  121. {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2}
  122. }
  123. };
  124. static const vorbis_residue_template _res_16u_0[]={
  125. {1,0,32, &_residue_44_low_un,
  126. &_huff_book__16u0__single,&_huff_book__16u0__single,
  127. &_resbook_16u_0,&_resbook_16u_0},
  128. };
  129. static const vorbis_residue_template _res_16u_1[]={
  130. {1,0,32, &_residue_44_mid_un,
  131. &_huff_book__16u1__short,&_huff_book__16u1__short,
  132. &_resbook_16u_1,&_resbook_16u_1},
  133. {1,0,32, &_residue_44_mid_un,
  134. &_huff_book__16u1__long,&_huff_book__16u1__long,
  135. &_resbook_16u_1,&_resbook_16u_1}
  136. };
  137. static const vorbis_residue_template _res_16u_2[]={
  138. {1,0,32, &_residue_44_hi_un,
  139. &_huff_book__16u2__short,&_huff_book__16u2__short,
  140. &_resbook_16u_2,&_resbook_16u_2},
  141. {1,0,32, &_residue_44_hi_un,
  142. &_huff_book__16u2__long,&_huff_book__16u2__long,
  143. &_resbook_16u_2,&_resbook_16u_2}
  144. };
  145. static const vorbis_mapping_template _mapres_template_16_uncoupled[3]={
  146. { _map_nominal_u, _res_16u_0 }, /* 0 */
  147. { _map_nominal_u, _res_16u_1 }, /* 1 */
  148. { _map_nominal_u, _res_16u_2 }, /* 2 */
  149. };