vorbis_enc_data.h 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. /*
  2. * copyright (c) 2006 Oded Shimon <ods15@ods15.dyndns.org>
  3. *
  4. * This file is part of FFmpeg.
  5. *
  6. * FFmpeg is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * FFmpeg is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with FFmpeg; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  19. */
  20. #ifndef AVCODEC_VORBIS_ENC_DATA_H
  21. #define AVCODEC_VORBIS_ENC_DATA_H
  22. #include <stdint.h>
  23. static const uint8_t codebook0[] = {
  24. 2, 10, 8, 14, 7, 12, 11, 14, 1, 5, 3, 7, 4, 9, 7,
  25. 13,
  26. };
  27. static const uint8_t codebook1[] = {
  28. 1, 4, 2, 6, 3, 7, 5, 7,
  29. };
  30. static const uint8_t codebook2[] = {
  31. 1, 5, 7, 21, 5, 8, 9, 21, 10, 9, 12, 20, 20, 16, 20,
  32. 20, 4, 8, 9, 20, 6, 8, 9, 20, 11, 11, 13, 20, 20, 15,
  33. 17, 20, 9, 11, 14, 20, 8, 10, 15, 20, 11, 13, 15, 20, 20,
  34. 20, 20, 20, 20, 20, 20, 20, 13, 20, 20, 20, 18, 18, 20, 20,
  35. 20, 20, 20, 20, 3, 6, 8, 20, 6, 7, 9, 20, 10, 9, 12,
  36. 20, 20, 20, 20, 20, 5, 7, 9, 20, 6, 6, 9, 20, 10, 9,
  37. 12, 20, 20, 20, 20, 20, 8, 10, 13, 20, 8, 9, 12, 20, 11,
  38. 10, 12, 20, 20, 20, 20, 20, 18, 20, 20, 20, 15, 17, 18, 20,
  39. 18, 17, 18, 20, 20, 20, 20, 20, 7, 10, 12, 20, 8, 9, 11,
  40. 20, 14, 13, 14, 20, 20, 20, 20, 20, 6, 9, 12, 20, 7, 8,
  41. 11, 20, 12, 11, 13, 20, 20, 20, 20, 20, 9, 11, 15, 20, 8,
  42. 10, 14, 20, 12, 11, 14, 20, 20, 20, 20, 20, 20, 20, 20, 20,
  43. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 11, 16, 18,
  44. 20, 15, 15, 17, 20, 20, 17, 20, 20, 20, 20, 20, 20, 9, 14,
  45. 16, 20, 12, 12, 15, 20, 17, 15, 18, 20, 20, 20, 20, 20, 16,
  46. 19, 18, 20, 15, 16, 20, 20, 17, 17, 20, 20, 20, 20, 20, 20,
  47. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
  48. 20,
  49. };
  50. static const uint8_t codebook3[] = {
  51. 2, 3, 7, 13, 4, 4, 7, 15, 8, 6, 9, 17, 21, 16, 15,
  52. 21, 2, 5, 7, 11, 5, 5, 7, 14, 9, 7, 10, 16, 17, 15,
  53. 16, 21, 4, 7, 10, 17, 7, 7, 9, 15, 11, 9, 11, 16, 21,
  54. 18, 15, 21, 18, 21, 21, 21, 15, 17, 17, 19, 21, 19, 18, 20,
  55. 21, 21, 21, 20,
  56. };
  57. static const uint8_t codebook4[] = {
  58. 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
  59. 5, 6, 5, 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 5,
  60. 7, 5, 8, 6, 8, 6, 8, 6, 9, 6, 9, 6, 10, 6, 10,
  61. 6, 11, 6, 11, 7, 11, 7, 12, 7, 12, 7, 12, 7, 12, 7,
  62. 12, 7, 12, 7, 12, 7, 12, 8, 13, 8, 12, 8, 12, 8, 13,
  63. 8, 13, 9, 13, 9, 13, 9, 13, 9, 12, 10, 12, 10, 13, 10,
  64. 14, 11, 14, 12, 14, 13, 14, 13, 14, 14, 15, 16, 15, 15, 15,
  65. 14, 15, 17, 21, 22, 22, 21, 22, 22, 22, 22, 22, 22, 21, 21,
  66. 21, 21, 21, 21, 21, 21, 21, 21,
  67. };
  68. static const uint8_t codebook5[] = {
  69. 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 6, 5, 6, 5, 6,
  70. 5, 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 6, 9, 6,
  71. 9, 6,
  72. };
  73. static const uint8_t codebook6[] = {
  74. 8, 5, 8, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9,
  75. 4, 9, 4, 9, 4, 9, 4, 8, 4, 8, 4, 9, 5, 9, 5,
  76. 9, 5, 9, 5, 9, 6, 10, 6, 10, 7, 10, 8, 11, 9, 11,
  77. 11, 12, 13, 12, 14, 13, 15, 13, 15, 14, 16, 14, 17, 15, 17,
  78. 15, 15, 16, 16, 15, 16, 16, 16, 15, 18, 16, 15, 17, 17, 19,
  79. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
  80. 19, 19, 19, 19, 19, 19,
  81. };
  82. static const uint8_t codebook7[] = {
  83. 1, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6,
  84. 5, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 9, 8, 10, 9,
  85. 10, 9,
  86. };
  87. static const uint8_t codebook8[] = {
  88. 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6,
  89. 5, 7, 5, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 9, 8,
  90. 9, 9, 9, 9, 10, 10, 10, 11, 9, 12, 9, 12, 9, 15, 10,
  91. 14, 9, 13, 10, 13, 10, 12, 10, 12, 10, 13, 10, 12, 11, 13,
  92. 11, 14, 12, 13, 13, 14, 14, 13, 14, 15, 14, 16, 13, 13, 14,
  93. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  94. 16, 16, 16, 16, 15, 15,
  95. };
  96. static const uint8_t codebook9[] = {
  97. 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, 4, 5,
  98. 5, 5,
  99. };
  100. static const uint8_t codebook10[] = {
  101. 3, 3, 4, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 5,
  102. 7, 5, 8, 6, 8, 6, 9, 7, 10, 7, 10, 8, 10, 8, 11,
  103. 9, 11,
  104. };
  105. static const uint8_t codebook11[] = {
  106. 3, 7, 3, 8, 3, 10, 3, 8, 3, 9, 3, 8, 4, 9, 4,
  107. 9, 5, 9, 6, 10, 6, 9, 7, 11, 7, 12, 9, 13, 10, 13,
  108. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  109. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  110. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  111. 12, 12, 12,
  112. };
  113. static const uint8_t codebook12[] = {
  114. 4, 5, 4, 5, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4,
  115. 5, 4,
  116. };
  117. static const uint8_t codebook13[] = {
  118. 4, 2, 4, 2, 5, 3, 5, 4, 6, 6, 6, 7, 7, 8, 7,
  119. 8, 7, 8, 7, 9, 8, 9, 8, 9, 8, 10, 8, 11, 9, 12,
  120. 9, 12,
  121. };
  122. static const uint8_t codebook14[] = {
  123. 2, 5, 2, 6, 3, 6, 4, 7, 4, 7, 5, 9, 5, 11, 6,
  124. 11, 6, 11, 7, 11, 6, 11, 6, 11, 9, 11, 8, 11, 11, 11,
  125. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  126. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  127. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 10, 10, 10,
  128. 10, 10, 10,
  129. };
  130. static const uint8_t codebook15[] = {
  131. 5, 6, 11, 11, 11, 11, 10, 10, 12, 11, 5, 2, 11, 5, 6,
  132. 6, 7, 9, 11, 13, 13, 10, 7, 11, 6, 7, 8, 9, 10, 12,
  133. 11, 5, 11, 6, 8, 7, 9, 11, 14, 15, 11, 6, 6, 8, 4,
  134. 5, 7, 8, 10, 13, 10, 5, 7, 7, 5, 5, 6, 8, 10, 11,
  135. 10, 7, 7, 8, 6, 5, 5, 7, 9, 9, 11, 8, 8, 11, 8,
  136. 7, 6, 6, 7, 9, 12, 11, 10, 13, 9, 9, 7, 7, 7, 9,
  137. 11, 13, 12, 15, 12, 11, 9, 8, 8, 8,
  138. };
  139. static const uint8_t codebook16[] = {
  140. 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0,
  141. 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  142. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  143. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 7, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
  272. 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0,
  273. 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  274. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  275. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  276. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  277. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  278. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 10, 10, 0, 0,
  279. 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0, 10, 10, 0, 0,
  280. 0, 0, 0, 0, 0, 8, 10, 10, 0, 0, 0, 9, 9, 0, 0,
  281. 0, 9, 9, 0, 0, 0, 10, 10,
  282. };
  283. static const uint8_t codebook18[] = {
  284. 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  285. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6,
  286. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  287. 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0,
  288. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  289. 6, 6, 6, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  290. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 7, 9, 9,
  291. };
  292. static const uint8_t codebook19[] = {
  293. 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0,
  294. 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5,
  295. 6, 6, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0,
  296. 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0,
  297. 0, 0, 0, 0, 0, 0, 9, 9,
  298. };
  299. static const uint8_t codebook20[] = {
  300. 1, 3, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 7,
  301. 8, 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7,
  302. 8, 8, 8, 8, 10, 10, 0, 0, 0, 8, 8, 8, 8, 10, 10,
  303. 0, 0, 0, 9, 9, 9, 9, 10, 10, 0, 0, 0, 9, 9, 9,
  304. 9, 10, 10, 0, 0, 0, 10, 10, 10, 10, 11, 11, 0, 0, 0,
  305. 0, 0, 10, 10, 11, 11,
  306. };
  307. static const uint8_t codebook21[] = {
  308. 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10,
  309. 11, 10, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10,
  310. 10, 10, 11, 11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,
  311. 10, 10, 10, 10, 11, 11, 0, 6, 6, 7, 7, 8, 8, 9, 9,
  312. 9, 9, 10, 10, 11, 11, 11, 11, 0, 0, 0, 7, 7, 8, 8,
  313. 9, 9, 9, 9, 10, 10, 11, 11, 11, 12, 0, 0, 0, 8, 8,
  314. 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0, 0, 0,
  315. 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0,
  316. 0, 0, 9, 9, 9, 9, 10, 10, 10, 10, 11, 10, 11, 11, 12,
  317. 12, 0, 0, 0, 0, 0, 9, 9, 10, 10, 10, 10, 11, 11, 11,
  318. 11, 12, 12, 0, 0, 0, 0, 0, 9, 8, 9, 9, 10, 10, 11,
  319. 11, 12, 12, 12, 12, 0, 0, 0, 0, 0, 8, 8, 9, 9, 10,
  320. 10, 11, 11, 12, 11, 12, 12, 0, 0, 0, 0, 0, 9, 10, 10,
  321. 10, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 0,
  322. 0, 10, 10, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0,
  323. 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 0, 0,
  324. 0, 0, 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13,
  325. 0, 0, 0, 0, 0, 0, 0, 11, 11, 12, 12, 12, 12, 13, 13,
  326. 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12,
  327. 13, 13, 13, 13,
  328. };
  329. static const uint8_t codebook22[] = {
  330. 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7, 10, 9, 9,
  331. 11, 9, 9, 4, 7, 7, 10, 9, 9, 11, 9, 9, 7, 10, 10,
  332. 11, 11, 10, 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10,
  333. 6, 9, 9, 11, 10, 10, 11, 10, 10, 7, 11, 11, 11, 11, 11,
  334. 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10, 6, 9, 9,
  335. 11, 10, 10, 11, 10, 10,
  336. };
  337. static const uint8_t codebook23[] = {
  338. 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 10, 5, 5, 6,
  339. 6, 7, 7, 8, 8, 8, 8, 10, 5, 5, 6, 6, 7, 7, 8,
  340. 8, 8, 8, 10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 10,
  341. 10, 10, 7, 7, 8, 7, 8, 8, 8, 8, 10, 10, 10, 8, 8,
  342. 8, 8, 8, 8, 8, 8, 10, 10, 10, 7, 8, 8, 8, 8, 8,
  343. 8, 8, 10, 10, 10, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10,
  344. 10, 10, 10, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 9,
  345. 9, 8, 8, 9, 8, 10, 10, 10, 10, 10, 8, 8, 8, 8, 8,
  346. 8,
  347. };
  348. static const uint8_t codebook24[] = {
  349. 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 6, 5,
  350. 5, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 7, 5, 5, 7,
  351. 7, 8, 8, 8, 8, 9, 9, 11, 10, 0, 8, 8, 8, 8, 9,
  352. 9, 9, 9, 10, 10, 11, 11, 0, 8, 8, 8, 8, 9, 9, 9,
  353. 9, 10, 10, 11, 11, 0, 12, 12, 9, 9, 10, 10, 10, 10, 11,
  354. 11, 11, 12, 0, 13, 13, 9, 9, 10, 10, 10, 10, 11, 11, 12,
  355. 12, 0, 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0,
  356. 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0, 0, 0,
  357. 14, 14, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 14, 14,
  358. 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 12, 12,
  359. 12, 12, 13, 13, 14, 13, 0, 0, 0, 0, 0, 13, 13, 12, 12,
  360. 13, 12, 14, 13,
  361. };
  362. static const uint8_t codebook25[] = {
  363. 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5,
  364. 6, 5, 5, 5, 5, 6, 6, 6, 5, 5,
  365. };
  366. static const uint8_t codebook26[] = {
  367. 1, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 9,
  368. 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 9, 7, 12,
  369. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  370. 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12,
  371. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  372. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  373. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  374. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  375. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  376. 12, 12, 12, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  377. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  378. 11, 11, 11, 11,
  379. };
  380. static const uint8_t codebook27[] = {
  381. 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 9, 10, 10, 10, 10,
  382. 6, 5, 5, 7, 7, 8, 8, 10, 8, 11, 10, 12, 12, 13, 13,
  383. 6, 5, 5, 7, 7, 8, 8, 10, 9, 11, 11, 12, 12, 13, 12,
  384. 18, 8, 8, 8, 8, 9, 9, 10, 9, 11, 10, 12, 12, 13, 13,
  385. 18, 8, 8, 8, 8, 9, 9, 10, 10, 11, 11, 13, 12, 14, 13,
  386. 18, 11, 11, 9, 9, 10, 10, 11, 11, 11, 12, 13, 12, 13, 14,
  387. 18, 11, 11, 9, 8, 11, 10, 11, 11, 11, 11, 12, 12, 14, 13,
  388. 18, 18, 18, 10, 11, 10, 11, 12, 12, 12, 12, 13, 12, 14, 13,
  389. 18, 18, 18, 10, 11, 11, 9, 12, 11, 12, 12, 12, 13, 13, 13,
  390. 18, 18, 17, 14, 14, 11, 11, 12, 12, 13, 12, 14, 12, 14, 13,
  391. 18, 18, 18, 14, 14, 11, 10, 12, 9, 12, 13, 13, 13, 13, 13,
  392. 18, 18, 17, 16, 18, 13, 13, 12, 12, 13, 11, 14, 12, 14, 14,
  393. 17, 18, 18, 17, 18, 13, 12, 13, 10, 12, 11, 14, 14, 14, 14,
  394. 17, 18, 18, 18, 18, 15, 16, 12, 12, 13, 10, 14, 12, 14, 15,
  395. 18, 18, 18, 16, 17, 16, 14, 12, 11, 13, 10, 13, 13, 14, 15,
  396. };
  397. static const uint8_t codebook28[] = {
  398. 2, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  399. 8, 8, 10, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9,
  400. 9, 9, 9, 9, 10, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
  401. 9, 9, 9, 9, 9, 9, 10, 7, 7, 7, 7, 8, 8, 8, 8,
  402. 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 7, 7, 8, 8,
  403. 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 8, 8,
  404. 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10,
  405. 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10,
  406. 10, 10, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10,
  407. 9, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, 9, 9, 9, 9,
  408. 9, 9, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9, 9, 10,
  409. 10, 9, 9, 10, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9,
  410. 9, 9, 9, 10, 10, 10, 9, 11, 11, 11, 11, 11, 9, 9, 9,
  411. 9, 10, 10, 9, 9, 9, 9, 10, 9, 11, 11, 11, 11, 11, 11,
  412. 11, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11,
  413. 11, 11, 11, 10, 9, 10, 10, 9, 10, 9, 9, 10, 9, 11, 10,
  414. 10, 11, 11, 11, 11, 9, 10, 9, 9, 9, 9, 10, 10, 10, 10,
  415. 11, 11, 11, 11, 11, 11, 10, 10, 10, 9, 9, 10, 9, 10, 9,
  416. 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 9, 9, 9, 9,
  417. 9, 10, 10, 10,
  418. };
  419. static const struct {
  420. int dim;
  421. int len;
  422. int real_len;
  423. const uint8_t * clens;
  424. int lookup;
  425. float min;
  426. float delta;
  427. const uint8_t * quant;
  428. } cvectors[] = {
  429. { 2, 16, 16, codebook0, 0 },
  430. { 2, 8, 8, codebook1, 0 },
  431. { 2, 256, 256, codebook2, 0 },
  432. { 2, 64, 64, codebook3, 0 },
  433. { 2, 128, 128, codebook4, 0 },
  434. { 2, 32, 32, codebook5, 0 },
  435. { 2, 96, 96, codebook6, 0 },
  436. { 2, 32, 32, codebook7, 0 },
  437. { 2, 96, 96, codebook8, 0 },
  438. { 2, 17, 17, codebook9, 0 },
  439. { 2, 32, 32, codebook10, 0 },
  440. { 2, 78, 78, codebook11, 0 },
  441. { 2, 17, 17, codebook12, 0 },
  442. { 2, 32, 32, codebook13, 0 },
  443. { 2, 78, 78, codebook14, 0 },
  444. { 2, 100, 100, codebook15, 0 },
  445. { 8, 1641, 6561, codebook16, 1, -1.0, 1.0, (const uint8_t[]){ 1, 0, 2, } },
  446. { 4, 443, 625, codebook17, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  447. { 4, 105, 625, codebook18, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  448. { 2, 68, 81, codebook19, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } },
  449. { 2, 81, 81, codebook20, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } },
  450. { 2, 289, 289, codebook21, 1, -8.0, 1.0, (const uint8_t[]){ 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, 0, 16, } },
  451. { 4, 81, 81, codebook22, 1, -11.0, 11.0, (const uint8_t[]){ 1, 0, 2, } },
  452. { 2, 121, 121, codebook23, 1, -5.0, 1.0, (const uint8_t[]){ 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, } },
  453. { 2, 169, 169, codebook24, 1, -30.0, 5.0, (const uint8_t[]){ 6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0, 12, } },
  454. { 2, 25, 25, codebook25, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  455. { 2, 169, 169, codebook26, 1, -1530.0, 255.0, (const uint8_t[]){ 6, 5, 7, 4, 8, 3, 9, 2, 10, 1, 11, 0, 12, } },
  456. { 2, 225, 225, codebook27, 1, -119.0, 17.0, (const uint8_t[]){ 7, 6, 8, 5, 9, 4, 10, 3, 11, 2, 12, 1, 13, 0, 14, } },
  457. { 2, 289, 289, codebook28, 1, -8.0, 1.0, (const uint8_t[]){ 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, 0, 16, } },
  458. };
  459. static const struct {
  460. int dim;
  461. int subclass;
  462. int masterbook;
  463. const int * nbooks;
  464. } floor_classes[] = {
  465. { 3, 0, 0, (const int[]){ 4 } },
  466. { 4, 1, 0, (const int[]){ 5, 6 } },
  467. { 3, 1, 1, (const int[]){ 7, 8 } },
  468. { 4, 2, 2, (const int[]){ -1, 9, 10, 11 } },
  469. { 3, 2, 3, (const int[]){ -1, 12, 13, 14 } },
  470. };
  471. #endif /* AVCODEC_VORBIS_ENC_DATA_H */