vorbis_enc_data.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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, 13,
  25. };
  26. static const uint8_t codebook1[] = {
  27. 1, 4, 2, 6, 3, 7, 5, 7,
  28. };
  29. static const uint8_t codebook2[] = {
  30. 1, 5, 7, 21, 5, 8, 9, 21, 10, 9, 12, 20, 20, 16, 20,
  31. 20, 4, 8, 9, 20, 6, 8, 9, 20, 11, 11, 13, 20, 20, 15,
  32. 17, 20, 9, 11, 14, 20, 8, 10, 15, 20, 11, 13, 15, 20, 20,
  33. 20, 20, 20, 20, 20, 20, 20, 13, 20, 20, 20, 18, 18, 20, 20,
  34. 20, 20, 20, 20, 3, 6, 8, 20, 6, 7, 9, 20, 10, 9, 12,
  35. 20, 20, 20, 20, 20, 5, 7, 9, 20, 6, 6, 9, 20, 10, 9,
  36. 12, 20, 20, 20, 20, 20, 8, 10, 13, 20, 8, 9, 12, 20, 11,
  37. 10, 12, 20, 20, 20, 20, 20, 18, 20, 20, 20, 15, 17, 18, 20,
  38. 18, 17, 18, 20, 20, 20, 20, 20, 7, 10, 12, 20, 8, 9, 11,
  39. 20, 14, 13, 14, 20, 20, 20, 20, 20, 6, 9, 12, 20, 7, 8,
  40. 11, 20, 12, 11, 13, 20, 20, 20, 20, 20, 9, 11, 15, 20, 8,
  41. 10, 14, 20, 12, 11, 14, 20, 20, 20, 20, 20, 20, 20, 20, 20,
  42. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 11, 16, 18,
  43. 20, 15, 15, 17, 20, 20, 17, 20, 20, 20, 20, 20, 20, 9, 14,
  44. 16, 20, 12, 12, 15, 20, 17, 15, 18, 20, 20, 20, 20, 20, 16,
  45. 19, 18, 20, 15, 16, 20, 20, 17, 17, 20, 20, 20, 20, 20, 20,
  46. 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,
  47. 20,
  48. };
  49. static const uint8_t codebook3[] = {
  50. 2, 3, 7, 13, 4, 4, 7, 15, 8, 6, 9, 17, 21, 16, 15,
  51. 21, 2, 5, 7, 11, 5, 5, 7, 14, 9, 7, 10, 16, 17, 15,
  52. 16, 21, 4, 7, 10, 17, 7, 7, 9, 15, 11, 9, 11, 16, 21,
  53. 18, 15, 21, 18, 21, 21, 21, 15, 17, 17, 19, 21, 19, 18, 20,
  54. 21, 21, 21, 20,
  55. };
  56. static const uint8_t codebook4[] = {
  57. 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6,
  58. 5, 6, 5, 6, 5, 6, 5, 6, 5, 7, 5, 7, 5, 7, 5,
  59. 7, 5, 8, 6, 8, 6, 8, 6, 9, 6, 9, 6, 10, 6, 10,
  60. 6, 11, 6, 11, 7, 11, 7, 12, 7, 12, 7, 12, 7, 12, 7,
  61. 12, 7, 12, 7, 12, 7, 12, 8, 13, 8, 12, 8, 12, 8, 13,
  62. 8, 13, 9, 13, 9, 13, 9, 13, 9, 12, 10, 12, 10, 13, 10,
  63. 14, 11, 14, 12, 14, 13, 14, 13, 14, 14, 15, 16, 15, 15, 15,
  64. 14, 15, 17, 21, 22, 22, 21, 22, 22, 22, 22, 22, 22, 21, 21,
  65. 21, 21, 21, 21, 21, 21, 21, 21,
  66. };
  67. static const uint8_t codebook5[] = {
  68. 2, 5, 5, 4, 5, 4, 5, 4, 5, 4, 6, 5, 6, 5, 6,
  69. 5, 6, 5, 7, 5, 7, 6, 8, 6, 8, 6, 8, 6, 9, 6,
  70. 9, 6,
  71. };
  72. static const uint8_t codebook6[] = {
  73. 8, 5, 8, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9, 4, 9,
  74. 4, 9, 4, 9, 4, 9, 4, 8, 4, 8, 4, 9, 5, 9, 5,
  75. 9, 5, 9, 5, 9, 6, 10, 6, 10, 7, 10, 8, 11, 9, 11,
  76. 11, 12, 13, 12, 14, 13, 15, 13, 15, 14, 16, 14, 17, 15, 17,
  77. 15, 15, 16, 16, 15, 16, 16, 16, 15, 18, 16, 15, 17, 17, 19,
  78. 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19,
  79. 19, 19, 19, 19, 19, 19,
  80. };
  81. static const uint8_t codebook7[] = {
  82. 1, 5, 5, 5, 5, 5, 5, 5, 6, 5, 6, 5, 6, 5, 6,
  83. 5, 6, 6, 7, 7, 7, 7, 8, 7, 8, 8, 9, 8, 10, 9,
  84. 10, 9,
  85. };
  86. static const uint8_t codebook8[] = {
  87. 4, 3, 4, 3, 4, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6,
  88. 5, 7, 5, 7, 6, 7, 6, 8, 7, 8, 7, 8, 7, 9, 8,
  89. 9, 9, 9, 9, 10, 10, 10, 11, 9, 12, 9, 12, 9, 15, 10,
  90. 14, 9, 13, 10, 13, 10, 12, 10, 12, 10, 13, 10, 12, 11, 13,
  91. 11, 14, 12, 13, 13, 14, 14, 13, 14, 15, 14, 16, 13, 13, 14,
  92. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  93. 16, 16, 16, 16, 15, 15,
  94. };
  95. static const uint8_t codebook9[] = {
  96. 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4, 4, 4, 4, 5,
  97. 5, 5,
  98. };
  99. static const uint8_t codebook10[] = {
  100. 3, 3, 4, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 5,
  101. 7, 5, 8, 6, 8, 6, 9, 7, 10, 7, 10, 8, 10, 8, 11,
  102. 9, 11,
  103. };
  104. static const uint8_t codebook11[] = {
  105. 3, 7, 3, 8, 3, 10, 3, 8, 3, 9, 3, 8, 4, 9, 4,
  106. 9, 5, 9, 6, 10, 6, 9, 7, 11, 7, 12, 9, 13, 10, 13,
  107. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  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,
  111. };
  112. static const uint8_t codebook12[] = {
  113. 4, 5, 4, 5, 4, 5, 4, 5, 3, 5, 3, 5, 3, 5, 4,
  114. 5, 4,
  115. };
  116. static const uint8_t codebook13[] = {
  117. 4, 2, 4, 2, 5, 3, 5, 4, 6, 6, 6, 7, 7, 8, 7,
  118. 8, 7, 8, 7, 9, 8, 9, 8, 9, 8, 10, 8, 11, 9, 12,
  119. 9, 12,
  120. };
  121. static const uint8_t codebook14[] = {
  122. 2, 5, 2, 6, 3, 6, 4, 7, 4, 7, 5, 9, 5, 11, 6,
  123. 11, 6, 11, 7, 11, 6, 11, 6, 11, 9, 11, 8, 11, 11, 11,
  124. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 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, 10, 10, 10,
  127. 10, 10, 10,
  128. };
  129. static const uint8_t codebook15[] = {
  130. 5, 6, 11, 11, 11, 11, 10, 10, 12, 11, 5, 2, 11, 5, 6,
  131. 6, 7, 9, 11, 13, 13, 10, 7, 11, 6, 7, 8, 9, 10, 12,
  132. 11, 5, 11, 6, 8, 7, 9, 11, 14, 15, 11, 6, 6, 8, 4,
  133. 5, 7, 8, 10, 13, 10, 5, 7, 7, 5, 5, 6, 8, 10, 11,
  134. 10, 7, 7, 8, 6, 5, 5, 7, 9, 9, 11, 8, 8, 11, 8,
  135. 7, 6, 6, 7, 9, 12, 11, 10, 13, 9, 9, 7, 7, 7, 9,
  136. 11, 13, 12, 15, 12, 11, 9, 8, 8, 8,
  137. };
  138. static const uint8_t codebook16[] = {
  139. 2, 4, 4, 0, 0, 0, 0, 0, 0, 5, 6, 6, 0, 0, 0,
  140. 0, 0, 0, 5, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  141. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  142. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0, 0,
  271. 5, 7, 7, 0, 0, 0, 7, 7, 0, 0, 0, 7, 7, 0, 0,
  272. 0, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  273. 0, 0, 0, 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, 8, 10, 10, 0, 0,
  278. 0, 9, 9, 0, 0, 0, 9, 9, 0, 0, 0, 10, 10, 0, 0,
  279. 0, 0, 0, 0, 0, 8, 10, 10, 0, 0, 0, 9, 9, 0, 0,
  280. 0, 9, 9, 0, 0, 0, 10, 10,
  281. };
  282. static const uint8_t codebook18[] = {
  283. 2, 4, 3, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  284. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 6, 6,
  285. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  286. 0, 0, 0, 0, 0, 4, 4, 4, 6, 6, 0, 0, 0, 0, 0,
  287. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  288. 6, 6, 6, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  289. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 7, 9, 9,
  290. };
  291. static const uint8_t codebook19[] = {
  292. 2, 3, 3, 6, 6, 0, 0, 0, 0, 0, 4, 4, 6, 6, 0,
  293. 0, 0, 0, 0, 4, 4, 6, 6, 0, 0, 0, 0, 0, 5, 5,
  294. 6, 6, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 0, 0, 0,
  295. 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0,
  296. 0, 0, 0, 0, 0, 0, 9, 9,
  297. };
  298. static const uint8_t codebook20[] = {
  299. 1, 3, 4, 6, 6, 7, 7, 9, 9, 0, 5, 5, 7, 7, 7,
  300. 8, 9, 9, 0, 5, 5, 7, 7, 8, 8, 9, 9, 0, 7, 7,
  301. 8, 8, 8, 8, 10, 10, 0, 0, 0, 8, 8, 8, 8, 10, 10,
  302. 0, 0, 0, 9, 9, 9, 9, 10, 10, 0, 0, 0, 9, 9, 9,
  303. 9, 10, 10, 0, 0, 0, 10, 10, 10, 10, 11, 11, 0, 0, 0,
  304. 0, 0, 10, 10, 11, 11,
  305. };
  306. static const uint8_t codebook21[] = {
  307. 2, 3, 3, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10,
  308. 11, 10, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10,
  309. 10, 10, 11, 11, 0, 5, 5, 7, 7, 8, 8, 9, 9, 9, 9,
  310. 10, 10, 10, 10, 11, 11, 0, 6, 6, 7, 7, 8, 8, 9, 9,
  311. 9, 9, 10, 10, 11, 11, 11, 11, 0, 0, 0, 7, 7, 8, 8,
  312. 9, 9, 9, 9, 10, 10, 11, 11, 11, 12, 0, 0, 0, 8, 8,
  313. 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0, 0, 0,
  314. 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 0,
  315. 0, 0, 9, 9, 9, 9, 10, 10, 10, 10, 11, 10, 11, 11, 12,
  316. 12, 0, 0, 0, 0, 0, 9, 9, 10, 10, 10, 10, 11, 11, 11,
  317. 11, 12, 12, 0, 0, 0, 0, 0, 9, 8, 9, 9, 10, 10, 11,
  318. 11, 12, 12, 12, 12, 0, 0, 0, 0, 0, 8, 8, 9, 9, 10,
  319. 10, 11, 11, 12, 11, 12, 12, 0, 0, 0, 0, 0, 9, 10, 10,
  320. 10, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 0,
  321. 0, 10, 10, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0,
  322. 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 0, 0,
  323. 0, 0, 0, 0, 0, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13,
  324. 0, 0, 0, 0, 0, 0, 0, 11, 11, 12, 12, 12, 12, 13, 13,
  325. 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12,
  326. 13, 13, 13, 13,
  327. };
  328. static const uint8_t codebook22[] = {
  329. 1, 4, 4, 7, 6, 6, 7, 6, 6, 4, 7, 7, 10, 9, 9,
  330. 11, 9, 9, 4, 7, 7, 10, 9, 9, 11, 9, 9, 7, 10, 10,
  331. 11, 11, 10, 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10,
  332. 6, 9, 9, 11, 10, 10, 11, 10, 10, 7, 11, 11, 11, 11, 11,
  333. 12, 11, 11, 6, 9, 9, 11, 10, 10, 11, 10, 10, 6, 9, 9,
  334. 11, 10, 10, 11, 10, 10,
  335. };
  336. static const uint8_t codebook23[] = {
  337. 2, 4, 4, 6, 6, 7, 7, 7, 7, 8, 8, 10, 5, 5, 6,
  338. 6, 7, 7, 8, 8, 8, 8, 10, 5, 5, 6, 6, 7, 7, 8,
  339. 8, 8, 8, 10, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 10,
  340. 10, 10, 7, 7, 8, 7, 8, 8, 8, 8, 10, 10, 10, 8, 8,
  341. 8, 8, 8, 8, 8, 8, 10, 10, 10, 7, 8, 8, 8, 8, 8,
  342. 8, 8, 10, 10, 10, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10,
  343. 10, 10, 10, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 9,
  344. 9, 8, 8, 9, 8, 10, 10, 10, 10, 10, 8, 8, 8, 8, 8,
  345. 8,
  346. };
  347. static const uint8_t codebook24[] = {
  348. 1, 4, 4, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 6, 5,
  349. 5, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 7, 5, 5, 7,
  350. 7, 8, 8, 8, 8, 9, 9, 11, 10, 0, 8, 8, 8, 8, 9,
  351. 9, 9, 9, 10, 10, 11, 11, 0, 8, 8, 8, 8, 9, 9, 9,
  352. 9, 10, 10, 11, 11, 0, 12, 12, 9, 9, 10, 10, 10, 10, 11,
  353. 11, 11, 12, 0, 13, 13, 9, 9, 10, 10, 10, 10, 11, 11, 12,
  354. 12, 0, 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0,
  355. 0, 0, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 0, 0, 0,
  356. 14, 14, 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 14, 14,
  357. 11, 11, 11, 11, 12, 12, 13, 13, 0, 0, 0, 0, 0, 12, 12,
  358. 12, 12, 13, 13, 14, 13, 0, 0, 0, 0, 0, 13, 13, 12, 12,
  359. 13, 12, 14, 13,
  360. };
  361. static const uint8_t codebook25[] = {
  362. 2, 4, 4, 5, 5, 6, 5, 5, 5, 5, 6, 4, 5, 5, 5,
  363. 6, 5, 5, 5, 5, 6, 6, 6, 5, 5,
  364. };
  365. static const uint8_t codebook26[] = {
  366. 1, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 9,
  367. 8, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 9, 7, 12,
  368. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12,
  369. 12, 12, 12, 12, 12, 12, 12, 12, 12, 11, 12, 12, 12, 12, 12,
  370. 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 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, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  376. 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
  377. 11, 11, 11, 11,
  378. };
  379. static const uint8_t codebook27[] = {
  380. 1, 4, 4, 6, 6, 7, 7, 8, 7, 9, 9, 10, 10, 10, 10,
  381. 6, 5, 5, 7, 7, 8, 8, 10, 8, 11, 10, 12, 12, 13, 13,
  382. 6, 5, 5, 7, 7, 8, 8, 10, 9, 11, 11, 12, 12, 13, 12,
  383. 18, 8, 8, 8, 8, 9, 9, 10, 9, 11, 10, 12, 12, 13, 13,
  384. 18, 8, 8, 8, 8, 9, 9, 10, 10, 11, 11, 13, 12, 14, 13,
  385. 18, 11, 11, 9, 9, 10, 10, 11, 11, 11, 12, 13, 12, 13, 14,
  386. 18, 11, 11, 9, 8, 11, 10, 11, 11, 11, 11, 12, 12, 14, 13,
  387. 18, 18, 18, 10, 11, 10, 11, 12, 12, 12, 12, 13, 12, 14, 13,
  388. 18, 18, 18, 10, 11, 11, 9, 12, 11, 12, 12, 12, 13, 13, 13,
  389. 18, 18, 17, 14, 14, 11, 11, 12, 12, 13, 12, 14, 12, 14, 13,
  390. 18, 18, 18, 14, 14, 11, 10, 12, 9, 12, 13, 13, 13, 13, 13,
  391. 18, 18, 17, 16, 18, 13, 13, 12, 12, 13, 11, 14, 12, 14, 14,
  392. 17, 18, 18, 17, 18, 13, 12, 13, 10, 12, 11, 14, 14, 14, 14,
  393. 17, 18, 18, 18, 18, 15, 16, 12, 12, 13, 10, 14, 12, 14, 15,
  394. 18, 18, 18, 16, 17, 16, 14, 12, 11, 13, 10, 13, 13, 14, 15,
  395. };
  396. static const uint8_t codebook28[] = {
  397. 2, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
  398. 8, 8, 10, 6, 6, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9,
  399. 9, 9, 9, 9, 10, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
  400. 9, 9, 9, 9, 9, 9, 10, 7, 7, 7, 7, 8, 8, 8, 8,
  401. 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 7, 7, 8, 8,
  402. 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 11, 11, 11, 8, 8,
  403. 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10,
  404. 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10,
  405. 10, 10, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10,
  406. 9, 10, 10, 10, 11, 11, 9, 9, 9, 9, 9, 9, 9, 9, 9,
  407. 9, 9, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9, 9, 10,
  408. 10, 9, 9, 10, 9, 11, 10, 11, 11, 11, 9, 9, 9, 9, 9,
  409. 9, 9, 9, 10, 10, 10, 9, 11, 11, 11, 11, 11, 9, 9, 9,
  410. 9, 10, 10, 9, 9, 9, 9, 10, 9, 11, 11, 11, 11, 11, 11,
  411. 11, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11,
  412. 11, 11, 11, 10, 9, 10, 10, 9, 10, 9, 9, 10, 9, 11, 10,
  413. 10, 11, 11, 11, 11, 9, 10, 9, 9, 9, 9, 10, 10, 10, 10,
  414. 11, 11, 11, 11, 11, 11, 10, 10, 10, 9, 9, 10, 9, 10, 9,
  415. 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 9, 9, 9, 9,
  416. 9, 10, 10, 10,
  417. };
  418. static const struct {
  419. int dim;
  420. int len;
  421. int real_len;
  422. const uint8_t *clens;
  423. int lookup;
  424. float min;
  425. float delta;
  426. const uint8_t *quant;
  427. } cvectors[] = {
  428. { 2, 16, 16, codebook0, 0 },
  429. { 2, 8, 8, codebook1, 0 },
  430. { 2, 256, 256, codebook2, 0 },
  431. { 2, 64, 64, codebook3, 0 },
  432. { 2, 128, 128, codebook4, 0 },
  433. { 2, 32, 32, codebook5, 0 },
  434. { 2, 96, 96, codebook6, 0 },
  435. { 2, 32, 32, codebook7, 0 },
  436. { 2, 96, 96, codebook8, 0 },
  437. { 2, 17, 17, codebook9, 0 },
  438. { 2, 32, 32, codebook10, 0 },
  439. { 2, 78, 78, codebook11, 0 },
  440. { 2, 17, 17, codebook12, 0 },
  441. { 2, 32, 32, codebook13, 0 },
  442. { 2, 78, 78, codebook14, 0 },
  443. { 2, 100, 100, codebook15, 0 },
  444. { 8, 1641, 6561, codebook16, 1, -1.0, 1.0, (const uint8_t[]){ 1, 0, 2, } },
  445. { 4, 443, 625, codebook17, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  446. { 4, 105, 625, codebook18, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  447. { 2, 68, 81, codebook19, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } },
  448. { 2, 81, 81, codebook20, 1, -4.0, 1.0, (const uint8_t[]){ 4, 3, 5, 2, 6, 1, 7, 0, 8, } },
  449. { 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, } },
  450. { 4, 81, 81, codebook22, 1, -11.0, 11.0, (const uint8_t[]){ 1, 0, 2, } },
  451. { 2, 121, 121, codebook23, 1, -5.0, 1.0, (const uint8_t[]){ 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, } },
  452. { 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, } },
  453. { 2, 25, 25, codebook25, 1, -2.0, 1.0, (const uint8_t[]){ 2, 1, 3, 0, 4, } },
  454. { 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, } },
  455. { 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, } },
  456. { 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, } },
  457. };
  458. static const struct {
  459. int dim;
  460. int subclass;
  461. int masterbook;
  462. const int nbooks[4];
  463. } floor_classes[] = {
  464. { 3, 0, 0, { 4 } },
  465. { 4, 1, 0, { 5, 6 } },
  466. { 3, 1, 1, { 7, 8 } },
  467. { 4, 2, 2, { -1, 9, 10, 11 } },
  468. { 3, 2, 3, { -1, 12, 13, 14 } },
  469. };
  470. #endif /* AVCODEC_VORBIS_ENC_DATA_H */