residue_16.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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-2007 *
  9. * by the Xiph.Org Foundation http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: toplevel residue templates 16/22kHz
  13. last mod: $Id$
  14. ********************************************************************/
  15. /***** residue backends *********************************************/
  16. static 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 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 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 vorbis_residue_template _res_16s_0[]={
  59. {2,0, &_residue_44_mid,
  60. &_huff_book__16c0_s_single,&_huff_book__16c0_s_single,
  61. &_resbook_16s_0,&_resbook_16s_0},
  62. };
  63. static vorbis_residue_template _res_16s_1[]={
  64. {2,0, &_residue_44_mid,
  65. &_huff_book__16c1_s_short,&_huff_book__16c1_s_short,
  66. &_resbook_16s_1,&_resbook_16s_1},
  67. {2,0, &_residue_44_mid,
  68. &_huff_book__16c1_s_long,&_huff_book__16c1_s_long,
  69. &_resbook_16s_1,&_resbook_16s_1}
  70. };
  71. static vorbis_residue_template _res_16s_2[]={
  72. {2,0, &_residue_44_high,
  73. &_huff_book__16c2_s_short,&_huff_book__16c2_s_short,
  74. &_resbook_16s_2,&_resbook_16s_2},
  75. {2,0, &_residue_44_high,
  76. &_huff_book__16c2_s_long,&_huff_book__16c2_s_long,
  77. &_resbook_16s_2,&_resbook_16s_2}
  78. };
  79. static vorbis_mapping_template _mapres_template_16_stereo[4]={
  80. { _map_nominal, _res_16s_0 }, /* -1 */
  81. { _map_nominal, _res_16s_0 }, /* 0 */
  82. { _map_nominal, _res_16s_1 }, /* 1 */
  83. { _map_nominal, _res_16s_2 }, /* 2 */
  84. };
  85. static static_bookblock _resbook_16u_0={
  86. {
  87. {0},
  88. {0,0,&_16u0__p1_0},
  89. {0,0,&_16u0__p2_0},
  90. {0,0,&_16u0__p3_0},
  91. {0,0,&_16u0__p4_0},
  92. {0,0,&_16u0__p5_0},
  93. {&_16u0__p6_0,&_16u0__p6_1},
  94. {&_16u0__p7_0,&_16u0__p7_1,&_16u0__p7_2}
  95. }
  96. };
  97. static static_bookblock _resbook_16u_1={
  98. {
  99. {0},
  100. {0,0,&_16u1__p1_0},
  101. {0,0,&_16u1__p2_0},
  102. {0,0,&_16u1__p3_0},
  103. {0,0,&_16u1__p4_0},
  104. {0,0,&_16u1__p5_0},
  105. {0,0,&_16u1__p6_0},
  106. {&_16u1__p7_0,&_16u1__p7_1},
  107. {&_16u1__p8_0,&_16u1__p8_1},
  108. {&_16u1__p9_0,&_16u1__p9_1,&_16u1__p9_2}
  109. }
  110. };
  111. static static_bookblock _resbook_16u_2={
  112. {
  113. {0},
  114. {0,0,&_16u2_p1_0},
  115. {0,0,&_16u2_p2_0},
  116. {0,0,&_16u2_p3_0},
  117. {0,0,&_16u2_p4_0},
  118. {&_16u2_p5_0,&_16u2_p5_1},
  119. {&_16u2_p6_0,&_16u2_p6_1},
  120. {&_16u2_p7_0,&_16u2_p7_1},
  121. {&_16u2_p8_0,&_16u2_p8_1},
  122. {&_16u2_p9_0,&_16u2_p9_1,&_16u2_p9_2}
  123. }
  124. };
  125. static vorbis_residue_template _res_16u_0[]={
  126. {1,0, &_residue_44_low_un,
  127. &_huff_book__16u0__single,&_huff_book__16u0__single,
  128. &_resbook_16u_0,&_resbook_16u_0},
  129. };
  130. static vorbis_residue_template _res_16u_1[]={
  131. {1,0, &_residue_44_mid_un,
  132. &_huff_book__16u1__short,&_huff_book__16u1__short,
  133. &_resbook_16u_1,&_resbook_16u_1},
  134. {1,0, &_residue_44_mid_un,
  135. &_huff_book__16u1__long,&_huff_book__16u1__long,
  136. &_resbook_16u_1,&_resbook_16u_1}
  137. };
  138. static vorbis_residue_template _res_16u_2[]={
  139. {1,0, &_residue_44_hi_un,
  140. &_huff_book__16u2__short,&_huff_book__16u2__short,
  141. &_resbook_16u_2,&_resbook_16u_2},
  142. {1,0, &_residue_44_hi_un,
  143. &_huff_book__16u2__long,&_huff_book__16u2__long,
  144. &_resbook_16u_2,&_resbook_16u_2}
  145. };
  146. static vorbis_mapping_template _mapres_template_16_uncoupled[4]={
  147. { _map_nominal_u, _res_16u_0 }, /* -1 */
  148. { _map_nominal_u, _res_16u_0 }, /* 0 */
  149. { _map_nominal_u, _res_16u_1 }, /* 1 */
  150. { _map_nominal_u, _res_16u_2 }, /* 2 */
  151. };