residue_16.h 4.7 KB

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