floor_all.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  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: key floor settings
  13. last mod: $Id: floor_all.h 17050 2010-03-26 01:34:42Z xiphmont $
  14. ********************************************************************/
  15. #include "vorbis/codec.h"
  16. #include "backends.h"
  17. #include "books/floor/floor_books.h"
  18. static const static_codebook*const _floor_128x4_books[]={
  19. &_huff_book_line_128x4_class0,
  20. &_huff_book_line_128x4_0sub0,
  21. &_huff_book_line_128x4_0sub1,
  22. &_huff_book_line_128x4_0sub2,
  23. &_huff_book_line_128x4_0sub3,
  24. };
  25. static const static_codebook*const _floor_256x4_books[]={
  26. &_huff_book_line_256x4_class0,
  27. &_huff_book_line_256x4_0sub0,
  28. &_huff_book_line_256x4_0sub1,
  29. &_huff_book_line_256x4_0sub2,
  30. &_huff_book_line_256x4_0sub3,
  31. };
  32. static const static_codebook*const _floor_128x7_books[]={
  33. &_huff_book_line_128x7_class0,
  34. &_huff_book_line_128x7_class1,
  35. &_huff_book_line_128x7_0sub1,
  36. &_huff_book_line_128x7_0sub2,
  37. &_huff_book_line_128x7_0sub3,
  38. &_huff_book_line_128x7_1sub1,
  39. &_huff_book_line_128x7_1sub2,
  40. &_huff_book_line_128x7_1sub3,
  41. };
  42. static const static_codebook*const _floor_256x7_books[]={
  43. &_huff_book_line_256x7_class0,
  44. &_huff_book_line_256x7_class1,
  45. &_huff_book_line_256x7_0sub1,
  46. &_huff_book_line_256x7_0sub2,
  47. &_huff_book_line_256x7_0sub3,
  48. &_huff_book_line_256x7_1sub1,
  49. &_huff_book_line_256x7_1sub2,
  50. &_huff_book_line_256x7_1sub3,
  51. };
  52. static const static_codebook*const _floor_128x11_books[]={
  53. &_huff_book_line_128x11_class1,
  54. &_huff_book_line_128x11_class2,
  55. &_huff_book_line_128x11_class3,
  56. &_huff_book_line_128x11_0sub0,
  57. &_huff_book_line_128x11_1sub0,
  58. &_huff_book_line_128x11_1sub1,
  59. &_huff_book_line_128x11_2sub1,
  60. &_huff_book_line_128x11_2sub2,
  61. &_huff_book_line_128x11_2sub3,
  62. &_huff_book_line_128x11_3sub1,
  63. &_huff_book_line_128x11_3sub2,
  64. &_huff_book_line_128x11_3sub3,
  65. };
  66. static const static_codebook*const _floor_128x17_books[]={
  67. &_huff_book_line_128x17_class1,
  68. &_huff_book_line_128x17_class2,
  69. &_huff_book_line_128x17_class3,
  70. &_huff_book_line_128x17_0sub0,
  71. &_huff_book_line_128x17_1sub0,
  72. &_huff_book_line_128x17_1sub1,
  73. &_huff_book_line_128x17_2sub1,
  74. &_huff_book_line_128x17_2sub2,
  75. &_huff_book_line_128x17_2sub3,
  76. &_huff_book_line_128x17_3sub1,
  77. &_huff_book_line_128x17_3sub2,
  78. &_huff_book_line_128x17_3sub3,
  79. };
  80. static const static_codebook*const _floor_256x4low_books[]={
  81. &_huff_book_line_256x4low_class0,
  82. &_huff_book_line_256x4low_0sub0,
  83. &_huff_book_line_256x4low_0sub1,
  84. &_huff_book_line_256x4low_0sub2,
  85. &_huff_book_line_256x4low_0sub3,
  86. };
  87. static const static_codebook*const _floor_1024x27_books[]={
  88. &_huff_book_line_1024x27_class1,
  89. &_huff_book_line_1024x27_class2,
  90. &_huff_book_line_1024x27_class3,
  91. &_huff_book_line_1024x27_class4,
  92. &_huff_book_line_1024x27_0sub0,
  93. &_huff_book_line_1024x27_1sub0,
  94. &_huff_book_line_1024x27_1sub1,
  95. &_huff_book_line_1024x27_2sub0,
  96. &_huff_book_line_1024x27_2sub1,
  97. &_huff_book_line_1024x27_3sub1,
  98. &_huff_book_line_1024x27_3sub2,
  99. &_huff_book_line_1024x27_3sub3,
  100. &_huff_book_line_1024x27_4sub1,
  101. &_huff_book_line_1024x27_4sub2,
  102. &_huff_book_line_1024x27_4sub3,
  103. };
  104. static const static_codebook*const _floor_2048x27_books[]={
  105. &_huff_book_line_2048x27_class1,
  106. &_huff_book_line_2048x27_class2,
  107. &_huff_book_line_2048x27_class3,
  108. &_huff_book_line_2048x27_class4,
  109. &_huff_book_line_2048x27_0sub0,
  110. &_huff_book_line_2048x27_1sub0,
  111. &_huff_book_line_2048x27_1sub1,
  112. &_huff_book_line_2048x27_2sub0,
  113. &_huff_book_line_2048x27_2sub1,
  114. &_huff_book_line_2048x27_3sub1,
  115. &_huff_book_line_2048x27_3sub2,
  116. &_huff_book_line_2048x27_3sub3,
  117. &_huff_book_line_2048x27_4sub1,
  118. &_huff_book_line_2048x27_4sub2,
  119. &_huff_book_line_2048x27_4sub3,
  120. };
  121. static const static_codebook*const _floor_512x17_books[]={
  122. &_huff_book_line_512x17_class1,
  123. &_huff_book_line_512x17_class2,
  124. &_huff_book_line_512x17_class3,
  125. &_huff_book_line_512x17_0sub0,
  126. &_huff_book_line_512x17_1sub0,
  127. &_huff_book_line_512x17_1sub1,
  128. &_huff_book_line_512x17_2sub1,
  129. &_huff_book_line_512x17_2sub2,
  130. &_huff_book_line_512x17_2sub3,
  131. &_huff_book_line_512x17_3sub1,
  132. &_huff_book_line_512x17_3sub2,
  133. &_huff_book_line_512x17_3sub3,
  134. };
  135. static const static_codebook*const _floor_Xx0_books[]={
  136. 0
  137. };
  138. static const static_codebook*const *const _floor_books[11]={
  139. _floor_128x4_books,
  140. _floor_256x4_books,
  141. _floor_128x7_books,
  142. _floor_256x7_books,
  143. _floor_128x11_books,
  144. _floor_128x17_books,
  145. _floor_256x4low_books,
  146. _floor_1024x27_books,
  147. _floor_2048x27_books,
  148. _floor_512x17_books,
  149. _floor_Xx0_books,
  150. };
  151. static const vorbis_info_floor1 _floor[11]={
  152. /* 0: 128 x 4 */
  153. {
  154. 1,{0},{4},{2},{0},
  155. {{1,2,3,4}},
  156. 4,{0,128, 33,8,16,70},
  157. 60,30,500, 1.,18., 128
  158. },
  159. /* 1: 256 x 4 */
  160. {
  161. 1,{0},{4},{2},{0},
  162. {{1,2,3,4}},
  163. 4,{0,256, 66,16,32,140},
  164. 60,30,500, 1.,18., 256
  165. },
  166. /* 2: 128 x 7 */
  167. {
  168. 2,{0,1},{3,4},{2,2},{0,1},
  169. {{-1,2,3,4},{-1,5,6,7}},
  170. 4,{0,128, 14,4,58, 2,8,28,90},
  171. 60,30,500, 1.,18., 128
  172. },
  173. /* 3: 256 x 7 */
  174. {
  175. 2,{0,1},{3,4},{2,2},{0,1},
  176. {{-1,2,3,4},{-1,5,6,7}},
  177. 4,{0,256, 28,8,116, 4,16,56,180},
  178. 60,30,500, 1.,18., 256
  179. },
  180. /* 4: 128 x 11 */
  181. {
  182. 4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  183. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  184. 2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90},
  185. 60,30,500, 1,18., 128
  186. },
  187. /* 5: 128 x 17 */
  188. {
  189. 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  190. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  191. 2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90},
  192. 60,30,500, 1,18., 128
  193. },
  194. /* 6: 256 x 4 (low bitrate version) */
  195. {
  196. 1,{0},{4},{2},{0},
  197. {{1,2,3,4}},
  198. 4,{0,256, 66,16,32,140},
  199. 60,30,500, 1.,18., 256
  200. },
  201. /* 7: 1024 x 27 */
  202. {
  203. 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
  204. {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
  205. 2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556,
  206. 3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850},
  207. 60,30,500, 3,18., 1024
  208. },
  209. /* 8: 2048 x 27 */
  210. {
  211. 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
  212. {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
  213. 2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112,
  214. 6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700},
  215. 60,30,500, 3,18., 2048
  216. },
  217. /* 9: 512 x 17 */
  218. {
  219. 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  220. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  221. 2,{0,512, 46,186, 16,33,65, 93,130,278,
  222. 7,23,39, 55,79,110, 156,232,360},
  223. 60,30,500, 1,18., 512
  224. },
  225. /* 10: X x 0 (LFE floor; edge posts only) */
  226. {
  227. 0,{0}, {0},{0},{-1},
  228. {{-1}},
  229. 2,{0,12},
  230. 60,30,500, 1.,18., 10
  231. },
  232. };