floor_all.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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-2002 *
  9. * by the XIPHOPHORUS Company http://www.xiph.org/ *
  10. * *
  11. ********************************************************************
  12. function: key floor settings
  13. last mod: $Id: floor_all.h,v 1.1 2002/07/11 06:41:04 xiphmont Exp $
  14. ********************************************************************/
  15. #include "../vorbis/codec.h"
  16. #include "backends.h"
  17. #include "books/floor/floor_books.h"
  18. static static_codebook *_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 static_codebook *_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 static_codebook *_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 static_codebook *_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 static_codebook *_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 static_codebook *_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 static_codebook *_floor_512x17_books[]={
  81. &_huff_book_line_512x17_class1,
  82. &_huff_book_line_512x17_class2,
  83. &_huff_book_line_512x17_class3,
  84. &_huff_book_line_512x17_0sub0,
  85. &_huff_book_line_512x17_1sub0,
  86. &_huff_book_line_512x17_1sub1,
  87. &_huff_book_line_512x17_2sub1,
  88. &_huff_book_line_512x17_2sub2,
  89. &_huff_book_line_512x17_2sub3,
  90. &_huff_book_line_512x17_3sub1,
  91. &_huff_book_line_512x17_3sub2,
  92. &_huff_book_line_512x17_3sub3,
  93. };
  94. static static_codebook *_floor_1024x27_books[]={
  95. &_huff_book_line_1024x27_class1,
  96. &_huff_book_line_1024x27_class2,
  97. &_huff_book_line_1024x27_class3,
  98. &_huff_book_line_1024x27_class4,
  99. &_huff_book_line_1024x27_0sub0,
  100. &_huff_book_line_1024x27_1sub0,
  101. &_huff_book_line_1024x27_1sub1,
  102. &_huff_book_line_1024x27_2sub0,
  103. &_huff_book_line_1024x27_2sub1,
  104. &_huff_book_line_1024x27_3sub1,
  105. &_huff_book_line_1024x27_3sub2,
  106. &_huff_book_line_1024x27_3sub3,
  107. &_huff_book_line_1024x27_4sub1,
  108. &_huff_book_line_1024x27_4sub2,
  109. &_huff_book_line_1024x27_4sub3,
  110. };
  111. static static_codebook **_floor_books[10]={
  112. _floor_128x4_books,
  113. _floor_256x4_books,
  114. _floor_128x7_books,
  115. _floor_256x7_books,
  116. _floor_128x11_books,
  117. _floor_128x17_books,
  118. _floor_128x17_books,
  119. _floor_1024x27_books,
  120. _floor_1024x27_books,
  121. _floor_512x17_books,
  122. };
  123. static vorbis_info_floor1 _floor[10]={
  124. /* 128 x 4 */
  125. {
  126. 1,{0},{4},{2},{0},
  127. {{1,2,3,4}},
  128. 4,{0,128, 33,8,16,70},
  129. 60,30,500, 1.,18., -1
  130. },
  131. /* 256 x 4 */
  132. {
  133. 1,{0},{4},{2},{0},
  134. {{1,2,3,4}},
  135. 4,{0,256, 66,16,32,140},
  136. 60,30,500, 1.,18., -1
  137. },
  138. /* 128 x 7 */
  139. {
  140. 2,{0,1},{3,4},{2,2},{0,1},
  141. {{-1,2,3,4},{-1,5,6,7}},
  142. 4,{0,128, 14,4,58, 2,8,28,90},
  143. 60,30,500, 1.,18., -1
  144. },
  145. /* 256 x 7 */
  146. {
  147. 2,{0,1},{3,4},{2,2},{0,1},
  148. {{-1,2,3,4},{-1,5,6,7}},
  149. 4,{0,256, 28,8,116, 4,16,56,180},
  150. 60,30,500, 1.,18., -1
  151. },
  152. /* 128 x 11 */
  153. {
  154. 4,{0,1,2,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  155. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  156. 2,{0,128, 8,33, 4,16,70, 2,6,12, 23,46,90},
  157. 60,30,500, 1,18., -1
  158. },
  159. /* 128 x 17 */
  160. {
  161. 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  162. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  163. 2,{0,128, 12,46, 4,8,16, 23,33,70, 2,6,10, 14,19,28, 39,58,90},
  164. 60,30,500, 1,18., -1
  165. },
  166. /* 1024 x 17 */
  167. {
  168. 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  169. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  170. 2,{0,1024, 93,372, 33,65,130, 186,260,556,
  171. 14,46,79, 111,158,220, 312,464,720},
  172. 60,30,500, 1,18., -1 /* lowpass! */
  173. },
  174. /* 1024 x 27 */
  175. {
  176. 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
  177. {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
  178. 2,{0,1024, 93,23,372, 6,46,186,750, 14,33,65, 130,260,556,
  179. 3,10,18,28, 39,55,79,111, 158,220,312, 464,650,850},
  180. 60,30,500, 3,18., -1 /* lowpass */
  181. },
  182. /* 2048 x 27 */
  183. {
  184. 8,{0,1,2,2,3,3,4,4},{3,4,3,4,3},{0,1,1,2,2},{-1,0,1,2,3},
  185. {{4},{5,6},{7,8},{-1,9,10,11},{-1,12,13,14}},
  186. 2,{0,2048, 186,46,744, 12,92,372,1500, 28,66,130, 260,520,1112,
  187. 6,20,36,56, 78,110,158,222, 316,440,624, 928,1300,1700},
  188. 60,30,500, 3,18., -1 /* lowpass */
  189. },
  190. /* 512 x 17 */
  191. {
  192. 6,{0,1,1,2,3,3},{2,3,3,3},{0,1,2,2},{-1,0,1,2},
  193. {{3},{4,5},{-1,6,7,8},{-1,9,10,11}},
  194. 2,{0,512, 46,186, 16,33,65, 93,130,278,
  195. 7,23,39, 55,79,110, 156,232,360},
  196. 60,30,500, 1,18., -1 /* lowpass! */
  197. },
  198. };