tscc2data.h 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
  1. /*
  2. * TechSmith Screen Codec 2 (aka Dora) decoder
  3. * Copyright (c) 2012 Konstantin Shishkov
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #ifndef AVCODEC_TSCC2DATA_H
  22. #define AVCODEC_TSCC2DATA_H
  23. #include <stdint.h>
  24. #define NUM_VLC_SETS 13
  25. static const uint16_t tscc2_quants[NUM_VLC_SETS][3] = {
  26. { 655, 861, 1130 }, { 983, 1291, 1695 }, { 1311, 1721, 2260 },
  27. { 1638, 2151, 2825 }, { 1966, 2582, 3390 }, { 2294, 3012, 3955 },
  28. { 2621, 3442, 4520 }, { 2949, 3872, 5085 }, { 3277, 4303, 5650 },
  29. { 3604, 4733, 6215 }, { 3932, 5163, 6780 }, { 4260, 5593, 7345 },
  30. { 4588, 6024, 7910 },
  31. };
  32. #define DC_VLC_COUNT 47
  33. static const uint16_t tscc2_dc_vlc_syms[DC_VLC_COUNT] = {
  34. 0x100, 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9,
  35. 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1,
  36. 0xF0, 0xEF, 0xEE, 0xED, 0xEC, 0xEB, 0xEA, 0x17,
  37. 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10, 0x0F,
  38. 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08, 0x07,
  39. 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
  40. };
  41. static const uint16_t tscc2_dc_vlc_codes[DC_VLC_COUNT] = {
  42. 0x000A, 0x0000, 0x0006, 0x002E, 0x0002, 0x000E, 0x001A, 0x007E,
  43. 0x004E, 0x005A, 0x00E2, 0x01BE, 0x01BA, 0x00BA, 0x0072, 0x0022,
  44. 0x02BE, 0x00BE, 0x033A, 0x03F2, 0x01F2, 0x03A2, 0x0122, 0x0322,
  45. 0x01A2, 0x0172, 0x0372, 0x013A, 0x00CE, 0x02CE, 0x02FE, 0x00FE,
  46. 0x00A2, 0x00F2, 0x003A, 0x01CE, 0x01FE, 0x0062, 0x00DA, 0x003E,
  47. 0x0032, 0x007A, 0x0012, 0x001E, 0x0016, 0x0004, 0x0001,
  48. };
  49. static const uint8_t tscc2_dc_vlc_bits[DC_VLC_COUNT] = {
  50. 5, 3, 5, 6, 6, 7, 7, 8,
  51. 8, 8, 8, 9, 9, 9, 9, 9,
  52. 10, 10, 10, 10, 10, 10, 10, 10,
  53. 10, 10, 10, 10, 10, 10, 10, 10,
  54. 9, 9, 9, 9, 9, 8, 8, 8,
  55. 7, 7, 6, 6, 5, 3, 1,
  56. };
  57. static const uint8_t tscc2_nc_vlc_syms[16] = {
  58. 0x0F, 0x0E, 0x0D, 0x0C, 0x0B, 0x0A, 0x09, 0x08,
  59. 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
  60. };
  61. static const uint16_t tscc2_nc_vlc_codes[NUM_VLC_SETS][16] = {
  62. { 0x0023, 0x0003, 0x0031, 0x0021, 0x0011, 0x0053, 0x0013, 0x0001,
  63. 0x0009, 0x0029, 0x0033, 0x0019, 0x000B, 0x0005, 0x0007, 0x0000, },
  64. { 0x0030, 0x0022, 0x0028, 0x0020, 0x0008, 0x0000, 0x0032, 0x0072,
  65. 0x0010, 0x0002, 0x0012, 0x0018, 0x000A, 0x0004, 0x0006, 0x0001, },
  66. { 0x0032, 0x0038, 0x0020, 0x0008, 0x0002, 0x0018, 0x0072, 0x0000,
  67. 0x0028, 0x0022, 0x0012, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, },
  68. { 0x0032, 0x0010, 0x0072, 0x0030, 0x0022, 0x0038, 0x0008, 0x0028,
  69. 0x0018, 0x0002, 0x0012, 0x0000, 0x000A, 0x0004, 0x0006, 0x0001, },
  70. { 0x0012, 0x0052, 0x0000, 0x0020, 0x0018, 0x0022, 0x0008, 0x0028,
  71. 0x0038, 0x0002, 0x0032, 0x0010, 0x000A, 0x0004, 0x0006, 0x0001, },
  72. { 0x0016, 0x0096, 0x0006, 0x0046, 0x0056, 0x0002, 0x0036, 0x0076,
  73. 0x0012, 0x0022, 0x0032, 0x0026, 0x000A, 0x000E, 0x0000, 0x0001, },
  74. { 0x001A, 0x009A, 0x0032, 0x0072, 0x005A, 0x007A, 0x003A, 0x0002,
  75. 0x0012, 0x0022, 0x000A, 0x002A, 0x0006, 0x000E, 0x0000, 0x0001, },
  76. { 0x002A, 0x00AA, 0x0002, 0x0042, 0x006A, 0x003A, 0x007A, 0x0022,
  77. 0x0032, 0x0012, 0x000A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, },
  78. { 0x0042, 0x00C2, 0x0002, 0x000A, 0x004A, 0x003A, 0x007A, 0x0022,
  79. 0x0012, 0x0032, 0x002A, 0x001A, 0x0006, 0x000E, 0x0000, 0x0001, },
  80. { 0x00BA, 0x01BA, 0x003A, 0x0012, 0x0052, 0x007A, 0x0002, 0x0022,
  81. 0x0032, 0x000A, 0x002A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, },
  82. { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012,
  83. 0x0032, 0x000A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, },
  84. { 0x00AA, 0x01AA, 0x002A, 0x0022, 0x0062, 0x006A, 0x0002, 0x0012,
  85. 0x0032, 0x000A, 0x003A, 0x001A, 0x0000, 0x0004, 0x0006, 0x0001, },
  86. { 0x008A, 0x018A, 0x000A, 0x0022, 0x0062, 0x004A, 0x0002, 0x0012,
  87. 0x0032, 0x002A, 0x001A, 0x003A, 0x0000, 0x0004, 0x0006, 0x0001, },
  88. };
  89. static const uint8_t tscc2_nc_vlc_bits[NUM_VLC_SETS][16] = {
  90. { 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 },
  91. { 6, 6, 6, 6, 6, 6, 7, 7, 6, 6, 6, 5, 4, 3, 3, 1 },
  92. { 7, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 5, 4, 3, 3, 1 },
  93. { 7, 6, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 },
  94. { 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 4, 3, 3, 1 },
  95. { 8, 8, 7, 7, 7, 6, 7, 7, 6, 6, 6, 6, 4, 4, 2, 1 },
  96. { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 },
  97. { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 },
  98. { 8, 8, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 4, 4, 2, 1 },
  99. { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 },
  100. { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 },
  101. { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 },
  102. { 9, 9, 8, 7, 7, 7, 6, 6, 6, 6, 6, 6, 3, 3, 3, 1 },
  103. };
  104. static const uint16_t ac_vlc_desc0_syms[172] = {
  105. 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1,
  106. 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0,
  107. 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5,
  108. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB2, 0xFB1,
  109. 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95, 0xF91, 0xF90,
  110. 0xF83, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70, 0xF61, 0xF60,
  111. 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31, 0xF30, 0xF21,
  112. 0xF20, 0xF10, 0xF00, 0xEF0, 0xEE0, 0xED5, 0xED1, 0xED0,
  113. 0xEC0, 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50,
  114. 0xE40, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE0, 0xDD0,
  115. 0xDC0, 0xDB0, 0xDA0, 0xD90, 0xD80, 0xD60, 0xCD1, 0x280,
  116. 0x270, 0x260, 0x250, 0x240, 0x230, 0x220, 0x210, 0x200,
  117. 0x1F0, 0x1E0, 0x1D0, 0x1C0, 0x1B0, 0x1A1, 0x1A0, 0x190,
  118. 0x180, 0x170, 0x160, 0x150, 0x140, 0x130, 0x121, 0x120,
  119. 0x111, 0x110, 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0,
  120. 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1,
  121. 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070,
  122. 0x065, 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051,
  123. 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036,
  124. 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024,
  125. 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014,
  126. 0x013, 0x012, 0x011, 0x010,
  127. };
  128. static const uint16_t ac_vlc_desc0_codes[172] = {
  129. 0x001F, 0x0D71, 0x013F, 0x006C, 0x00A7, 0x0067, 0x001C, 0x0008,
  130. 0x0005, 0x06F1, 0x002C, 0x04BA, 0x0072, 0x01AA, 0x0002, 0x0006,
  131. 0x06AC, 0x02AF, 0x06EF, 0x018F, 0x000A, 0x0009, 0x02AC, 0x042A,
  132. 0x06E1, 0x068F, 0x00B1, 0x0000, 0x0317, 0x0C17, 0x0612, 0x010F,
  133. 0x0011, 0x0FBA, 0x002A, 0x0172, 0x000C, 0x05AC, 0x03D7, 0x0037,
  134. 0x0E8F, 0x02F2, 0x0041, 0x0BE1, 0x057F, 0x004A, 0x00AF, 0x006F,
  135. 0x06AA, 0x0097, 0x0101, 0x0012, 0x0081, 0x0571, 0x0092, 0x0EAF,
  136. 0x01BF, 0x00D7, 0x0031, 0x0001, 0x01F2, 0x0F17, 0x053A, 0x00BF,
  137. 0x038F, 0x0217, 0x0371, 0x01F1, 0x01BA, 0x022A, 0x02BF, 0x028F,
  138. 0x008F, 0x03F1, 0x00E1, 0x00BA, 0x00F2, 0x0EBF, 0x06AF, 0x048F,
  139. 0x0FE1, 0x0271, 0x07BA, 0x0D3A, 0x0C12, 0x08AC, 0x0717, 0x00AC,
  140. 0x0412, 0x0901, 0x04E1, 0x07E1, 0x0417, 0x0CAF, 0x04AC, 0x01AC,
  141. 0x04F2, 0x03BA, 0x05D7, 0x07F1, 0x01D7, 0x04AF, 0x04EF, 0x03AC,
  142. 0x00AA, 0x01E1, 0x0071, 0x00F1, 0x012C, 0x03EF, 0x082A, 0x0112,
  143. 0x03E1, 0x01FA, 0x0DAC, 0x0131, 0x0E12, 0x000F, 0x0B17, 0x007F,
  144. 0x0AEF, 0x007A, 0x02AA, 0x0061, 0x0671, 0x0027, 0x013A, 0x058F,
  145. 0x00FF, 0x033A, 0x0032, 0x0301, 0x0021, 0x0C8F, 0x037F, 0x0077,
  146. 0x02F1, 0x02E1, 0x003A, 0x003C, 0x0212, 0x0817, 0x0CE1, 0x003F,
  147. 0x0007, 0x0017, 0x0501, 0x02BA, 0x06BF, 0x0057, 0x0010, 0x02EF,
  148. 0x0117, 0x017F, 0x00EF, 0x006A, 0x0019, 0x0171, 0x01EF, 0x06BA,
  149. 0x012A, 0x00FA, 0x0022, 0x000E, 0x0AE1, 0x01AF, 0x0052, 0x002F,
  150. 0x004F, 0x001A, 0x0004, 0x0003,
  151. };
  152. static const uint8_t ac_vlc_desc0_bits[172] = {
  153. 6, 12, 9, 7, 8, 7, 6, 4,
  154. 3, 11, 9, 11, 9, 9, 6, 4,
  155. 11, 11, 11, 11, 7, 5, 11, 11,
  156. 11, 12, 8, 5, 12, 12, 12, 9,
  157. 6, 12, 12, 9, 6, 12, 10, 7,
  158. 12, 10, 7, 12, 11, 7, 11, 8,
  159. 11, 8, 12, 11, 8, 12, 8, 12,
  160. 9, 9, 9, 9, 9, 12, 12, 10,
  161. 10, 10, 10, 10, 10, 10, 11, 11,
  162. 11, 11, 11, 11, 11, 12, 12, 12,
  163. 12, 11, 12, 12, 12, 12, 12, 12,
  164. 12, 12, 12, 12, 12, 12, 11, 11,
  165. 11, 11, 11, 11, 11, 12, 11, 10,
  166. 10, 10, 10, 10, 9, 10, 12, 9,
  167. 12, 9, 12, 9, 12, 9, 12, 9,
  168. 12, 8, 11, 8, 11, 8, 11, 11,
  169. 8, 10, 7, 10, 7, 12, 10, 7,
  170. 11, 12, 9, 6, 11, 12, 12, 9,
  171. 6, 12, 11, 11, 12, 8, 5, 12,
  172. 10, 11, 11, 7, 5, 11, 10, 11,
  173. 9, 9, 6, 4, 12, 9, 7, 8,
  174. 7, 6, 4, 3,
  175. };
  176. static const uint16_t ac_vlc_desc1_syms[169] = {
  177. 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1,
  178. 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0,
  179. 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6, 0xFC5,
  180. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2,
  181. 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95,
  182. 0xF93, 0xF91, 0xF90, 0xF85, 0xF81, 0xF80, 0xF71, 0xF70,
  183. 0xF61, 0xF60, 0xF51, 0xF50, 0xF45, 0xF41, 0xF40, 0xF31,
  184. 0xF30, 0xF21, 0xF20, 0xF11, 0xF10, 0xF01, 0xF00, 0xEF1,
  185. 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC6, 0xEC0, 0xEB6, 0xEB0,
  186. 0xEA0, 0xE90, 0xE80, 0xE70, 0xE60, 0xE50, 0xE40, 0xE33,
  187. 0xE31, 0xE30, 0xE20, 0xE10, 0xE00, 0xDF0, 0xDE1, 0xDE0,
  188. 0xDC0, 0xDB0, 0xDA0, 0x250, 0x240, 0x1F0, 0x1E0, 0x1D0,
  189. 0x1C0, 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150,
  190. 0x140, 0x130, 0x120, 0x111, 0x110, 0x101, 0x100, 0x0F1,
  191. 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C6, 0x0C1, 0x0C0,
  192. 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x095, 0x091, 0x090, 0x085,
  193. 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061,
  194. 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x046, 0x045,
  195. 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x033, 0x032,
  196. 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021,
  197. 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011,
  198. 0x010,
  199. };
  200. static const uint16_t ac_vlc_desc1_codes[169] = {
  201. 0x0019, 0x027D, 0x0084, 0x0044, 0x009D, 0x003D, 0x000A, 0x0002,
  202. 0x0003, 0x00EA, 0x02FD, 0x017A, 0x01C6, 0x00B6, 0x0026, 0x000E,
  203. 0x0095, 0x0260, 0x032A, 0x0360, 0x0006, 0x0005, 0x05B6, 0x036A,
  204. 0x06F6, 0x0704, 0x00FA, 0x0010, 0x0279, 0x04D4, 0x00F6, 0x066A,
  205. 0x001D, 0x0029, 0x05F9, 0x0846, 0x04F6, 0x01D4, 0x0038, 0x0446,
  206. 0x0160, 0x031D, 0x0075, 0x0054, 0x02D4, 0x005A, 0x05FD, 0x0040,
  207. 0x06EA, 0x0055, 0x0460, 0x009A, 0x052A, 0x00A0, 0x00D8, 0x0380,
  208. 0x017D, 0x092A, 0x00F9, 0x0D7A, 0x0179, 0x0304, 0x002A, 0x0104,
  209. 0x01A0, 0x0780, 0x007D, 0x03F9, 0x0C46, 0x03EA, 0x0E6A, 0x0204,
  210. 0x01FD, 0x051D, 0x02AA, 0x05EA, 0x00AA, 0x0080, 0x067D, 0x09EA,
  211. 0x0C95, 0x09F9, 0x07B6, 0x0DB6, 0x012A, 0x0904, 0x0454, 0x0FB6,
  212. 0x0960, 0x08D4, 0x0495, 0x0F80, 0x0560, 0x0B04, 0x057A, 0x0079,
  213. 0x0795, 0x0E7D, 0x0060, 0x076A, 0x03B6, 0x0395, 0x0180, 0x02A0,
  214. 0x006A, 0x0195, 0x0295, 0x0646, 0x03FD, 0x01F9, 0x0154, 0x0DF9,
  215. 0x00C6, 0x0F95, 0x01F6, 0x0480, 0x0000, 0x0A79, 0x04AA, 0x00E0,
  216. 0x0246, 0x001A, 0x0479, 0x0015, 0x0D60, 0x0280, 0x0018, 0x01EA,
  217. 0x037A, 0x003A, 0x011D, 0x00FD, 0x0035, 0x0A7D, 0x04A0, 0x0146,
  218. 0x0024, 0x01B6, 0x0504, 0x0046, 0x0020, 0x0009, 0x00D4, 0x03AA,
  219. 0x0679, 0x026A, 0x0036, 0x0008, 0x02F6, 0x01AA, 0x016A, 0x0254,
  220. 0x0039, 0x000D, 0x0004, 0x0176, 0x02EA, 0x007A, 0x0076, 0x0016,
  221. 0x0001, 0x0879, 0x0058, 0x0014, 0x00D5, 0x005D, 0x0034, 0x000C,
  222. 0x0007,
  223. };
  224. static const uint8_t ac_vlc_desc1_bits[169] = {
  225. 6, 12, 8, 7, 8, 7, 6, 4,
  226. 3, 10, 10, 11, 9, 9, 6, 4,
  227. 11, 10, 10, 10, 7, 5, 12, 11,
  228. 11, 11, 8, 5, 12, 11, 11, 12,
  229. 9, 6, 12, 12, 11, 9, 6, 12,
  230. 12, 10, 7, 11, 10, 7, 11, 7,
  231. 11, 8, 11, 8, 11, 11, 8, 11,
  232. 9, 12, 9, 12, 9, 12, 9, 12,
  233. 9, 12, 10, 10, 12, 10, 12, 10,
  234. 11, 11, 10, 11, 11, 11, 12, 12,
  235. 12, 12, 12, 12, 12, 12, 11, 12,
  236. 12, 12, 12, 12, 12, 12, 12, 12,
  237. 12, 12, 11, 11, 11, 11, 10, 10,
  238. 10, 10, 10, 11, 10, 12, 9, 12,
  239. 9, 12, 9, 11, 8, 12, 11, 8,
  240. 11, 8, 11, 8, 12, 10, 7, 12,
  241. 10, 7, 11, 10, 7, 12, 11, 9,
  242. 6, 11, 11, 12, 8, 6, 12, 10,
  243. 11, 11, 8, 5, 11, 10, 10, 10,
  244. 7, 5, 10, 9, 11, 9, 9, 6,
  245. 4, 12, 8, 7, 8, 7, 6, 4,
  246. 3,
  247. };
  248. static const uint16_t ac_vlc_desc2_syms[165] = {
  249. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  250. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  251. 0xFE0, 0xFD6, 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6,
  252. 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3,
  253. 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95,
  254. 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF75, 0xF71, 0xF70,
  255. 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40, 0xF36, 0xF31,
  256. 0xF30, 0xF26, 0xF21, 0xF20, 0xF16, 0xF11, 0xF10, 0xF06,
  257. 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE1, 0xEE0, 0xED0, 0xEC0,
  258. 0xEB3, 0xEB1, 0xEB0, 0xEA3, 0xEA1, 0xEA0, 0xE90, 0xE81,
  259. 0xE80, 0xE71, 0xE70, 0xE61, 0xE60, 0xE50, 0xE40, 0xE30,
  260. 0xE10, 0xE00, 0x241, 0x240, 0x231, 0x1D0, 0x1C0, 0x1B3,
  261. 0x1B0, 0x1A0, 0x190, 0x180, 0x170, 0x160, 0x150, 0x140,
  262. 0x130, 0x120, 0x110, 0x100, 0x0F0, 0x0E0, 0x0D1, 0x0D0,
  263. 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A5, 0x0A1, 0x0A0, 0x096,
  264. 0x095, 0x091, 0x090, 0x086, 0x085, 0x081, 0x080, 0x075,
  265. 0x071, 0x070, 0x065, 0x063, 0x061, 0x060, 0x055, 0x053,
  266. 0x052, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041, 0x040,
  267. 0x036, 0x035, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025,
  268. 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015,
  269. 0x014, 0x013, 0x012, 0x011, 0x010,
  270. };
  271. static const uint16_t ac_vlc_desc2_codes[165] = {
  272. 0x0034, 0x059C, 0x0280, 0x001C, 0x004C, 0x00BD, 0x0020, 0x003C,
  273. 0x000A, 0x0003, 0x00FD, 0x008C, 0x0332, 0x01D5, 0x0055, 0x003E,
  274. 0x0001, 0x07E4, 0x0264, 0x00B2, 0x00A2, 0x005C, 0x0005, 0x02A2,
  275. 0x011D, 0x0132, 0x076C, 0x0012, 0x0018, 0x01E4, 0x05E4, 0x02B2,
  276. 0x0432, 0x017D, 0x000E, 0x055D, 0x0955, 0x0164, 0x0028, 0x0D62,
  277. 0x0B24, 0x02DE, 0x001E, 0x0340, 0x0014, 0x0555, 0x0180, 0x00DD,
  278. 0x01B2, 0x0092, 0x036C, 0x00EC, 0x00E4, 0x00C0, 0x0C64, 0x095D,
  279. 0x01DE, 0x0AE4, 0x0C32, 0x01A2, 0x06E4, 0x0832, 0x01A4, 0x015D,
  280. 0x0732, 0x031D, 0x0F9C, 0x03E2, 0x09E2, 0x02FD, 0x0224, 0x051D,
  281. 0x02E4, 0x019C, 0x05B2, 0x0355, 0x0064, 0x016C, 0x038C, 0x0880,
  282. 0x0480, 0x06B2, 0x0540, 0x0080, 0x075D, 0x0155, 0x0424, 0x0680,
  283. 0x0A62, 0x0A80, 0x078C, 0x0D9C, 0x0F8C, 0x0562, 0x0FF2, 0x0464,
  284. 0x0B55, 0x01E2, 0x0032, 0x07F2, 0x0140, 0x03E4, 0x0662, 0x0755,
  285. 0x0380, 0x026C, 0x0232, 0x001D, 0x0040, 0x00E2, 0x035D, 0x00F2,
  286. 0x0162, 0x01FD, 0x03F2, 0x000C, 0x0EA2, 0x05F2, 0x0072, 0x04E4,
  287. 0x0F32, 0x018C, 0x009D, 0x0324, 0x079C, 0x006C, 0x0054, 0x0F5D,
  288. 0x021D, 0x0015, 0x0024, 0x06A2, 0x009C, 0x0004, 0x0062, 0x056C,
  289. 0x0262, 0x0000, 0x002E, 0x01F2, 0x0124, 0x039C, 0x005E, 0x0010,
  290. 0x0724, 0x00A4, 0x00DE, 0x0362, 0x0052, 0x000D, 0x03B2, 0x007D,
  291. 0x05E2, 0x00D5, 0x005D, 0x0035, 0x0009, 0x099C, 0x0022, 0x002C,
  292. 0x003D, 0x0008, 0x0002, 0x0006, 0x0007,
  293. };
  294. static const uint8_t ac_vlc_desc2_bits[165] = {
  295. 6, 12, 12, 8, 7, 8, 6, 6,
  296. 4, 3, 10, 9, 11, 9, 9, 6,
  297. 4, 11, 10, 10, 10, 7, 5, 11,
  298. 11, 10, 11, 8, 5, 11, 11, 11,
  299. 12, 9, 6, 11, 12, 9, 6, 12,
  300. 12, 10, 7, 10, 7, 11, 10, 8,
  301. 11, 8, 11, 8, 11, 8, 12, 12,
  302. 9, 12, 12, 9, 11, 12, 9, 12,
  303. 12, 10, 12, 10, 12, 10, 10, 11,
  304. 12, 12, 11, 12, 11, 11, 11, 12,
  305. 11, 11, 11, 12, 12, 12, 11, 11,
  306. 12, 12, 12, 12, 12, 12, 12, 12,
  307. 12, 12, 12, 12, 11, 11, 11, 11,
  308. 10, 10, 10, 10, 9, 9, 11, 9,
  309. 11, 9, 11, 8, 12, 11, 8, 11,
  310. 12, 10, 8, 12, 12, 10, 7, 12,
  311. 10, 7, 11, 12, 9, 6, 10, 11,
  312. 12, 8, 6, 11, 10, 11, 8, 5,
  313. 11, 9, 10, 10, 7, 5, 10, 9,
  314. 11, 9, 9, 6, 4, 12, 8, 7,
  315. 8, 6, 6, 4, 3,
  316. };
  317. static const uint16_t ac_vlc_desc3_syms[162] = {
  318. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  319. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  320. 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0,
  321. 0xFC6, 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3,
  322. 0xFB2, 0xFB1, 0xFB0, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF95,
  323. 0xF93, 0xF91, 0xF90, 0xF85, 0xF83, 0xF81, 0xF80, 0xF71,
  324. 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50, 0xF46,
  325. 0xF41, 0xF40, 0xF36, 0xF31, 0xF30, 0xF26, 0xF21, 0xF20,
  326. 0xF11, 0xF10, 0xF01, 0xF00, 0xEF3, 0xEF1, 0xEF0, 0xEE3,
  327. 0xEE1, 0xEE0, 0xED3, 0xED1, 0xED0, 0xEC1, 0xEC0, 0xEB1,
  328. 0xEB0, 0xEA0, 0xE90, 0xE80, 0xE70, 0x1E1, 0x1D1, 0x1D0,
  329. 0x1C1, 0x1B1, 0x1A1, 0x180, 0x170, 0x163, 0x160, 0x150,
  330. 0x140, 0x130, 0x123, 0x120, 0x113, 0x110, 0x100, 0x0F0,
  331. 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1,
  332. 0x0A0, 0x095, 0x091, 0x090, 0x085, 0x081, 0x080, 0x076,
  333. 0x075, 0x073, 0x071, 0x070, 0x066, 0x065, 0x063, 0x061,
  334. 0x060, 0x055, 0x053, 0x052, 0x051, 0x050, 0x045, 0x043,
  335. 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032,
  336. 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021,
  337. 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012,
  338. 0x011, 0x010,
  339. };
  340. static const uint16_t ac_vlc_desc3_codes[162] = {
  341. 0x001D, 0x087C, 0x0AE8, 0x003A, 0x001C, 0x0008, 0x000C, 0x0032,
  342. 0x0006, 0x0003, 0x03A5, 0x01EC, 0x01A5, 0x0080, 0x0030, 0x0005,
  343. 0x0001, 0x0040, 0x03FC, 0x02D4, 0x0154, 0x02FC, 0x003C, 0x0015,
  344. 0x051A, 0x0000, 0x02EC, 0x077C, 0x00D2, 0x0018, 0x03E8, 0x04EC,
  345. 0x027C, 0x01FA, 0x0022, 0x0765, 0x0EA5, 0x0054, 0x0010, 0x08EC,
  346. 0x0AAC, 0x03BA, 0x0042, 0x065D, 0x0AD4, 0x005C, 0x0028, 0x03C0,
  347. 0x00E5, 0x035C, 0x04FA, 0x00DC, 0x06A5, 0x075C, 0x00C8, 0x05A5,
  348. 0x04D4, 0x00BA, 0x01C0, 0x05E8, 0x012C, 0x00E8, 0x01B0, 0x00B0,
  349. 0x025D, 0x002C, 0x0A52, 0x025C, 0x01E8, 0x00FA, 0x0348, 0x0652,
  350. 0x0B7C, 0x0365, 0x031A, 0x0E52, 0x011A, 0x0200, 0x01BA, 0x02AC,
  351. 0x06D4, 0x01FC, 0x05BA, 0x0DFC, 0x0248, 0x0EE8, 0x0B1A, 0x0CFC,
  352. 0x0F65, 0x0B5C, 0x0DC0, 0x007C, 0x0548, 0x08A5, 0x00FC, 0x03B0,
  353. 0x0148, 0x06AC, 0x0252, 0x071A, 0x02E8, 0x0240, 0x00AC, 0x021A,
  354. 0x0140, 0x08E8, 0x01AC, 0x00EC, 0x0152, 0x00A5, 0x0068, 0x001A,
  355. 0x006C, 0x05C0, 0x015C, 0x0025, 0x05B0, 0x017C, 0x0014, 0x047C,
  356. 0x00D4, 0x06E8, 0x00C0, 0x0002, 0x0A5D, 0x04E8, 0x0A7C, 0x01D4,
  357. 0x0020, 0x04A5, 0x07B0, 0x037C, 0x015D, 0x002A, 0x005D, 0x0048,
  358. 0x067C, 0x007A, 0x0004, 0x04FC, 0x02FA, 0x0648, 0x0100, 0x0052,
  359. 0x005A, 0x000D, 0x0165, 0x0065, 0x02A5, 0x0070, 0x00F0, 0x003D,
  360. 0x0009, 0x05FC, 0x0E48, 0x009A, 0x0012, 0x00DD, 0x0034, 0x000A,
  361. 0x000E, 0x0007,
  362. };
  363. static const uint8_t ac_vlc_desc3_bits[162] = {
  364. 7, 12, 12, 8, 7, 7, 6, 6,
  365. 4, 3, 10, 9, 11, 8, 8, 6,
  366. 4, 10, 10, 12, 9, 10, 7, 5,
  367. 11, 10, 10, 11, 8, 5, 10, 11,
  368. 12, 9, 6, 12, 12, 9, 6, 12,
  369. 12, 10, 7, 11, 12, 10, 7, 10,
  370. 8, 12, 11, 8, 12, 11, 8, 11,
  371. 11, 9, 11, 11, 9, 12, 11, 9,
  372. 12, 9, 12, 10, 11, 11, 10, 12,
  373. 12, 11, 12, 12, 11, 10, 11, 12,
  374. 11, 11, 11, 12, 11, 12, 12, 12,
  375. 12, 12, 12, 12, 11, 12, 11, 11,
  376. 11, 11, 12, 11, 12, 10, 10, 10,
  377. 9, 12, 9, 12, 9, 12, 8, 10,
  378. 8, 12, 10, 8, 11, 10, 7, 11,
  379. 11, 12, 9, 7, 12, 11, 12, 9,
  380. 6, 11, 11, 12, 9, 6, 10, 10,
  381. 11, 8, 5, 12, 10, 12, 9, 10,
  382. 7, 5, 10, 9, 11, 8, 8, 6,
  383. 4, 12, 12, 8, 7, 8, 6, 6,
  384. 4, 3,
  385. };
  386. static const uint16_t ac_vlc_desc4_syms[131] = {
  387. 0x1000, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1, 0xFF0,
  388. 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0, 0xFD6,
  389. 0xFD5, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5, 0xFC3, 0xFC2,
  390. 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0, 0xFA5, 0xFA3,
  391. 0xFA1, 0xFA0, 0xF93, 0xF91, 0xF90, 0xF81, 0xF80, 0xF76,
  392. 0xF71, 0xF70, 0xF66, 0xF61, 0xF60, 0xF56, 0xF51, 0xF50,
  393. 0xF41, 0xF40, 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF13,
  394. 0xF11, 0xF10, 0xF03, 0xF01, 0xF00, 0xEF1, 0xEF0, 0xEE0,
  395. 0xED0, 0xEC0, 0xEB0, 0x191, 0x181, 0x180, 0x171, 0x161,
  396. 0x140, 0x130, 0x123, 0x120, 0x110, 0x100, 0x0F3, 0x0F0,
  397. 0x0E0, 0x0D0, 0x0C0, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091,
  398. 0x090, 0x085, 0x081, 0x080, 0x075, 0x071, 0x070, 0x066,
  399. 0x065, 0x063, 0x061, 0x060, 0x056, 0x055, 0x053, 0x051,
  400. 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035,
  401. 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023,
  402. 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013,
  403. 0x012, 0x011, 0x010,
  404. };
  405. static const uint16_t ac_vlc_desc4_codes[131] = {
  406. 0x006B, 0x00BE, 0x0052, 0x00F3, 0x005B, 0x003A, 0x0009, 0x0007,
  407. 0x00DA, 0x03FB, 0x0123, 0x00B3, 0x01B3, 0x002E, 0x0006, 0x030A,
  408. 0x005A, 0x004A, 0x034A, 0x0072, 0x0005, 0x02DA, 0x0173, 0x04FB,
  409. 0x0032, 0x0013, 0x039B, 0x0B9B, 0x011E, 0x0002, 0x00FB, 0x021E,
  410. 0x009B, 0x007E, 0x0E1A, 0x03CA, 0x007B, 0x02FB, 0x0033, 0x03AB,
  411. 0x0463, 0x008A, 0x0773, 0x041E, 0x002B, 0x031B, 0x065A, 0x011A,
  412. 0x060A, 0x01DA, 0x0963, 0x0323, 0x0BAB, 0x059E, 0x010A, 0x05AB,
  413. 0x0CFB, 0x071B, 0x079E, 0x0F9E, 0x0263, 0x079B, 0x0563, 0x019E,
  414. 0x01AB, 0x0E63, 0x029B, 0x04CA, 0x0DAB, 0x0663, 0x0B1B, 0x020A,
  415. 0x0A1E, 0x021A, 0x0063, 0x061E, 0x06FB, 0x025A, 0x0163, 0x0573,
  416. 0x000A, 0x0223, 0x011B, 0x0C1A, 0x015A, 0x0863, 0x00AB, 0x02CA,
  417. 0x00B2, 0x0A0A, 0x01CA, 0x00A3, 0x0B73, 0x0023, 0x0012, 0x039E,
  418. 0x001A, 0x0CCA, 0x01FB, 0x005E, 0x0A9B, 0x00CA, 0x0373, 0x009E,
  419. 0x0022, 0x07AB, 0x001E, 0x0EFB, 0x009A, 0x000B, 0x041A, 0x019B,
  420. 0x0363, 0x014A, 0x006A, 0x0015, 0x069B, 0x0073, 0x0523, 0x001B,
  421. 0x012B, 0x0003, 0x0001, 0x061A, 0x003E, 0x002A, 0x00E3, 0x003B,
  422. 0x000E, 0x000D, 0x0000,
  423. };
  424. static const uint8_t ac_vlc_desc4_bits[131] = {
  425. 7, 8, 7, 8, 7, 6, 4, 3,
  426. 10, 10, 11, 9, 9, 6, 4, 10,
  427. 10, 9, 10, 7, 5, 10, 11, 12,
  428. 8, 6, 12, 12, 9, 6, 11, 12,
  429. 10, 7, 12, 10, 8, 11, 8, 12,
  430. 11, 8, 11, 11, 9, 12, 11, 9,
  431. 11, 9, 12, 10, 12, 11, 10, 12,
  432. 12, 11, 12, 12, 11, 11, 11, 11,
  433. 11, 12, 12, 12, 12, 12, 12, 12,
  434. 12, 11, 12, 11, 12, 11, 12, 11,
  435. 10, 10, 10, 12, 9, 12, 9, 10,
  436. 8, 12, 10, 8, 12, 10, 7, 11,
  437. 11, 12, 10, 7, 12, 11, 12, 9,
  438. 6, 11, 11, 12, 8, 6, 12, 10,
  439. 10, 10, 7, 5, 11, 9, 11, 9,
  440. 9, 6, 4, 12, 8, 7, 8, 7,
  441. 6, 4, 2,
  442. };
  443. static const uint16_t ac_vlc_desc5_syms[132] = {
  444. 0x1000, 0xFF8, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2, 0xFF1,
  445. 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1, 0xFE0,
  446. 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5,
  447. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0,
  448. 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF93, 0xF91, 0xF90, 0xF86,
  449. 0xF85, 0xF81, 0xF80, 0xF76, 0xF75, 0xF71, 0xF70, 0xF66,
  450. 0xF61, 0xF60, 0xF51, 0xF50, 0xF43, 0xF41, 0xF40, 0xF33,
  451. 0xF31, 0xF30, 0xF23, 0xF21, 0xF20, 0xF11, 0xF10, 0xF00,
  452. 0xEF0, 0xEE0, 0xEC1, 0xEC0, 0x151, 0x141, 0x140, 0x131,
  453. 0x121, 0x120, 0x111, 0x110, 0x103, 0x100, 0x0F0, 0x0E0,
  454. 0x0D3, 0x0D0, 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1,
  455. 0x0A0, 0x091, 0x090, 0x081, 0x080, 0x075, 0x071, 0x070,
  456. 0x065, 0x061, 0x060, 0x056, 0x055, 0x053, 0x052, 0x051,
  457. 0x050, 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x035,
  458. 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024,
  459. 0x023, 0x022, 0x021, 0x020, 0x018, 0x016, 0x015, 0x014,
  460. 0x013, 0x012, 0x011, 0x010,
  461. };
  462. static const uint16_t ac_vlc_desc5_codes[132] = {
  463. 0x0001, 0x0D62, 0x00BD, 0x0022, 0x009B, 0x0032, 0x0019, 0x0005,
  464. 0x0007, 0x034D, 0x009A, 0x012B, 0x0052, 0x006B, 0x003A, 0x0006,
  465. 0x06FD, 0x017D, 0x081A, 0x031B, 0x031A, 0x0012, 0x0011, 0x0202,
  466. 0x00FD, 0x051B, 0x00D2, 0x001D, 0x011A, 0x0782, 0x018D, 0x007B,
  467. 0x067D, 0x037D, 0x0021, 0x0E8D, 0x0562, 0x008D, 0x00BB, 0x053D,
  468. 0x082A, 0x0002, 0x000D, 0x0302, 0x007D, 0x053B, 0x003B, 0x0A4D,
  469. 0x027D, 0x01FD, 0x042A, 0x01C2, 0x041A, 0x0182, 0x014D, 0x0162,
  470. 0x00C2, 0x032A, 0x0D9A, 0x012A, 0x0102, 0x087D, 0x072B, 0x039A,
  471. 0x0362, 0x019A, 0x0C62, 0x04C2, 0x0D1B, 0x028D, 0x0762, 0x0E7D,
  472. 0x0E41, 0x059A, 0x024D, 0x093B, 0x052B, 0x011B, 0x064D, 0x013D,
  473. 0x0382, 0x0262, 0x0641, 0x0462, 0x004D, 0x0CC2, 0x033B, 0x068D,
  474. 0x0141, 0x0D2B, 0x001B, 0x0041, 0x00C1, 0x0C41, 0x01E2, 0x00EB,
  475. 0x062A, 0x0082, 0x0061, 0x02FD, 0x047D, 0x013B, 0x002A, 0x003D,
  476. 0x005B, 0x022A, 0x02C2, 0x0241, 0x0062, 0x00AA, 0x000B, 0x00E2,
  477. 0x001A, 0x033D, 0x021A, 0x006A, 0x0009, 0x032B, 0x002B, 0x04FD,
  478. 0x0042, 0x016B, 0x002D, 0x000E, 0x0441, 0x00CD, 0x005A, 0x00AB,
  479. 0x000A, 0x0039, 0x0003, 0x0000,
  480. };
  481. static const uint8_t ac_vlc_desc5_bits[132] = {
  482. 7, 12, 8, 7, 8, 6, 6, 4,
  483. 3, 10, 9, 11, 8, 9, 6, 4,
  484. 11, 10, 12, 10, 10, 7, 5, 10,
  485. 11, 12, 8, 6, 10, 11, 9, 7,
  486. 12, 10, 7, 12, 12, 10, 8, 11,
  487. 12, 10, 8, 10, 12, 11, 9, 12,
  488. 11, 9, 11, 9, 11, 10, 10, 11,
  489. 11, 10, 12, 10, 10, 12, 11, 10,
  490. 11, 11, 12, 12, 12, 11, 11, 12,
  491. 12, 12, 12, 12, 12, 11, 11, 11,
  492. 11, 10, 12, 12, 10, 12, 10, 12,
  493. 9, 12, 9, 11, 8, 12, 9, 8,
  494. 11, 9, 7, 11, 11, 12, 12, 9,
  495. 7, 11, 10, 11, 11, 8, 6, 9,
  496. 12, 10, 10, 7, 5, 11, 9, 11,
  497. 8, 9, 6, 4, 12, 8, 7, 8,
  498. 6, 6, 4, 2,
  499. };
  500. static const uint16_t ac_vlc_desc6_syms[130] = {
  501. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  502. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  503. 0xFE0, 0xFD6, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0,
  504. 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1,
  505. 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93,
  506. 0xF91, 0xF90, 0xF86, 0xF85, 0xF81, 0xF80, 0xF76, 0xF71,
  507. 0xF70, 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF43,
  508. 0xF41, 0xF40, 0xF31, 0xF30, 0xF20, 0xF10, 0xF00, 0xEF0,
  509. 0xEE1, 0x131, 0x121, 0x120, 0x111, 0x110, 0x101, 0x100,
  510. 0x0F1, 0x0F0, 0x0E3, 0x0E1, 0x0E0, 0x0D1, 0x0D0, 0x0C3,
  511. 0x0C0, 0x0B3, 0x0B1, 0x0B0, 0x0A1, 0x0A0, 0x091, 0x090,
  512. 0x081, 0x080, 0x075, 0x071, 0x070, 0x065, 0x063, 0x061,
  513. 0x060, 0x056, 0x055, 0x053, 0x051, 0x050, 0x046, 0x045,
  514. 0x043, 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033,
  515. 0x032, 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022,
  516. 0x021, 0x020, 0x018, 0x016, 0x015, 0x014, 0x013, 0x012,
  517. 0x011, 0x010,
  518. };
  519. static const uint16_t ac_vlc_desc6_codes[130] = {
  520. 0x0022, 0x0BB2, 0x0942, 0x002B, 0x0072, 0x0002, 0x001A, 0x0039,
  521. 0x000D, 0x0007, 0x007B, 0x008E, 0x06DB, 0x00EA, 0x015B, 0x002E,
  522. 0x0006, 0x0959, 0x027B, 0x0A0E, 0x01AB, 0x008A, 0x0012, 0x001E,
  523. 0x0575, 0x005B, 0x02AB, 0x00C2, 0x0015, 0x036A, 0x04B2, 0x0099,
  524. 0x001B, 0x0519, 0x0C19, 0x00DB, 0x004E, 0x0042, 0x0159, 0x03B2,
  525. 0x030E, 0x00EB, 0x0252, 0x0EAB, 0x018A, 0x00E2, 0x06AB, 0x0242,
  526. 0x017B, 0x0452, 0x0319, 0x0152, 0x025B, 0x016A, 0x00AB, 0x0052,
  527. 0x05B2, 0x010E, 0x038E, 0x028A, 0x0359, 0x0019, 0x078A, 0x0C52,
  528. 0x0D8E, 0x0ED9, 0x02D9, 0x0662, 0x0119, 0x09B2, 0x0BAB, 0x0D19,
  529. 0x0C5B, 0x00B2, 0x0542, 0x0B8A, 0x02B2, 0x0142, 0x065B, 0x058E,
  530. 0x0062, 0x018E, 0x038A, 0x00D9, 0x0419, 0x0162, 0x03AB, 0x0075,
  531. 0x07B2, 0x0032, 0x020E, 0x07AB, 0x006B, 0x045B, 0x01B2, 0x0199,
  532. 0x002A, 0x0375, 0x0775, 0x0AAB, 0x01D9, 0x003B, 0x060E, 0x0342,
  533. 0x0175, 0x0262, 0x000A, 0x0005, 0x0559, 0x006A, 0x0D59, 0x0219,
  534. 0x000E, 0x004A, 0x0009, 0x0719, 0x0059, 0x02DB, 0x00D2, 0x01DB,
  535. 0x0025, 0x0001, 0x06D9, 0x00F5, 0x0035, 0x00FB, 0x003A, 0x000B,
  536. 0x0003, 0x0000,
  537. };
  538. static const uint8_t ac_vlc_desc6_bits[130] = {
  539. 7, 12, 12, 8, 7, 7, 6, 6,
  540. 4, 3, 10, 9, 11, 8, 9, 6,
  541. 4, 12, 10, 12, 10, 10, 7, 5,
  542. 11, 11, 12, 8, 6, 10, 11, 9,
  543. 7, 12, 12, 10, 7, 10, 12, 12,
  544. 10, 8, 10, 12, 10, 8, 12, 10,
  545. 9, 12, 11, 9, 11, 10, 10, 11,
  546. 11, 10, 10, 10, 10, 11, 11, 12,
  547. 12, 12, 11, 11, 11, 12, 12, 12,
  548. 12, 11, 11, 12, 10, 12, 11, 12,
  549. 10, 11, 12, 10, 12, 9, 12, 9,
  550. 11, 8, 12, 11, 8, 12, 12, 9,
  551. 7, 11, 11, 12, 9, 7, 11, 10,
  552. 11, 11, 8, 6, 12, 9, 12, 10,
  553. 10, 7, 5, 11, 9, 11, 8, 9,
  554. 6, 4, 12, 8, 7, 8, 6, 6,
  555. 4, 2,
  556. };
  557. static const uint16_t ac_vlc_desc7_syms[125] = {
  558. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  559. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  560. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5,
  561. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB5, 0xFB3, 0xFB1, 0xFB0,
  562. 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95, 0xF93,
  563. 0xF91, 0xF90, 0xF86, 0xF81, 0xF80, 0xF73, 0xF71, 0xF70,
  564. 0xF63, 0xF61, 0xF60, 0xF53, 0xF51, 0xF50, 0xF41, 0xF40,
  565. 0xF31, 0xF30, 0xF20, 0xF10, 0xF01, 0xF00, 0x121, 0x111,
  566. 0x101, 0x100, 0x0F1, 0x0F0, 0x0E1, 0x0E0, 0x0D1, 0x0D0,
  567. 0x0C3, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0,
  568. 0x093, 0x091, 0x090, 0x081, 0x080, 0x071, 0x070, 0x065,
  569. 0x063, 0x061, 0x060, 0x055, 0x053, 0x052, 0x051, 0x050,
  570. 0x046, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035,
  571. 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024,
  572. 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015,
  573. 0x014, 0x013, 0x012, 0x011, 0x010,
  574. };
  575. static const uint16_t ac_vlc_desc7_codes[125] = {
  576. 0x0053, 0x009A, 0x0EE2, 0x00D3, 0x006A, 0x0052, 0x003A, 0x0035,
  577. 0x000D, 0x0007, 0x0062, 0x0125, 0x0142, 0x0019, 0x01F3, 0x0029,
  578. 0x000E, 0x0082, 0x0ADA, 0x02E3, 0x00E2, 0x0022, 0x0006, 0x0065,
  579. 0x05E3, 0x0765, 0x0032, 0x0039, 0x0F99, 0x05E2, 0x0099, 0x0033,
  580. 0x0362, 0x0799, 0x0F65, 0x0073, 0x004A, 0x02A5, 0x0162, 0x0742,
  581. 0x01A5, 0x00D9, 0x0342, 0x005A, 0x00AA, 0x0EF3, 0x0182, 0x01DA,
  582. 0x0382, 0x035A, 0x00F3, 0x0673, 0x0165, 0x00E5, 0x06F3, 0x0225,
  583. 0x0842, 0x025A, 0x07E3, 0x0399, 0x07A5, 0x072A, 0x0F2A, 0x09E3,
  584. 0x0273, 0x049A, 0x02E5, 0x0B99, 0x02E2, 0x0E73, 0x0562, 0x02F3,
  585. 0x032A, 0x0F42, 0x00DA, 0x0999, 0x012A, 0x0365, 0x00A5, 0x00E3,
  586. 0x0199, 0x03E3, 0x019A, 0x01E2, 0x0173, 0x06E5, 0x0059, 0x01E3,
  587. 0x02DA, 0x002A, 0x000A, 0x06DA, 0x0FA5, 0x0042, 0x01E5, 0x0013,
  588. 0x03E2, 0x015A, 0x03A5, 0x0442, 0x001A, 0x0005, 0x04A5, 0x0265,
  589. 0x08A5, 0x0025, 0x029A, 0x0072, 0x0016, 0x0599, 0x00C2, 0x0242,
  590. 0x00B2, 0x0002, 0x0015, 0x0001, 0x0BE3, 0x06E2, 0x0063, 0x0023,
  591. 0x0012, 0x0009, 0x0003, 0x000B, 0x0000,
  592. };
  593. static const uint8_t ac_vlc_desc7_bits[125] = {
  594. 8, 11, 12, 8, 7, 7, 6, 6,
  595. 4, 3, 9, 9, 10, 8, 9, 6,
  596. 4, 9, 12, 10, 10, 7, 5, 10,
  597. 11, 12, 8, 6, 12, 11, 9, 7,
  598. 10, 12, 12, 10, 7, 10, 11, 12,
  599. 10, 8, 11, 10, 8, 12, 10, 9,
  600. 10, 10, 10, 12, 10, 10, 12, 10,
  601. 12, 10, 11, 12, 12, 12, 12, 12,
  602. 11, 11, 11, 12, 11, 12, 11, 11,
  603. 11, 12, 10, 12, 10, 11, 12, 10,
  604. 12, 12, 9, 11, 9, 11, 8, 12,
  605. 12, 9, 7, 11, 12, 12, 9, 7,
  606. 10, 10, 11, 11, 8, 6, 11, 10,
  607. 12, 10, 10, 7, 5, 11, 8, 10,
  608. 8, 8, 6, 4, 12, 12, 8, 7,
  609. 7, 6, 6, 4, 2,
  610. };
  611. static const uint16_t ac_vlc_desc8_syms[121] = {
  612. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  613. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  614. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5,
  615. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB1,
  616. 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96, 0xF95,
  617. 0xF93, 0xF91, 0xF90, 0xF86, 0xF83, 0xF81, 0xF80, 0xF73,
  618. 0xF71, 0xF70, 0xF63, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41,
  619. 0xF40, 0xF30, 0xF21, 0xF20, 0x111, 0x101, 0x0F1, 0x0E1,
  620. 0x0E0, 0x0D1, 0x0D0, 0x0C1, 0x0C0, 0x0B3, 0x0B1, 0x0B0,
  621. 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081,
  622. 0x080, 0x073, 0x071, 0x070, 0x065, 0x063, 0x061, 0x060,
  623. 0x055, 0x053, 0x051, 0x050, 0x046, 0x045, 0x043, 0x042,
  624. 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031,
  625. 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020,
  626. 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011,
  627. 0x010,
  628. };
  629. static const uint16_t ac_vlc_desc8_codes[121] = {
  630. 0x00F6, 0x0676, 0x0EB6, 0x00F3, 0x0056, 0x006A, 0x0039, 0x0003,
  631. 0x000D, 0x0007, 0x00A2, 0x0173, 0x00CA, 0x0025, 0x0082, 0x0019,
  632. 0x0001, 0x00B6, 0x0276, 0x02E3, 0x00B2, 0x0062, 0x001A, 0x0175,
  633. 0x01E3, 0x0BE5, 0x004A, 0x0029, 0x07A5, 0x00E3, 0x030A, 0x0176,
  634. 0x0023, 0x0042, 0x05CA, 0x00A5, 0x0142, 0x0052, 0x04A5, 0x0B02,
  635. 0x0D22, 0x0375, 0x0065, 0x0522, 0x0DE3, 0x010A, 0x00F5, 0x0136,
  636. 0x0275, 0x01B2, 0x03F5, 0x03E3, 0x0002, 0x08E3, 0x01A2, 0x0B36,
  637. 0x020A, 0x0076, 0x0CE3, 0x07E5, 0x070A, 0x03A5, 0x02B6, 0x0036,
  638. 0x01E5, 0x02A5, 0x05E3, 0x07B6, 0x07F5, 0x0736, 0x0BA5, 0x0075,
  639. 0x0302, 0x0FE5, 0x01B6, 0x0102, 0x04E3, 0x0022, 0x08A5, 0x01CA,
  640. 0x00E5, 0x0F0A, 0x05E5, 0x0096, 0x0A76, 0x0336, 0x0236, 0x0012,
  641. 0x03B6, 0x0BF5, 0x0073, 0x0035, 0x02B2, 0x000A, 0x0476, 0x0122,
  642. 0x0016, 0x0009, 0x0322, 0x01F5, 0x03E5, 0x01A5, 0x03CA, 0x0072,
  643. 0x0006, 0x06A5, 0x0032, 0x02CA, 0x008A, 0x00C2, 0x0015, 0x000E,
  644. 0x0702, 0x06B6, 0x0063, 0x0033, 0x002A, 0x0005, 0x0013, 0x000B,
  645. 0x0000,
  646. };
  647. static const uint8_t ac_vlc_desc8_bits[121] = {
  648. 8, 11, 12, 8, 7, 7, 6, 6,
  649. 4, 3, 9, 9, 10, 8, 8, 6,
  650. 4, 10, 12, 10, 10, 7, 5, 10,
  651. 11, 12, 8, 6, 11, 12, 11, 9,
  652. 7, 9, 11, 12, 9, 7, 11, 12,
  653. 12, 10, 8, 12, 12, 10, 9, 10,
  654. 10, 9, 12, 10, 9, 12, 9, 12,
  655. 10, 11, 12, 12, 12, 12, 11, 10,
  656. 11, 11, 12, 11, 11, 11, 12, 10,
  657. 12, 12, 10, 10, 12, 9, 12, 11,
  658. 9, 12, 11, 8, 12, 12, 10, 7,
  659. 11, 12, 9, 7, 10, 10, 11, 11,
  660. 8, 6, 10, 10, 12, 10, 10, 7,
  661. 5, 11, 8, 10, 8, 8, 6, 4,
  662. 11, 12, 8, 7, 7, 6, 6, 4,
  663. 2,
  664. };
  665. static const uint16_t ac_vlc_desc9_syms[114] = {
  666. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  667. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  668. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC5,
  669. 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3, 0xFB2,
  670. 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0, 0xF96,
  671. 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73, 0xF71,
  672. 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF40, 0xF31, 0xF30,
  673. 0xF21, 0x121, 0x0F1, 0x0E1, 0x0D1, 0x0D0, 0x0C1, 0x0C0,
  674. 0x0B1, 0x0B0, 0x0A3, 0x0A1, 0x0A0, 0x093, 0x091, 0x090,
  675. 0x083, 0x081, 0x080, 0x073, 0x071, 0x070, 0x065, 0x063,
  676. 0x061, 0x060, 0x055, 0x053, 0x051, 0x050, 0x045, 0x043,
  677. 0x042, 0x041, 0x040, 0x036, 0x035, 0x034, 0x033, 0x032,
  678. 0x031, 0x030, 0x026, 0x025, 0x024, 0x023, 0x022, 0x021,
  679. 0x020, 0x018, 0x017, 0x016, 0x015, 0x014, 0x013, 0x012,
  680. 0x011, 0x010,
  681. };
  682. static const uint16_t ac_vlc_desc9_codes[114] = {
  683. 0x0061, 0x0403, 0x0DB1, 0x0012, 0x0071, 0x0056, 0x0035, 0x0023,
  684. 0x000D, 0x0007, 0x0243, 0x01D3, 0x026A, 0x00A1, 0x00A2, 0x0011,
  685. 0x000E, 0x01AA, 0x0531, 0x0093, 0x0222, 0x0032, 0x0006, 0x07F2,
  686. 0x04D3, 0x0C43, 0x0072, 0x0001, 0x0343, 0x05F2, 0x04AA, 0x03F2,
  687. 0x0031, 0x0045, 0x0143, 0x00AA, 0x0B31, 0x00F2, 0x00C3, 0x0693,
  688. 0x0BF2, 0x0203, 0x00E1, 0x03B1, 0x02D3, 0x00B1, 0x056A, 0x01D2,
  689. 0x008A, 0x046A, 0x01E2, 0x0003, 0x0103, 0x01B1, 0x02E2, 0x0293,
  690. 0x016A, 0x04E2, 0x0443, 0x0521, 0x0321, 0x0043, 0x00D3, 0x00E2,
  691. 0x0703, 0x00D2, 0x0731, 0x0A93, 0x0393, 0x0803, 0x0422, 0x0383,
  692. 0x018A, 0x006A, 0x0021, 0x096A, 0x0303, 0x0052, 0x0CE2, 0x0D31,
  693. 0x038A, 0x0013, 0x01F2, 0x0E93, 0x0083, 0x0005, 0x02D2, 0x0121,
  694. 0x0022, 0x00EA, 0x0036, 0x0122, 0x0193, 0x0331, 0x0183, 0x02AA,
  695. 0x004A, 0x001A, 0x0131, 0x002A, 0x036A, 0x000A, 0x0062, 0x0025,
  696. 0x0009, 0x06E2, 0x05B1, 0x0053, 0x0002, 0x0016, 0x0015, 0x0033,
  697. 0x000B, 0x0000,
  698. };
  699. static const uint8_t ac_vlc_desc9_bits[114] = {
  700. 8, 11, 12, 7, 7, 7, 6, 6,
  701. 4, 3, 10, 9, 10, 8, 8, 6,
  702. 4, 9, 12, 10, 10, 7, 5, 11,
  703. 11, 12, 8, 6, 10, 11, 11, 12,
  704. 9, 7, 10, 11, 12, 9, 8, 12,
  705. 12, 10, 8, 10, 10, 9, 11, 9,
  706. 9, 11, 9, 12, 10, 11, 11, 12,
  707. 12, 12, 12, 11, 10, 11, 11, 11,
  708. 11, 10, 11, 12, 10, 12, 11, 10,
  709. 10, 11, 9, 12, 11, 8, 12, 12,
  710. 10, 8, 11, 12, 9, 7, 10, 11,
  711. 11, 8, 6, 9, 10, 12, 10, 10,
  712. 7, 5, 11, 8, 10, 8, 8, 6,
  713. 4, 11, 12, 8, 6, 7, 6, 6,
  714. 4, 2,
  715. };
  716. static const uint16_t ac_vlc_descA_syms[110] = {
  717. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  718. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  719. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6,
  720. 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3,
  721. 0xFB2, 0xFB1, 0xFB0, 0xFA6, 0xFA5, 0xFA3, 0xFA1, 0xFA0,
  722. 0xF96, 0xF93, 0xF91, 0xF90, 0xF83, 0xF81, 0xF80, 0xF73,
  723. 0xF71, 0xF70, 0xF61, 0xF60, 0xF51, 0xF50, 0xF41, 0xF40,
  724. 0xF31, 0x0E1, 0x0D1, 0x0C1, 0x0C0, 0x0B1, 0x0B0, 0x0A1,
  725. 0x0A0, 0x093, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073,
  726. 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051,
  727. 0x050, 0x045, 0x044, 0x043, 0x042, 0x041, 0x040, 0x036,
  728. 0x035, 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025,
  729. 0x024, 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016,
  730. 0x015, 0x014, 0x013, 0x012, 0x011, 0x010,
  731. };
  732. static const uint16_t ac_vlc_descA_codes[110] = {
  733. 0x002A, 0x04C5, 0x02A3, 0x004A, 0x0015, 0x0005, 0x0003, 0x0013,
  734. 0x000D, 0x0007, 0x0171, 0x0032, 0x0371, 0x0076, 0x0042, 0x0011,
  735. 0x000E, 0x00AA, 0x04D5, 0x03A3, 0x06A3, 0x0062, 0x001A, 0x06D5,
  736. 0x07F2, 0x0223, 0x0CD5, 0x006A, 0x0001, 0x00F6, 0x0623, 0x03F2,
  737. 0x07EA, 0x01F1, 0x0021, 0x03D5, 0x08C2, 0x07F6, 0x00F2, 0x00E3,
  738. 0x0FEA, 0x02C5, 0x01AA, 0x0082, 0x04A3, 0x00B6, 0x0071, 0x03B2,
  739. 0x0023, 0x01B6, 0x08A3, 0x0002, 0x0BB2, 0x00C5, 0x02EA, 0x0C23,
  740. 0x0FF6, 0x0423, 0x07B2, 0x01C5, 0x07D5, 0x01EA, 0x06EA, 0x02C2,
  741. 0x01F6, 0x01D5, 0x01B2, 0x00B2, 0x04F1, 0x03EA, 0x01A2, 0x02A2,
  742. 0x02D5, 0x0123, 0x00D5, 0x01F2, 0x0055, 0x05B2, 0x04C2, 0x0102,
  743. 0x0061, 0x05D5, 0x00C2, 0x00F1, 0x00A3, 0x0045, 0x0016, 0x01A3,
  744. 0x01C2, 0x08D5, 0x03C5, 0x00EA, 0x000A, 0x0006, 0x00A2, 0x0036,
  745. 0x02F1, 0x0072, 0x0022, 0x0025, 0x0009, 0x03F6, 0x0AA3, 0x0063,
  746. 0x0012, 0x0031, 0x0035, 0x0033, 0x000B, 0x0000,
  747. };
  748. static const uint8_t ac_vlc_descA_bits[110] = {
  749. 8, 11, 12, 7, 7, 7, 6, 6,
  750. 4, 3, 10, 8, 10, 8, 8, 6,
  751. 4, 9, 12, 10, 11, 7, 5, 11,
  752. 11, 11, 12, 8, 6, 9, 11, 11,
  753. 12, 9, 7, 11, 12, 12, 9, 8,
  754. 12, 10, 9, 8, 11, 9, 9, 12,
  755. 11, 9, 12, 9, 12, 11, 11, 12,
  756. 12, 12, 11, 10, 11, 10, 11, 10,
  757. 10, 11, 11, 9, 11, 11, 9, 10,
  758. 11, 9, 12, 10, 8, 11, 11, 9,
  759. 7, 11, 12, 11, 12, 8, 6, 10,
  760. 9, 12, 10, 10, 7, 5, 10, 8,
  761. 10, 8, 8, 6, 4, 11, 12, 8,
  762. 6, 7, 6, 6, 4, 2,
  763. };
  764. static const uint16_t ac_vlc_descB_syms[101] = {
  765. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  766. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  767. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6,
  768. 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3,
  769. 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91,
  770. 0xF90, 0xF83, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60,
  771. 0xF51, 0xF50, 0xF41, 0x0F1, 0x0D1, 0x0C1, 0x0B1, 0x0B0,
  772. 0x0A1, 0x0A0, 0x091, 0x090, 0x083, 0x081, 0x080, 0x073,
  773. 0x071, 0x070, 0x063, 0x061, 0x060, 0x055, 0x053, 0x051,
  774. 0x050, 0x045, 0x043, 0x042, 0x041, 0x040, 0x036, 0x035,
  775. 0x034, 0x033, 0x032, 0x031, 0x030, 0x026, 0x025, 0x024,
  776. 0x023, 0x022, 0x021, 0x020, 0x018, 0x017, 0x016, 0x015,
  777. 0x014, 0x013, 0x012, 0x011, 0x010,
  778. };
  779. static const uint16_t ac_vlc_descB_codes[101] = {
  780. 0x00EE, 0x03A5, 0x0B73, 0x004E, 0x0035, 0x0015, 0x0023, 0x0013,
  781. 0x000D, 0x0007, 0x0673, 0x01F3, 0x02FE, 0x0096, 0x0133, 0x001E,
  782. 0x0001, 0x0116, 0x00F5, 0x03F5, 0x0473, 0x0052, 0x001A, 0x01D5,
  783. 0x0025, 0x0073, 0x0633, 0x0086, 0x0036, 0x012E, 0x0155, 0x0006,
  784. 0x0055, 0x000E, 0x0106, 0x023E, 0x0192, 0x0075, 0x0173, 0x01AE,
  785. 0x00D5, 0x08F5, 0x002E, 0x01FE, 0x0406, 0x00AE, 0x0E3E, 0x0206,
  786. 0x013E, 0x0373, 0x0D55, 0x063E, 0x0E33, 0x033E, 0x01F5, 0x0273,
  787. 0x003E, 0x06A5, 0x0092, 0x03D5, 0x04F5, 0x053E, 0x0016, 0x00FE,
  788. 0x07A5, 0x0125, 0x0506, 0x0292, 0x00BE, 0x0425, 0x0F73, 0x02F5,
  789. 0x0056, 0x0233, 0x02A5, 0x0C25, 0x007E, 0x0026, 0x0355, 0x0033,
  790. 0x0555, 0x01A5, 0x0306, 0x0046, 0x000A, 0x0225, 0x006E, 0x00A5,
  791. 0x0012, 0x00F3, 0x0005, 0x0009, 0x073E, 0x0773, 0x00B3, 0x0032,
  792. 0x0065, 0x0003, 0x0002, 0x000B, 0x0000,
  793. };
  794. static const uint8_t ac_vlc_descB_bits[101] = {
  795. 8, 11, 12, 7, 7, 7, 6, 6,
  796. 4, 3, 11, 9, 10, 8, 9, 6,
  797. 4, 9, 12, 10, 11, 7, 5, 10,
  798. 11, 11, 12, 8, 6, 9, 11, 11,
  799. 9, 7, 11, 11, 9, 8, 10, 9,
  800. 9, 12, 9, 9, 11, 9, 12, 10,
  801. 11, 12, 12, 12, 12, 11, 10, 11,
  802. 10, 11, 10, 10, 11, 11, 9, 10,
  803. 11, 9, 11, 10, 8, 12, 12, 10,
  804. 7, 11, 11, 12, 8, 6, 10, 10,
  805. 12, 10, 10, 7, 5, 10, 8, 10,
  806. 8, 9, 6, 4, 11, 12, 8, 6,
  807. 7, 6, 5, 4, 2,
  808. };
  809. static const uint16_t ac_vlc_descC_syms[96] = {
  810. 0x1000, 0xFF8, 0xFF7, 0xFF6, 0xFF5, 0xFF4, 0xFF3, 0xFF2,
  811. 0xFF1, 0xFF0, 0xFE6, 0xFE5, 0xFE4, 0xFE3, 0xFE2, 0xFE1,
  812. 0xFE0, 0xFD5, 0xFD4, 0xFD3, 0xFD2, 0xFD1, 0xFD0, 0xFC6,
  813. 0xFC5, 0xFC3, 0xFC2, 0xFC1, 0xFC0, 0xFB6, 0xFB5, 0xFB3,
  814. 0xFB1, 0xFB0, 0xFA6, 0xFA3, 0xFA1, 0xFA0, 0xF93, 0xF91,
  815. 0xF90, 0xF81, 0xF80, 0xF71, 0xF70, 0xF61, 0xF60, 0xF51,
  816. 0x0E1, 0x0C1, 0x0B1, 0x0A1, 0x0A0, 0x091, 0x090, 0x083,
  817. 0x081, 0x080, 0x073, 0x071, 0x070, 0x063, 0x061, 0x060,
  818. 0x055, 0x053, 0x051, 0x050, 0x045, 0x043, 0x042, 0x041,
  819. 0x040, 0x036, 0x035, 0x034, 0x033, 0x032, 0x031, 0x030,
  820. 0x026, 0x025, 0x024, 0x023, 0x022, 0x021, 0x020, 0x018,
  821. 0x017, 0x016, 0x015, 0x014, 0x013, 0x012, 0x011, 0x010,
  822. };
  823. static const uint16_t ac_vlc_descC_codes[96] = {
  824. 0x00DE, 0x072E, 0x0576, 0x006E, 0x0075, 0x0055, 0x0013, 0x0033,
  825. 0x000D, 0x0007, 0x07D2, 0x0052, 0x0065, 0x00CE, 0x0183, 0x003E,
  826. 0x0001, 0x002E, 0x0F35, 0x0003, 0x0243, 0x001A, 0x0006, 0x01A5,
  827. 0x0043, 0x0012, 0x0E43, 0x00B6, 0x0016, 0x0135, 0x0176, 0x0643,
  828. 0x0035, 0x001E, 0x0735, 0x0283, 0x0125, 0x00AE, 0x00D2, 0x0165,
  829. 0x0103, 0x0603, 0x00E5, 0x0C43, 0x02B5, 0x04A5, 0x00A5, 0x0443,
  830. 0x0265, 0x0476, 0x0212, 0x0112, 0x0376, 0x012E, 0x02D2, 0x0083,
  831. 0x0483, 0x015E, 0x06A5, 0x0335, 0x005E, 0x0025, 0x01D2, 0x00F6,
  832. 0x03D2, 0x032E, 0x03B5, 0x005A, 0x0203, 0x02A5, 0x0BD2, 0x004E,
  833. 0x0032, 0x01B5, 0x00B5, 0x0A65, 0x0225, 0x0276, 0x000E, 0x000A,
  834. 0x03E5, 0x0143, 0x01E5, 0x0036, 0x0092, 0x0005, 0x0009, 0x0665,
  835. 0x0076, 0x00C3, 0x003A, 0x0015, 0x0023, 0x0002, 0x000B, 0x0000,
  836. };
  837. static const uint8_t ac_vlc_descC_bits[96] = {
  838. 8, 11, 11, 7, 7, 7, 6, 6,
  839. 4, 3, 11, 8, 10, 8, 9, 6,
  840. 4, 9, 12, 10, 11, 7, 5, 9,
  841. 11, 10, 12, 8, 6, 10, 11, 12,
  842. 9, 7, 12, 10, 9, 8, 10, 9,
  843. 9, 11, 9, 12, 10, 11, 11, 12,
  844. 12, 11, 10, 9, 10, 10, 10, 11,
  845. 11, 9, 11, 11, 9, 10, 10, 8,
  846. 12, 11, 10, 7, 11, 11, 12, 8,
  847. 6, 10, 10, 12, 10, 10, 7, 5,
  848. 10, 9, 10, 8, 8, 6, 4, 11,
  849. 11, 8, 6, 7, 6, 5, 4, 2,
  850. };
  851. static const int tscc2_ac_vlc_sizes[NUM_VLC_SETS] = {
  852. 172, 169, 165, 162, 131, 132, 130, 125, 121, 114, 110, 101, 96
  853. };
  854. static const uint16_t * const tscc2_ac_vlc_syms[NUM_VLC_SETS] = {
  855. ac_vlc_desc0_syms, ac_vlc_desc1_syms, ac_vlc_desc2_syms, ac_vlc_desc3_syms,
  856. ac_vlc_desc4_syms, ac_vlc_desc5_syms, ac_vlc_desc6_syms, ac_vlc_desc7_syms,
  857. ac_vlc_desc8_syms, ac_vlc_desc9_syms, ac_vlc_descA_syms, ac_vlc_descB_syms,
  858. ac_vlc_descC_syms,
  859. };
  860. static const uint16_t * const tscc2_ac_vlc_codes[NUM_VLC_SETS] = {
  861. ac_vlc_desc0_codes, ac_vlc_desc1_codes, ac_vlc_desc2_codes,
  862. ac_vlc_desc3_codes, ac_vlc_desc4_codes, ac_vlc_desc5_codes,
  863. ac_vlc_desc6_codes, ac_vlc_desc7_codes, ac_vlc_desc8_codes,
  864. ac_vlc_desc9_codes, ac_vlc_descA_codes, ac_vlc_descB_codes,
  865. ac_vlc_descC_codes,
  866. };
  867. static const uint8_t * const tscc2_ac_vlc_bits[NUM_VLC_SETS] = {
  868. ac_vlc_desc0_bits, ac_vlc_desc1_bits, ac_vlc_desc2_bits, ac_vlc_desc3_bits,
  869. ac_vlc_desc4_bits, ac_vlc_desc5_bits, ac_vlc_desc6_bits, ac_vlc_desc7_bits,
  870. ac_vlc_desc8_bits, ac_vlc_desc9_bits, ac_vlc_descA_bits, ac_vlc_descB_bits,
  871. ac_vlc_descC_bits,
  872. };
  873. #endif /* AVCODEC_TSCC2DATA_H */