huffman.c 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107
  1. /*
  2. * libmad - MPEG audio decoder library
  3. * Copyright (C) 2000-2004 Underbit Technologies, Inc.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. * $Id: huffman.c,v 1.10 2004/01/23 09:41:32 rob Exp $
  20. */
  21. # include "libmad_config.h"
  22. # include "libmad_global.h"
  23. # include "huffman.h"
  24. /*
  25. * These are the Huffman code words for Layer III.
  26. * The data for these tables are derived from Table B.7 of ISO/IEC 11172-3.
  27. *
  28. * These tables support decoding up to 4 Huffman code bits at a time.
  29. */
  30. # if defined(__GNUC__) || \
  31. (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
  32. # define PTR(offs, bits) { .ptr = { 0, bits, offs } }
  33. # define V(v, w, x, y, hlen) { .value = { 1, hlen, v, w, x, y } }
  34. # else
  35. # define PTR(offs, bits) { { 0, bits, offs } }
  36. # if defined(WORDS_BIGENDIAN)
  37. # define V(v, w, x, y, hlen) { { 1, hlen, (v << 11) | (w << 10) | \
  38. (x << 9) | (y << 8) } }
  39. # else
  40. # define V(v, w, x, y, hlen) { { 1, hlen, (v << 0) | (w << 1) | \
  41. (x << 2) | (y << 3) } }
  42. # endif
  43. # endif
  44. static
  45. union huffquad const hufftabA[] = {
  46. /* 0000 */ PTR(16, 2),
  47. /* 0001 */ PTR(20, 2),
  48. /* 0010 */ PTR(24, 1),
  49. /* 0011 */ PTR(26, 1),
  50. /* 0100 */ V(0, 0, 1, 0, 4),
  51. /* 0101 */ V(0, 0, 0, 1, 4),
  52. /* 0110 */ V(0, 1, 0, 0, 4),
  53. /* 0111 */ V(1, 0, 0, 0, 4),
  54. /* 1000 */ V(0, 0, 0, 0, 1),
  55. /* 1001 */ V(0, 0, 0, 0, 1),
  56. /* 1010 */ V(0, 0, 0, 0, 1),
  57. /* 1011 */ V(0, 0, 0, 0, 1),
  58. /* 1100 */ V(0, 0, 0, 0, 1),
  59. /* 1101 */ V(0, 0, 0, 0, 1),
  60. /* 1110 */ V(0, 0, 0, 0, 1),
  61. /* 1111 */ V(0, 0, 0, 0, 1),
  62. /* 0000 ... */
  63. /* 00 */ V(1, 0, 1, 1, 2), /* 16 */
  64. /* 01 */ V(1, 1, 1, 1, 2),
  65. /* 10 */ V(1, 1, 0, 1, 2),
  66. /* 11 */ V(1, 1, 1, 0, 2),
  67. /* 0001 ... */
  68. /* 00 */ V(0, 1, 1, 1, 2), /* 20 */
  69. /* 01 */ V(0, 1, 0, 1, 2),
  70. /* 10 */ V(1, 0, 0, 1, 1),
  71. /* 11 */ V(1, 0, 0, 1, 1),
  72. /* 0010 ... */
  73. /* 0 */ V(0, 1, 1, 0, 1), /* 24 */
  74. /* 1 */ V(0, 0, 1, 1, 1),
  75. /* 0011 ... */
  76. /* 0 */ V(1, 0, 1, 0, 1), /* 26 */
  77. /* 1 */ V(1, 1, 0, 0, 1)
  78. };
  79. static
  80. union huffquad const hufftabB[] = {
  81. /* 0000 */ V(1, 1, 1, 1, 4),
  82. /* 0001 */ V(1, 1, 1, 0, 4),
  83. /* 0010 */ V(1, 1, 0, 1, 4),
  84. /* 0011 */ V(1, 1, 0, 0, 4),
  85. /* 0100 */ V(1, 0, 1, 1, 4),
  86. /* 0101 */ V(1, 0, 1, 0, 4),
  87. /* 0110 */ V(1, 0, 0, 1, 4),
  88. /* 0111 */ V(1, 0, 0, 0, 4),
  89. /* 1000 */ V(0, 1, 1, 1, 4),
  90. /* 1001 */ V(0, 1, 1, 0, 4),
  91. /* 1010 */ V(0, 1, 0, 1, 4),
  92. /* 1011 */ V(0, 1, 0, 0, 4),
  93. /* 1100 */ V(0, 0, 1, 1, 4),
  94. /* 1101 */ V(0, 0, 1, 0, 4),
  95. /* 1110 */ V(0, 0, 0, 1, 4),
  96. /* 1111 */ V(0, 0, 0, 0, 4)
  97. };
  98. # undef V
  99. # undef PTR
  100. # if defined(__GNUC__) || \
  101. (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901)
  102. # define PTR(offs, bits) { .ptr = { 0, bits, offs } }
  103. # define V(x, y, hlen) { .value = { 1, hlen, x, y } }
  104. # else
  105. # define PTR(offs, bits) { { 0, bits, offs } }
  106. # if defined(WORDS_BIGENDIAN)
  107. # define V(x, y, hlen) { { 1, hlen, (x << 8) | (y << 4) } }
  108. # else
  109. # define V(x, y, hlen) { { 1, hlen, (x << 0) | (y << 4) } }
  110. # endif
  111. # endif
  112. static
  113. union huffpair const hufftab0[] = {
  114. /* */ V(0, 0, 0)
  115. };
  116. static
  117. union huffpair const hufftab1[] = {
  118. /* 000 */ V(1, 1, 3),
  119. /* 001 */ V(0, 1, 3),
  120. /* 010 */ V(1, 0, 2),
  121. /* 011 */ V(1, 0, 2),
  122. /* 100 */ V(0, 0, 1),
  123. /* 101 */ V(0, 0, 1),
  124. /* 110 */ V(0, 0, 1),
  125. /* 111 */ V(0, 0, 1)
  126. };
  127. static
  128. union huffpair const hufftab2[] = {
  129. /* 000 */ PTR(8, 3),
  130. /* 001 */ V(1, 1, 3),
  131. /* 010 */ V(0, 1, 3),
  132. /* 011 */ V(1, 0, 3),
  133. /* 100 */ V(0, 0, 1),
  134. /* 101 */ V(0, 0, 1),
  135. /* 110 */ V(0, 0, 1),
  136. /* 111 */ V(0, 0, 1),
  137. /* 000 ... */
  138. /* 000 */ V(2, 2, 3), /* 8 */
  139. /* 001 */ V(0, 2, 3),
  140. /* 010 */ V(1, 2, 2),
  141. /* 011 */ V(1, 2, 2),
  142. /* 100 */ V(2, 1, 2),
  143. /* 101 */ V(2, 1, 2),
  144. /* 110 */ V(2, 0, 2),
  145. /* 111 */ V(2, 0, 2)
  146. };
  147. static
  148. union huffpair const hufftab3[] = {
  149. /* 000 */ PTR(8, 3),
  150. /* 001 */ V(1, 0, 3),
  151. /* 010 */ V(1, 1, 2),
  152. /* 011 */ V(1, 1, 2),
  153. /* 100 */ V(0, 1, 2),
  154. /* 101 */ V(0, 1, 2),
  155. /* 110 */ V(0, 0, 2),
  156. /* 111 */ V(0, 0, 2),
  157. /* 000 ... */
  158. /* 000 */ V(2, 2, 3), /* 8 */
  159. /* 001 */ V(0, 2, 3),
  160. /* 010 */ V(1, 2, 2),
  161. /* 011 */ V(1, 2, 2),
  162. /* 100 */ V(2, 1, 2),
  163. /* 101 */ V(2, 1, 2),
  164. /* 110 */ V(2, 0, 2),
  165. /* 111 */ V(2, 0, 2)
  166. };
  167. static
  168. union huffpair const hufftab5[] = {
  169. /* 000 */ PTR(8, 4),
  170. /* 001 */ V(1, 1, 3),
  171. /* 010 */ V(0, 1, 3),
  172. /* 011 */ V(1, 0, 3),
  173. /* 100 */ V(0, 0, 1),
  174. /* 101 */ V(0, 0, 1),
  175. /* 110 */ V(0, 0, 1),
  176. /* 111 */ V(0, 0, 1),
  177. /* 000 ... */
  178. /* 0000 */ PTR(24, 1), /* 8 */
  179. /* 0001 */ V(3, 2, 4),
  180. /* 0010 */ V(3, 1, 3),
  181. /* 0011 */ V(3, 1, 3),
  182. /* 0100 */ V(1, 3, 4),
  183. /* 0101 */ V(0, 3, 4),
  184. /* 0110 */ V(3, 0, 4),
  185. /* 0111 */ V(2, 2, 4),
  186. /* 1000 */ V(1, 2, 3),
  187. /* 1001 */ V(1, 2, 3),
  188. /* 1010 */ V(2, 1, 3),
  189. /* 1011 */ V(2, 1, 3),
  190. /* 1100 */ V(0, 2, 3),
  191. /* 1101 */ V(0, 2, 3),
  192. /* 1110 */ V(2, 0, 3),
  193. /* 1111 */ V(2, 0, 3),
  194. /* 000 0000 ... */
  195. /* 0 */ V(3, 3, 1), /* 24 */
  196. /* 1 */ V(2, 3, 1)
  197. };
  198. static
  199. union huffpair const hufftab6[] = {
  200. /* 0000 */ PTR(16, 3),
  201. /* 0001 */ PTR(24, 1),
  202. /* 0010 */ PTR(26, 1),
  203. /* 0011 */ V(1, 2, 4),
  204. /* 0100 */ V(2, 1, 4),
  205. /* 0101 */ V(2, 0, 4),
  206. /* 0110 */ V(0, 1, 3),
  207. /* 0111 */ V(0, 1, 3),
  208. /* 1000 */ V(1, 1, 2),
  209. /* 1001 */ V(1, 1, 2),
  210. /* 1010 */ V(1, 1, 2),
  211. /* 1011 */ V(1, 1, 2),
  212. /* 1100 */ V(1, 0, 3),
  213. /* 1101 */ V(1, 0, 3),
  214. /* 1110 */ V(0, 0, 3),
  215. /* 1111 */ V(0, 0, 3),
  216. /* 0000 ... */
  217. /* 000 */ V(3, 3, 3), /* 16 */
  218. /* 001 */ V(0, 3, 3),
  219. /* 010 */ V(2, 3, 2),
  220. /* 011 */ V(2, 3, 2),
  221. /* 100 */ V(3, 2, 2),
  222. /* 101 */ V(3, 2, 2),
  223. /* 110 */ V(3, 0, 2),
  224. /* 111 */ V(3, 0, 2),
  225. /* 0001 ... */
  226. /* 0 */ V(1, 3, 1), /* 24 */
  227. /* 1 */ V(3, 1, 1),
  228. /* 0010 ... */
  229. /* 0 */ V(2, 2, 1), /* 26 */
  230. /* 1 */ V(0, 2, 1)
  231. };
  232. static
  233. union huffpair const hufftab7[] = {
  234. /* 0000 */ PTR(16, 4),
  235. /* 0001 */ PTR(32, 4),
  236. /* 0010 */ PTR(48, 2),
  237. /* 0011 */ V(1, 1, 4),
  238. /* 0100 */ V(0, 1, 3),
  239. /* 0101 */ V(0, 1, 3),
  240. /* 0110 */ V(1, 0, 3),
  241. /* 0111 */ V(1, 0, 3),
  242. /* 1000 */ V(0, 0, 1),
  243. /* 1001 */ V(0, 0, 1),
  244. /* 1010 */ V(0, 0, 1),
  245. /* 1011 */ V(0, 0, 1),
  246. /* 1100 */ V(0, 0, 1),
  247. /* 1101 */ V(0, 0, 1),
  248. /* 1110 */ V(0, 0, 1),
  249. /* 1111 */ V(0, 0, 1),
  250. /* 0000 ... */
  251. /* 0000 */ PTR(52, 2), /* 16 */
  252. /* 0001 */ PTR(56, 1),
  253. /* 0010 */ PTR(58, 1),
  254. /* 0011 */ V(1, 5, 4),
  255. /* 0100 */ V(5, 1, 4),
  256. /* 0101 */ PTR(60, 1),
  257. /* 0110 */ V(5, 0, 4),
  258. /* 0111 */ PTR(62, 1),
  259. /* 1000 */ V(2, 4, 4),
  260. /* 1001 */ V(4, 2, 4),
  261. /* 1010 */ V(1, 4, 3),
  262. /* 1011 */ V(1, 4, 3),
  263. /* 1100 */ V(4, 1, 3),
  264. /* 1101 */ V(4, 1, 3),
  265. /* 1110 */ V(4, 0, 3),
  266. /* 1111 */ V(4, 0, 3),
  267. /* 0001 ... */
  268. /* 0000 */ V(0, 4, 4), /* 32 */
  269. /* 0001 */ V(2, 3, 4),
  270. /* 0010 */ V(3, 2, 4),
  271. /* 0011 */ V(0, 3, 4),
  272. /* 0100 */ V(1, 3, 3),
  273. /* 0101 */ V(1, 3, 3),
  274. /* 0110 */ V(3, 1, 3),
  275. /* 0111 */ V(3, 1, 3),
  276. /* 1000 */ V(3, 0, 3),
  277. /* 1001 */ V(3, 0, 3),
  278. /* 1010 */ V(2, 2, 3),
  279. /* 1011 */ V(2, 2, 3),
  280. /* 1100 */ V(1, 2, 2),
  281. /* 1101 */ V(1, 2, 2),
  282. /* 1110 */ V(1, 2, 2),
  283. /* 1111 */ V(1, 2, 2),
  284. /* 0010 ... */
  285. /* 00 */ V(2, 1, 1), /* 48 */
  286. /* 01 */ V(2, 1, 1),
  287. /* 10 */ V(0, 2, 2),
  288. /* 11 */ V(2, 0, 2),
  289. /* 0000 0000 ... */
  290. /* 00 */ V(5, 5, 2), /* 52 */
  291. /* 01 */ V(4, 5, 2),
  292. /* 10 */ V(5, 4, 2),
  293. /* 11 */ V(5, 3, 2),
  294. /* 0000 0001 ... */
  295. /* 0 */ V(3, 5, 1), /* 56 */
  296. /* 1 */ V(4, 4, 1),
  297. /* 0000 0010 ... */
  298. /* 0 */ V(2, 5, 1), /* 58 */
  299. /* 1 */ V(5, 2, 1),
  300. /* 0000 0101 ... */
  301. /* 0 */ V(0, 5, 1), /* 60 */
  302. /* 1 */ V(3, 4, 1),
  303. /* 0000 0111 ... */
  304. /* 0 */ V(4, 3, 1), /* 62 */
  305. /* 1 */ V(3, 3, 1)
  306. };
  307. # if 0
  308. /* this version saves 8 entries (16 bytes) at the expense of
  309. an extra lookup in 4 out of 36 cases */
  310. static
  311. union huffpair const hufftab8[] = {
  312. /* 0000 */ PTR(16, 4),
  313. /* 0001 */ PTR(32, 2),
  314. /* 0010 */ V(1, 2, 4),
  315. /* 0011 */ V(2, 1, 4),
  316. /* 0100 */ V(1, 1, 2),
  317. /* 0101 */ V(1, 1, 2),
  318. /* 0110 */ V(1, 1, 2),
  319. /* 0111 */ V(1, 1, 2),
  320. /* 1000 */ V(0, 1, 3),
  321. /* 1001 */ V(0, 1, 3),
  322. /* 1010 */ V(1, 0, 3),
  323. /* 1011 */ V(1, 0, 3),
  324. /* 1100 */ V(0, 0, 2),
  325. /* 1101 */ V(0, 0, 2),
  326. /* 1110 */ V(0, 0, 2),
  327. /* 1111 */ V(0, 0, 2),
  328. /* 0000 ... */
  329. /* 0000 */ PTR(36, 3), /* 16 */
  330. /* 0001 */ PTR(44, 2),
  331. /* 0010 */ PTR(48, 1),
  332. /* 0011 */ V(1, 5, 4),
  333. /* 0100 */ V(5, 1, 4),
  334. /* 0101 */ PTR(50, 1),
  335. /* 0110 */ PTR(52, 1),
  336. /* 0111 */ V(2, 4, 4),
  337. /* 1000 */ V(4, 2, 4),
  338. /* 1001 */ V(1, 4, 4),
  339. /* 1010 */ V(4, 1, 3),
  340. /* 1011 */ V(4, 1, 3),
  341. /* 1100 */ V(0, 4, 4),
  342. /* 1101 */ V(4, 0, 4),
  343. /* 1110 */ V(2, 3, 4),
  344. /* 1111 */ V(3, 2, 4),
  345. /* 0001 ... */
  346. /* 00 */ PTR(54, 2), /* 32 */
  347. /* 01 */ V(2, 2, 2),
  348. /* 10 */ V(0, 2, 2),
  349. /* 11 */ V(2, 0, 2),
  350. /* 0000 0000 ... */
  351. /* 000 */ V(5, 5, 3), /* 36 */
  352. /* 001 */ V(5, 4, 3),
  353. /* 010 */ V(4, 5, 2),
  354. /* 011 */ V(4, 5, 2),
  355. /* 100 */ V(5, 3, 1),
  356. /* 101 */ V(5, 3, 1),
  357. /* 110 */ V(5, 3, 1),
  358. /* 111 */ V(5, 3, 1),
  359. /* 0000 0001 ... */
  360. /* 00 */ V(3, 5, 2), /* 44 */
  361. /* 01 */ V(4, 4, 2),
  362. /* 10 */ V(2, 5, 1),
  363. /* 11 */ V(2, 5, 1),
  364. /* 0000 0010 ... */
  365. /* 0 */ V(5, 2, 1), /* 48 */
  366. /* 1 */ V(0, 5, 1),
  367. /* 0000 0101 ... */
  368. /* 0 */ V(3, 4, 1), /* 50 */
  369. /* 1 */ V(4, 3, 1),
  370. /* 0000 0110 ... */
  371. /* 0 */ V(5, 0, 1), /* 52 */
  372. /* 1 */ V(3, 3, 1),
  373. /* 0001 00 ... */
  374. /* 00 */ V(1, 3, 2), /* 54 */
  375. /* 01 */ V(3, 1, 2),
  376. /* 10 */ V(0, 3, 2),
  377. /* 11 */ V(3, 0, 2),
  378. };
  379. # else
  380. static
  381. union huffpair const hufftab8[] = {
  382. /* 0000 */ PTR(16, 4),
  383. /* 0001 */ PTR(32, 4),
  384. /* 0010 */ V(1, 2, 4),
  385. /* 0011 */ V(2, 1, 4),
  386. /* 0100 */ V(1, 1, 2),
  387. /* 0101 */ V(1, 1, 2),
  388. /* 0110 */ V(1, 1, 2),
  389. /* 0111 */ V(1, 1, 2),
  390. /* 1000 */ V(0, 1, 3),
  391. /* 1001 */ V(0, 1, 3),
  392. /* 1010 */ V(1, 0, 3),
  393. /* 1011 */ V(1, 0, 3),
  394. /* 1100 */ V(0, 0, 2),
  395. /* 1101 */ V(0, 0, 2),
  396. /* 1110 */ V(0, 0, 2),
  397. /* 1111 */ V(0, 0, 2),
  398. /* 0000 ... */
  399. /* 0000 */ PTR(48, 3), /* 16 */
  400. /* 0001 */ PTR(56, 2),
  401. /* 0010 */ PTR(60, 1),
  402. /* 0011 */ V(1, 5, 4),
  403. /* 0100 */ V(5, 1, 4),
  404. /* 0101 */ PTR(62, 1),
  405. /* 0110 */ PTR(64, 1),
  406. /* 0111 */ V(2, 4, 4),
  407. /* 1000 */ V(4, 2, 4),
  408. /* 1001 */ V(1, 4, 4),
  409. /* 1010 */ V(4, 1, 3),
  410. /* 1011 */ V(4, 1, 3),
  411. /* 1100 */ V(0, 4, 4),
  412. /* 1101 */ V(4, 0, 4),
  413. /* 1110 */ V(2, 3, 4),
  414. /* 1111 */ V(3, 2, 4),
  415. /* 0001 ... */
  416. /* 0000 */ V(1, 3, 4), /* 32 */
  417. /* 0001 */ V(3, 1, 4),
  418. /* 0010 */ V(0, 3, 4),
  419. /* 0011 */ V(3, 0, 4),
  420. /* 0100 */ V(2, 2, 2),
  421. /* 0101 */ V(2, 2, 2),
  422. /* 0110 */ V(2, 2, 2),
  423. /* 0111 */ V(2, 2, 2),
  424. /* 1000 */ V(0, 2, 2),
  425. /* 1001 */ V(0, 2, 2),
  426. /* 1010 */ V(0, 2, 2),
  427. /* 1011 */ V(0, 2, 2),
  428. /* 1100 */ V(2, 0, 2),
  429. /* 1101 */ V(2, 0, 2),
  430. /* 1110 */ V(2, 0, 2),
  431. /* 1111 */ V(2, 0, 2),
  432. /* 0000 0000 ... */
  433. /* 000 */ V(5, 5, 3), /* 48 */
  434. /* 001 */ V(5, 4, 3),
  435. /* 010 */ V(4, 5, 2),
  436. /* 011 */ V(4, 5, 2),
  437. /* 100 */ V(5, 3, 1),
  438. /* 101 */ V(5, 3, 1),
  439. /* 110 */ V(5, 3, 1),
  440. /* 111 */ V(5, 3, 1),
  441. /* 0000 0001 ... */
  442. /* 00 */ V(3, 5, 2), /* 56 */
  443. /* 01 */ V(4, 4, 2),
  444. /* 10 */ V(2, 5, 1),
  445. /* 11 */ V(2, 5, 1),
  446. /* 0000 0010 ... */
  447. /* 0 */ V(5, 2, 1), /* 60 */
  448. /* 1 */ V(0, 5, 1),
  449. /* 0000 0101 ... */
  450. /* 0 */ V(3, 4, 1), /* 62 */
  451. /* 1 */ V(4, 3, 1),
  452. /* 0000 0110 ... */
  453. /* 0 */ V(5, 0, 1), /* 64 */
  454. /* 1 */ V(3, 3, 1)
  455. };
  456. # endif
  457. static
  458. union huffpair const hufftab9[] = {
  459. /* 0000 */ PTR(16, 4),
  460. /* 0001 */ PTR(32, 3),
  461. /* 0010 */ PTR(40, 2),
  462. /* 0011 */ PTR(44, 2),
  463. /* 0100 */ PTR(48, 1),
  464. /* 0101 */ V(1, 2, 4),
  465. /* 0110 */ V(2, 1, 4),
  466. /* 0111 */ V(2, 0, 4),
  467. /* 1000 */ V(1, 1, 3),
  468. /* 1001 */ V(1, 1, 3),
  469. /* 1010 */ V(0, 1, 3),
  470. /* 1011 */ V(0, 1, 3),
  471. /* 1100 */ V(1, 0, 3),
  472. /* 1101 */ V(1, 0, 3),
  473. /* 1110 */ V(0, 0, 3),
  474. /* 1111 */ V(0, 0, 3),
  475. /* 0000 ... */
  476. /* 0000 */ PTR(50, 1), /* 16 */
  477. /* 0001 */ V(3, 5, 4),
  478. /* 0010 */ V(5, 3, 4),
  479. /* 0011 */ PTR(52, 1),
  480. /* 0100 */ V(4, 4, 4),
  481. /* 0101 */ V(2, 5, 4),
  482. /* 0110 */ V(5, 2, 4),
  483. /* 0111 */ V(1, 5, 4),
  484. /* 1000 */ V(5, 1, 3),
  485. /* 1001 */ V(5, 1, 3),
  486. /* 1010 */ V(3, 4, 3),
  487. /* 1011 */ V(3, 4, 3),
  488. /* 1100 */ V(4, 3, 3),
  489. /* 1101 */ V(4, 3, 3),
  490. /* 1110 */ V(5, 0, 4),
  491. /* 1111 */ V(0, 4, 4),
  492. /* 0001 ... */
  493. /* 000 */ V(2, 4, 3), /* 32 */
  494. /* 001 */ V(4, 2, 3),
  495. /* 010 */ V(3, 3, 3),
  496. /* 011 */ V(4, 0, 3),
  497. /* 100 */ V(1, 4, 2),
  498. /* 101 */ V(1, 4, 2),
  499. /* 110 */ V(4, 1, 2),
  500. /* 111 */ V(4, 1, 2),
  501. /* 0010 ... */
  502. /* 00 */ V(2, 3, 2), /* 40 */
  503. /* 01 */ V(3, 2, 2),
  504. /* 10 */ V(1, 3, 1),
  505. /* 11 */ V(1, 3, 1),
  506. /* 0011 ... */
  507. /* 00 */ V(3, 1, 1), /* 44 */
  508. /* 01 */ V(3, 1, 1),
  509. /* 10 */ V(0, 3, 2),
  510. /* 11 */ V(3, 0, 2),
  511. /* 0100 ... */
  512. /* 0 */ V(2, 2, 1), /* 48 */
  513. /* 1 */ V(0, 2, 1),
  514. /* 0000 0000 ... */
  515. /* 0 */ V(5, 5, 1), /* 50 */
  516. /* 1 */ V(4, 5, 1),
  517. /* 0000 0011 ... */
  518. /* 0 */ V(5, 4, 1), /* 52 */
  519. /* 1 */ V(0, 5, 1)
  520. };
  521. static
  522. union huffpair const hufftab10[] = {
  523. /* 0000 */ PTR(16, 4),
  524. /* 0001 */ PTR(32, 4),
  525. /* 0010 */ PTR(48, 2),
  526. /* 0011 */ V(1, 1, 4),
  527. /* 0100 */ V(0, 1, 3),
  528. /* 0101 */ V(0, 1, 3),
  529. /* 0110 */ V(1, 0, 3),
  530. /* 0111 */ V(1, 0, 3),
  531. /* 1000 */ V(0, 0, 1),
  532. /* 1001 */ V(0, 0, 1),
  533. /* 1010 */ V(0, 0, 1),
  534. /* 1011 */ V(0, 0, 1),
  535. /* 1100 */ V(0, 0, 1),
  536. /* 1101 */ V(0, 0, 1),
  537. /* 1110 */ V(0, 0, 1),
  538. /* 1111 */ V(0, 0, 1),
  539. /* 0000 ... */
  540. /* 0000 */ PTR(52, 3), /* 16 */
  541. /* 0001 */ PTR(60, 2),
  542. /* 0010 */ PTR(64, 3),
  543. /* 0011 */ PTR(72, 1),
  544. /* 0100 */ PTR(74, 2),
  545. /* 0101 */ PTR(78, 2),
  546. /* 0110 */ PTR(82, 2),
  547. /* 0111 */ V(1, 7, 4),
  548. /* 1000 */ V(7, 1, 4),
  549. /* 1001 */ PTR(86, 1),
  550. /* 1010 */ PTR(88, 2),
  551. /* 1011 */ PTR(92, 2),
  552. /* 1100 */ V(1, 6, 4),
  553. /* 1101 */ V(6, 1, 4),
  554. /* 1110 */ V(6, 0, 4),
  555. /* 1111 */ PTR(96, 1),
  556. /* 0001 ... */
  557. /* 0000 */ PTR(98, 1), /* 32 */
  558. /* 0001 */ PTR(100, 1),
  559. /* 0010 */ V(1, 4, 4),
  560. /* 0011 */ V(4, 1, 4),
  561. /* 0100 */ V(4, 0, 4),
  562. /* 0101 */ V(2, 3, 4),
  563. /* 0110 */ V(3, 2, 4),
  564. /* 0111 */ V(0, 3, 4),
  565. /* 1000 */ V(1, 3, 3),
  566. /* 1001 */ V(1, 3, 3),
  567. /* 1010 */ V(3, 1, 3),
  568. /* 1011 */ V(3, 1, 3),
  569. /* 1100 */ V(3, 0, 3),
  570. /* 1101 */ V(3, 0, 3),
  571. /* 1110 */ V(2, 2, 3),
  572. /* 1111 */ V(2, 2, 3),
  573. /* 0010 ... */
  574. /* 00 */ V(1, 2, 2), /* 48 */
  575. /* 01 */ V(2, 1, 2),
  576. /* 10 */ V(0, 2, 2),
  577. /* 11 */ V(2, 0, 2),
  578. /* 0000 0000 ... */
  579. /* 000 */ V(7, 7, 3), /* 52 */
  580. /* 001 */ V(6, 7, 3),
  581. /* 010 */ V(7, 6, 3),
  582. /* 011 */ V(5, 7, 3),
  583. /* 100 */ V(7, 5, 3),
  584. /* 101 */ V(6, 6, 3),
  585. /* 110 */ V(4, 7, 2),
  586. /* 111 */ V(4, 7, 2),
  587. /* 0000 0001 ... */
  588. /* 00 */ V(7, 4, 2), /* 60 */
  589. /* 01 */ V(5, 6, 2),
  590. /* 10 */ V(6, 5, 2),
  591. /* 11 */ V(3, 7, 2),
  592. /* 0000 0010 ... */
  593. /* 000 */ V(7, 3, 2), /* 64 */
  594. /* 001 */ V(7, 3, 2),
  595. /* 010 */ V(4, 6, 2),
  596. /* 011 */ V(4, 6, 2),
  597. /* 100 */ V(5, 5, 3),
  598. /* 101 */ V(5, 4, 3),
  599. /* 110 */ V(6, 3, 2),
  600. /* 111 */ V(6, 3, 2),
  601. /* 0000 0011 ... */
  602. /* 0 */ V(2, 7, 1), /* 72 */
  603. /* 1 */ V(7, 2, 1),
  604. /* 0000 0100 ... */
  605. /* 00 */ V(6, 4, 2), /* 74 */
  606. /* 01 */ V(0, 7, 2),
  607. /* 10 */ V(7, 0, 1),
  608. /* 11 */ V(7, 0, 1),
  609. /* 0000 0101 ... */
  610. /* 00 */ V(6, 2, 1), /* 78 */
  611. /* 01 */ V(6, 2, 1),
  612. /* 10 */ V(4, 5, 2),
  613. /* 11 */ V(3, 5, 2),
  614. /* 0000 0110 ... */
  615. /* 00 */ V(0, 6, 1), /* 82 */
  616. /* 01 */ V(0, 6, 1),
  617. /* 10 */ V(5, 3, 2),
  618. /* 11 */ V(4, 4, 2),
  619. /* 0000 1001 ... */
  620. /* 0 */ V(3, 6, 1), /* 86 */
  621. /* 1 */ V(2, 6, 1),
  622. /* 0000 1010 ... */
  623. /* 00 */ V(2, 5, 2), /* 88 */
  624. /* 01 */ V(5, 2, 2),
  625. /* 10 */ V(1, 5, 1),
  626. /* 11 */ V(1, 5, 1),
  627. /* 0000 1011 ... */
  628. /* 00 */ V(5, 1, 1), /* 92 */
  629. /* 01 */ V(5, 1, 1),
  630. /* 10 */ V(3, 4, 2),
  631. /* 11 */ V(4, 3, 2),
  632. /* 0000 1111 ... */
  633. /* 0 */ V(0, 5, 1), /* 96 */
  634. /* 1 */ V(5, 0, 1),
  635. /* 0001 0000 ... */
  636. /* 0 */ V(2, 4, 1), /* 98 */
  637. /* 1 */ V(4, 2, 1),
  638. /* 0001 0001 ... */
  639. /* 0 */ V(3, 3, 1), /* 100 */
  640. /* 1 */ V(0, 4, 1)
  641. };
  642. static
  643. union huffpair const hufftab11[] = {
  644. /* 0000 */ PTR(16, 4),
  645. /* 0001 */ PTR(32, 4),
  646. /* 0010 */ PTR(48, 4),
  647. /* 0011 */ PTR(64, 3),
  648. /* 0100 */ V(1, 2, 4),
  649. /* 0101 */ PTR(72, 1),
  650. /* 0110 */ V(1, 1, 3),
  651. /* 0111 */ V(1, 1, 3),
  652. /* 1000 */ V(0, 1, 3),
  653. /* 1001 */ V(0, 1, 3),
  654. /* 1010 */ V(1, 0, 3),
  655. /* 1011 */ V(1, 0, 3),
  656. /* 1100 */ V(0, 0, 2),
  657. /* 1101 */ V(0, 0, 2),
  658. /* 1110 */ V(0, 0, 2),
  659. /* 1111 */ V(0, 0, 2),
  660. /* 0000 ... */
  661. /* 0000 */ PTR(74, 2), /* 16 */
  662. /* 0001 */ PTR(78, 3),
  663. /* 0010 */ PTR(86, 2),
  664. /* 0011 */ PTR(90, 1),
  665. /* 0100 */ PTR(92, 2),
  666. /* 0101 */ V(2, 7, 4),
  667. /* 0110 */ V(7, 2, 4),
  668. /* 0111 */ PTR(96, 1),
  669. /* 1000 */ V(7, 1, 3),
  670. /* 1001 */ V(7, 1, 3),
  671. /* 1010 */ V(1, 7, 4),
  672. /* 1011 */ V(7, 0, 4),
  673. /* 1100 */ V(3, 6, 4),
  674. /* 1101 */ V(6, 3, 4),
  675. /* 1110 */ V(6, 0, 4),
  676. /* 1111 */ PTR(98, 1),
  677. /* 0001 ... */
  678. /* 0000 */ PTR(100, 1), /* 32 */
  679. /* 0001 */ V(1, 5, 4),
  680. /* 0010 */ V(6, 2, 3),
  681. /* 0011 */ V(6, 2, 3),
  682. /* 0100 */ V(2, 6, 4),
  683. /* 0101 */ V(0, 6, 4),
  684. /* 0110 */ V(1, 6, 3),
  685. /* 0111 */ V(1, 6, 3),
  686. /* 1000 */ V(6, 1, 3),
  687. /* 1001 */ V(6, 1, 3),
  688. /* 1010 */ V(5, 1, 4),
  689. /* 1011 */ V(3, 4, 4),
  690. /* 1100 */ V(5, 0, 4),
  691. /* 1101 */ PTR(102, 1),
  692. /* 1110 */ V(2, 4, 4),
  693. /* 1111 */ V(4, 2, 4),
  694. /* 0010 ... */
  695. /* 0000 */ V(1, 4, 4), /* 48 */
  696. /* 0001 */ V(4, 1, 4),
  697. /* 0010 */ V(0, 4, 4),
  698. /* 0011 */ V(4, 0, 4),
  699. /* 0100 */ V(2, 3, 3),
  700. /* 0101 */ V(2, 3, 3),
  701. /* 0110 */ V(3, 2, 3),
  702. /* 0111 */ V(3, 2, 3),
  703. /* 1000 */ V(1, 3, 2),
  704. /* 1001 */ V(1, 3, 2),
  705. /* 1010 */ V(1, 3, 2),
  706. /* 1011 */ V(1, 3, 2),
  707. /* 1100 */ V(3, 1, 2),
  708. /* 1101 */ V(3, 1, 2),
  709. /* 1110 */ V(3, 1, 2),
  710. /* 1111 */ V(3, 1, 2),
  711. /* 0011 ... */
  712. /* 000 */ V(0, 3, 3), /* 64 */
  713. /* 001 */ V(3, 0, 3),
  714. /* 010 */ V(2, 2, 2),
  715. /* 011 */ V(2, 2, 2),
  716. /* 100 */ V(2, 1, 1),
  717. /* 101 */ V(2, 1, 1),
  718. /* 110 */ V(2, 1, 1),
  719. /* 111 */ V(2, 1, 1),
  720. /* 0101 ... */
  721. /* 0 */ V(0, 2, 1), /* 72 */
  722. /* 1 */ V(2, 0, 1),
  723. /* 0000 0000 ... */
  724. /* 00 */ V(7, 7, 2), /* 74 */
  725. /* 01 */ V(6, 7, 2),
  726. /* 10 */ V(7, 6, 2),
  727. /* 11 */ V(7, 5, 2),
  728. /* 0000 0001 ... */
  729. /* 000 */ V(6, 6, 2), /* 78 */
  730. /* 001 */ V(6, 6, 2),
  731. /* 010 */ V(4, 7, 2),
  732. /* 011 */ V(4, 7, 2),
  733. /* 100 */ V(7, 4, 2),
  734. /* 101 */ V(7, 4, 2),
  735. /* 110 */ V(5, 7, 3),
  736. /* 111 */ V(5, 5, 3),
  737. /* 0000 0010 ... */
  738. /* 00 */ V(5, 6, 2), /* 86 */
  739. /* 01 */ V(6, 5, 2),
  740. /* 10 */ V(3, 7, 1),
  741. /* 11 */ V(3, 7, 1),
  742. /* 0000 0011 ... */
  743. /* 0 */ V(7, 3, 1), /* 90 */
  744. /* 1 */ V(4, 6, 1),
  745. /* 0000 0100 ... */
  746. /* 00 */ V(4, 5, 2), /* 92 */
  747. /* 01 */ V(5, 4, 2),
  748. /* 10 */ V(3, 5, 2),
  749. /* 11 */ V(5, 3, 2),
  750. /* 0000 0111 ... */
  751. /* 0 */ V(6, 4, 1), /* 96 */
  752. /* 1 */ V(0, 7, 1),
  753. /* 0000 1111 ... */
  754. /* 0 */ V(4, 4, 1), /* 98 */
  755. /* 1 */ V(2, 5, 1),
  756. /* 0001 0000 ... */
  757. /* 0 */ V(5, 2, 1), /* 100 */
  758. /* 1 */ V(0, 5, 1),
  759. /* 0001 1101 ... */
  760. /* 0 */ V(4, 3, 1), /* 102 */
  761. /* 1 */ V(3, 3, 1)
  762. };
  763. static
  764. union huffpair const hufftab12[] = {
  765. /* 0000 */ PTR(16, 4),
  766. /* 0001 */ PTR(32, 4),
  767. /* 0010 */ PTR(48, 4),
  768. /* 0011 */ PTR(64, 2),
  769. /* 0100 */ PTR(68, 3),
  770. /* 0101 */ PTR(76, 1),
  771. /* 0110 */ V(1, 2, 4),
  772. /* 0111 */ V(2, 1, 4),
  773. /* 1000 */ PTR(78, 1),
  774. /* 1001 */ V(0, 0, 4),
  775. /* 1010 */ V(1, 1, 3),
  776. /* 1011 */ V(1, 1, 3),
  777. /* 1100 */ V(0, 1, 3),
  778. /* 1101 */ V(0, 1, 3),
  779. /* 1110 */ V(1, 0, 3),
  780. /* 1111 */ V(1, 0, 3),
  781. /* 0000 ... */
  782. /* 0000 */ PTR(80, 2), /* 16 */
  783. /* 0001 */ PTR(84, 1),
  784. /* 0010 */ PTR(86, 1),
  785. /* 0011 */ PTR(88, 1),
  786. /* 0100 */ V(5, 6, 4),
  787. /* 0101 */ V(3, 7, 4),
  788. /* 0110 */ PTR(90, 1),
  789. /* 0111 */ V(2, 7, 4),
  790. /* 1000 */ V(7, 2, 4),
  791. /* 1001 */ V(4, 6, 4),
  792. /* 1010 */ V(6, 4, 4),
  793. /* 1011 */ V(1, 7, 4),
  794. /* 1100 */ V(7, 1, 4),
  795. /* 1101 */ PTR(92, 1),
  796. /* 1110 */ V(3, 6, 4),
  797. /* 1111 */ V(6, 3, 4),
  798. /* 0001 ... */
  799. /* 0000 */ V(4, 5, 4), /* 32 */
  800. /* 0001 */ V(5, 4, 4),
  801. /* 0010 */ V(4, 4, 4),
  802. /* 0011 */ PTR(94, 1),
  803. /* 0100 */ V(2, 6, 3),
  804. /* 0101 */ V(2, 6, 3),
  805. /* 0110 */ V(6, 2, 3),
  806. /* 0111 */ V(6, 2, 3),
  807. /* 1000 */ V(6, 1, 3),
  808. /* 1001 */ V(6, 1, 3),
  809. /* 1010 */ V(1, 6, 4),
  810. /* 1011 */ V(6, 0, 4),
  811. /* 1100 */ V(3, 5, 4),
  812. /* 1101 */ V(5, 3, 4),
  813. /* 1110 */ V(2, 5, 4),
  814. /* 1111 */ V(5, 2, 4),
  815. /* 0010 ... */
  816. /* 0000 */ V(1, 5, 3), /* 48 */
  817. /* 0001 */ V(1, 5, 3),
  818. /* 0010 */ V(5, 1, 3),
  819. /* 0011 */ V(5, 1, 3),
  820. /* 0100 */ V(3, 4, 3),
  821. /* 0101 */ V(3, 4, 3),
  822. /* 0110 */ V(4, 3, 3),
  823. /* 0111 */ V(4, 3, 3),
  824. /* 1000 */ V(5, 0, 4),
  825. /* 1001 */ V(0, 4, 4),
  826. /* 1010 */ V(2, 4, 3),
  827. /* 1011 */ V(2, 4, 3),
  828. /* 1100 */ V(4, 2, 3),
  829. /* 1101 */ V(4, 2, 3),
  830. /* 1110 */ V(1, 4, 3),
  831. /* 1111 */ V(1, 4, 3),
  832. /* 0011 ... */
  833. /* 00 */ V(3, 3, 2), /* 64 */
  834. /* 01 */ V(4, 1, 2),
  835. /* 10 */ V(2, 3, 2),
  836. /* 11 */ V(3, 2, 2),
  837. /* 0100 ... */
  838. /* 000 */ V(4, 0, 3), /* 68 */
  839. /* 001 */ V(0, 3, 3),
  840. /* 010 */ V(3, 0, 2),
  841. /* 011 */ V(3, 0, 2),
  842. /* 100 */ V(1, 3, 1),
  843. /* 101 */ V(1, 3, 1),
  844. /* 110 */ V(1, 3, 1),
  845. /* 111 */ V(1, 3, 1),
  846. /* 0101 ... */
  847. /* 0 */ V(3, 1, 1), /* 76 */
  848. /* 1 */ V(2, 2, 1),
  849. /* 1000 ... */
  850. /* 0 */ V(0, 2, 1), /* 78 */
  851. /* 1 */ V(2, 0, 1),
  852. /* 0000 0000 ... */
  853. /* 00 */ V(7, 7, 2), /* 80 */
  854. /* 01 */ V(6, 7, 2),
  855. /* 10 */ V(7, 6, 1),
  856. /* 11 */ V(7, 6, 1),
  857. /* 0000 0001 ... */
  858. /* 0 */ V(5, 7, 1), /* 84 */
  859. /* 1 */ V(7, 5, 1),
  860. /* 0000 0010 ... */
  861. /* 0 */ V(6, 6, 1), /* 86 */
  862. /* 1 */ V(4, 7, 1),
  863. /* 0000 0011 ... */
  864. /* 0 */ V(7, 4, 1), /* 88 */
  865. /* 1 */ V(6, 5, 1),
  866. /* 0000 0110 ... */
  867. /* 0 */ V(7, 3, 1), /* 90 */
  868. /* 1 */ V(5, 5, 1),
  869. /* 0000 1101 ... */
  870. /* 0 */ V(0, 7, 1), /* 92 */
  871. /* 1 */ V(7, 0, 1),
  872. /* 0001 0011 ... */
  873. /* 0 */ V(0, 6, 1), /* 94 */
  874. /* 1 */ V(0, 5, 1)
  875. };
  876. static
  877. union huffpair const hufftab13[] = {
  878. /* 0000 */ PTR(16, 4),
  879. /* 0001 */ PTR(32, 4),
  880. /* 0010 */ PTR(48, 4),
  881. /* 0011 */ PTR(64, 2),
  882. /* 0100 */ V(1, 1, 4),
  883. /* 0101 */ V(0, 1, 4),
  884. /* 0110 */ V(1, 0, 3),
  885. /* 0111 */ V(1, 0, 3),
  886. /* 1000 */ V(0, 0, 1),
  887. /* 1001 */ V(0, 0, 1),
  888. /* 1010 */ V(0, 0, 1),
  889. /* 1011 */ V(0, 0, 1),
  890. /* 1100 */ V(0, 0, 1),
  891. /* 1101 */ V(0, 0, 1),
  892. /* 1110 */ V(0, 0, 1),
  893. /* 1111 */ V(0, 0, 1),
  894. /* 0000 ... */
  895. /* 0000 */ PTR(68, 4), /* 16 */
  896. /* 0001 */ PTR(84, 4),
  897. /* 0010 */ PTR(100, 4),
  898. /* 0011 */ PTR(116, 4),
  899. /* 0100 */ PTR(132, 4),
  900. /* 0101 */ PTR(148, 4),
  901. /* 0110 */ PTR(164, 3),
  902. /* 0111 */ PTR(172, 3),
  903. /* 1000 */ PTR(180, 3),
  904. /* 1001 */ PTR(188, 3),
  905. /* 1010 */ PTR(196, 3),
  906. /* 1011 */ PTR(204, 3),
  907. /* 1100 */ PTR(212, 1),
  908. /* 1101 */ PTR(214, 2),
  909. /* 1110 */ PTR(218, 3),
  910. /* 1111 */ PTR(226, 1),
  911. /* 0001 ... */
  912. /* 0000 */ PTR(228, 2), /* 32 */
  913. /* 0001 */ PTR(232, 2),
  914. /* 0010 */ PTR(236, 2),
  915. /* 0011 */ PTR(240, 2),
  916. /* 0100 */ V(8, 1, 4),
  917. /* 0101 */ PTR(244, 1),
  918. /* 0110 */ PTR(246, 1),
  919. /* 0111 */ PTR(248, 1),
  920. /* 1000 */ PTR(250, 2),
  921. /* 1001 */ PTR(254, 1),
  922. /* 1010 */ V(1, 5, 4),
  923. /* 1011 */ V(5, 1, 4),
  924. /* 1100 */ PTR(256, 1),
  925. /* 1101 */ PTR(258, 1),
  926. /* 1110 */ PTR(260, 1),
  927. /* 1111 */ V(1, 4, 4),
  928. /* 0010 ... */
  929. /* 0000 */ V(4, 1, 3), /* 48 */
  930. /* 0001 */ V(4, 1, 3),
  931. /* 0010 */ V(0, 4, 4),
  932. /* 0011 */ V(4, 0, 4),
  933. /* 0100 */ V(2, 3, 4),
  934. /* 0101 */ V(3, 2, 4),
  935. /* 0110 */ V(1, 3, 3),
  936. /* 0111 */ V(1, 3, 3),
  937. /* 1000 */ V(3, 1, 3),
  938. /* 1001 */ V(3, 1, 3),
  939. /* 1010 */ V(0, 3, 3),
  940. /* 1011 */ V(0, 3, 3),
  941. /* 1100 */ V(3, 0, 3),
  942. /* 1101 */ V(3, 0, 3),
  943. /* 1110 */ V(2, 2, 3),
  944. /* 1111 */ V(2, 2, 3),
  945. /* 0011 ... */
  946. /* 00 */ V(1, 2, 2), /* 64 */
  947. /* 01 */ V(2, 1, 2),
  948. /* 10 */ V(0, 2, 2),
  949. /* 11 */ V(2, 0, 2),
  950. /* 0000 0000 ... */
  951. /* 0000 */ PTR(262, 4), /* 68 */
  952. /* 0001 */ PTR(278, 4),
  953. /* 0010 */ PTR(294, 4),
  954. /* 0011 */ PTR(310, 3),
  955. /* 0100 */ PTR(318, 2),
  956. /* 0101 */ PTR(322, 2),
  957. /* 0110 */ PTR(326, 3),
  958. /* 0111 */ PTR(334, 2),
  959. /* 1000 */ PTR(338, 1),
  960. /* 1001 */ PTR(340, 2),
  961. /* 1010 */ PTR(344, 2),
  962. /* 1011 */ PTR(348, 2),
  963. /* 1100 */ PTR(352, 2),
  964. /* 1101 */ PTR(356, 2),
  965. /* 1110 */ V(1, 15, 4),
  966. /* 1111 */ V(15, 1, 4),
  967. /* 0000 0001 ... */
  968. /* 0000 */ V(15, 0, 4), /* 84 */
  969. /* 0001 */ PTR(360, 1),
  970. /* 0010 */ PTR(362, 1),
  971. /* 0011 */ PTR(364, 1),
  972. /* 0100 */ V(14, 2, 4),
  973. /* 0101 */ PTR(366, 1),
  974. /* 0110 */ V(1, 14, 4),
  975. /* 0111 */ V(14, 1, 4),
  976. /* 1000 */ PTR(368, 1),
  977. /* 1001 */ PTR(370, 1),
  978. /* 1010 */ PTR(372, 1),
  979. /* 1011 */ PTR(374, 1),
  980. /* 1100 */ PTR(376, 1),
  981. /* 1101 */ PTR(378, 1),
  982. /* 1110 */ V(12, 6, 4),
  983. /* 1111 */ V(3, 13, 4),
  984. /* 0000 0010 ... */
  985. /* 0000 */ PTR(380, 1), /* 100 */
  986. /* 0001 */ V(2, 13, 4),
  987. /* 0010 */ V(13, 2, 4),
  988. /* 0011 */ V(1, 13, 4),
  989. /* 0100 */ V(11, 7, 4),
  990. /* 0101 */ PTR(382, 1),
  991. /* 0110 */ PTR(384, 1),
  992. /* 0111 */ V(12, 3, 4),
  993. /* 1000 */ PTR(386, 1),
  994. /* 1001 */ V(4, 11, 4),
  995. /* 1010 */ V(13, 1, 3),
  996. /* 1011 */ V(13, 1, 3),
  997. /* 1100 */ V(0, 13, 4),
  998. /* 1101 */ V(13, 0, 4),
  999. /* 1110 */ V(8, 10, 4),
  1000. /* 1111 */ V(10, 8, 4),
  1001. /* 0000 0011 ... */
  1002. /* 0000 */ V(4, 12, 4), /* 116 */
  1003. /* 0001 */ V(12, 4, 4),
  1004. /* 0010 */ V(6, 11, 4),
  1005. /* 0011 */ V(11, 6, 4),
  1006. /* 0100 */ V(3, 12, 3),
  1007. /* 0101 */ V(3, 12, 3),
  1008. /* 0110 */ V(2, 12, 3),
  1009. /* 0111 */ V(2, 12, 3),
  1010. /* 1000 */ V(12, 2, 3),
  1011. /* 1001 */ V(12, 2, 3),
  1012. /* 1010 */ V(5, 11, 3),
  1013. /* 1011 */ V(5, 11, 3),
  1014. /* 1100 */ V(11, 5, 4),
  1015. /* 1101 */ V(8, 9, 4),
  1016. /* 1110 */ V(1, 12, 3),
  1017. /* 1111 */ V(1, 12, 3),
  1018. /* 0000 0100 ... */
  1019. /* 0000 */ V(12, 1, 3), /* 132 */
  1020. /* 0001 */ V(12, 1, 3),
  1021. /* 0010 */ V(9, 8, 4),
  1022. /* 0011 */ V(0, 12, 4),
  1023. /* 0100 */ V(12, 0, 3),
  1024. /* 0101 */ V(12, 0, 3),
  1025. /* 0110 */ V(11, 4, 4),
  1026. /* 0111 */ V(6, 10, 4),
  1027. /* 1000 */ V(10, 6, 4),
  1028. /* 1001 */ V(7, 9, 4),
  1029. /* 1010 */ V(3, 11, 3),
  1030. /* 1011 */ V(3, 11, 3),
  1031. /* 1100 */ V(11, 3, 3),
  1032. /* 1101 */ V(11, 3, 3),
  1033. /* 1110 */ V(8, 8, 4),
  1034. /* 1111 */ V(5, 10, 4),
  1035. /* 0000 0101 ... */
  1036. /* 0000 */ V(2, 11, 3), /* 148 */
  1037. /* 0001 */ V(2, 11, 3),
  1038. /* 0010 */ V(10, 5, 4),
  1039. /* 0011 */ V(6, 9, 4),
  1040. /* 0100 */ V(10, 4, 3),
  1041. /* 0101 */ V(10, 4, 3),
  1042. /* 0110 */ V(7, 8, 4),
  1043. /* 0111 */ V(8, 7, 4),
  1044. /* 1000 */ V(9, 4, 3),
  1045. /* 1001 */ V(9, 4, 3),
  1046. /* 1010 */ V(7, 7, 4),
  1047. /* 1011 */ V(7, 6, 4),
  1048. /* 1100 */ V(11, 2, 2),
  1049. /* 1101 */ V(11, 2, 2),
  1050. /* 1110 */ V(11, 2, 2),
  1051. /* 1111 */ V(11, 2, 2),
  1052. /* 0000 0110 ... */
  1053. /* 000 */ V(1, 11, 2), /* 164 */
  1054. /* 001 */ V(1, 11, 2),
  1055. /* 010 */ V(11, 1, 2),
  1056. /* 011 */ V(11, 1, 2),
  1057. /* 100 */ V(0, 11, 3),
  1058. /* 101 */ V(11, 0, 3),
  1059. /* 110 */ V(9, 6, 3),
  1060. /* 111 */ V(4, 10, 3),
  1061. /* 0000 0111 ... */
  1062. /* 000 */ V(3, 10, 3), /* 172 */
  1063. /* 001 */ V(10, 3, 3),
  1064. /* 010 */ V(5, 9, 3),
  1065. /* 011 */ V(9, 5, 3),
  1066. /* 100 */ V(2, 10, 2),
  1067. /* 101 */ V(2, 10, 2),
  1068. /* 110 */ V(10, 2, 2),
  1069. /* 111 */ V(10, 2, 2),
  1070. /* 0000 1000 ... */
  1071. /* 000 */ V(1, 10, 2), /* 180 */
  1072. /* 001 */ V(1, 10, 2),
  1073. /* 010 */ V(10, 1, 2),
  1074. /* 011 */ V(10, 1, 2),
  1075. /* 100 */ V(0, 10, 3),
  1076. /* 101 */ V(6, 8, 3),
  1077. /* 110 */ V(10, 0, 2),
  1078. /* 111 */ V(10, 0, 2),
  1079. /* 0000 1001 ... */
  1080. /* 000 */ V(8, 6, 3), /* 188 */
  1081. /* 001 */ V(4, 9, 3),
  1082. /* 010 */ V(9, 3, 2),
  1083. /* 011 */ V(9, 3, 2),
  1084. /* 100 */ V(3, 9, 3),
  1085. /* 101 */ V(5, 8, 3),
  1086. /* 110 */ V(8, 5, 3),
  1087. /* 111 */ V(6, 7, 3),
  1088. /* 0000 1010 ... */
  1089. /* 000 */ V(2, 9, 2), /* 196 */
  1090. /* 001 */ V(2, 9, 2),
  1091. /* 010 */ V(9, 2, 2),
  1092. /* 011 */ V(9, 2, 2),
  1093. /* 100 */ V(5, 7, 3),
  1094. /* 101 */ V(7, 5, 3),
  1095. /* 110 */ V(3, 8, 2),
  1096. /* 111 */ V(3, 8, 2),
  1097. /* 0000 1011 ... */
  1098. /* 000 */ V(8, 3, 2), /* 204 */
  1099. /* 001 */ V(8, 3, 2),
  1100. /* 010 */ V(6, 6, 3),
  1101. /* 011 */ V(4, 7, 3),
  1102. /* 100 */ V(7, 4, 3),
  1103. /* 101 */ V(5, 6, 3),
  1104. /* 110 */ V(6, 5, 3),
  1105. /* 111 */ V(7, 3, 3),
  1106. /* 0000 1100 ... */
  1107. /* 0 */ V(1, 9, 1), /* 212 */
  1108. /* 1 */ V(9, 1, 1),
  1109. /* 0000 1101 ... */
  1110. /* 00 */ V(0, 9, 2), /* 214 */
  1111. /* 01 */ V(9, 0, 2),
  1112. /* 10 */ V(4, 8, 2),
  1113. /* 11 */ V(8, 4, 2),
  1114. /* 0000 1110 ... */
  1115. /* 000 */ V(7, 2, 2), /* 218 */
  1116. /* 001 */ V(7, 2, 2),
  1117. /* 010 */ V(4, 6, 3),
  1118. /* 011 */ V(6, 4, 3),
  1119. /* 100 */ V(2, 8, 1),
  1120. /* 101 */ V(2, 8, 1),
  1121. /* 110 */ V(2, 8, 1),
  1122. /* 111 */ V(2, 8, 1),
  1123. /* 0000 1111 ... */
  1124. /* 0 */ V(8, 2, 1), /* 226 */
  1125. /* 1 */ V(1, 8, 1),
  1126. /* 0001 0000 ... */
  1127. /* 00 */ V(3, 7, 2), /* 228 */
  1128. /* 01 */ V(2, 7, 2),
  1129. /* 10 */ V(1, 7, 1),
  1130. /* 11 */ V(1, 7, 1),
  1131. /* 0001 0001 ... */
  1132. /* 00 */ V(7, 1, 1), /* 232 */
  1133. /* 01 */ V(7, 1, 1),
  1134. /* 10 */ V(5, 5, 2),
  1135. /* 11 */ V(0, 7, 2),
  1136. /* 0001 0010 ... */
  1137. /* 00 */ V(7, 0, 2), /* 236 */
  1138. /* 01 */ V(3, 6, 2),
  1139. /* 10 */ V(6, 3, 2),
  1140. /* 11 */ V(4, 5, 2),
  1141. /* 0001 0011 ... */
  1142. /* 00 */ V(5, 4, 2), /* 240 */
  1143. /* 01 */ V(2, 6, 2),
  1144. /* 10 */ V(6, 2, 2),
  1145. /* 11 */ V(3, 5, 2),
  1146. /* 0001 0101 ... */
  1147. /* 0 */ V(0, 8, 1), /* 244 */
  1148. /* 1 */ V(8, 0, 1),
  1149. /* 0001 0110 ... */
  1150. /* 0 */ V(1, 6, 1), /* 246 */
  1151. /* 1 */ V(6, 1, 1),
  1152. /* 0001 0111 ... */
  1153. /* 0 */ V(0, 6, 1), /* 248 */
  1154. /* 1 */ V(6, 0, 1),
  1155. /* 0001 1000 ... */
  1156. /* 00 */ V(5, 3, 2), /* 250 */
  1157. /* 01 */ V(4, 4, 2),
  1158. /* 10 */ V(2, 5, 1),
  1159. /* 11 */ V(2, 5, 1),
  1160. /* 0001 1001 ... */
  1161. /* 0 */ V(5, 2, 1), /* 254 */
  1162. /* 1 */ V(0, 5, 1),
  1163. /* 0001 1100 ... */
  1164. /* 0 */ V(3, 4, 1), /* 256 */
  1165. /* 1 */ V(4, 3, 1),
  1166. /* 0001 1101 ... */
  1167. /* 0 */ V(5, 0, 1), /* 258 */
  1168. /* 1 */ V(2, 4, 1),
  1169. /* 0001 1110 ... */
  1170. /* 0 */ V(4, 2, 1), /* 260 */
  1171. /* 1 */ V(3, 3, 1),
  1172. /* 0000 0000 0000 ... */
  1173. /* 0000 */ PTR(388, 3), /* 262 */
  1174. /* 0001 */ V(15, 15, 4),
  1175. /* 0010 */ V(14, 15, 4),
  1176. /* 0011 */ V(13, 15, 4),
  1177. /* 0100 */ V(14, 14, 4),
  1178. /* 0101 */ V(12, 15, 4),
  1179. /* 0110 */ V(13, 14, 4),
  1180. /* 0111 */ V(11, 15, 4),
  1181. /* 1000 */ V(15, 11, 4),
  1182. /* 1001 */ V(12, 14, 4),
  1183. /* 1010 */ V(13, 12, 4),
  1184. /* 1011 */ PTR(396, 1),
  1185. /* 1100 */ V(14, 12, 3),
  1186. /* 1101 */ V(14, 12, 3),
  1187. /* 1110 */ V(13, 13, 3),
  1188. /* 1111 */ V(13, 13, 3),
  1189. /* 0000 0000 0001 ... */
  1190. /* 0000 */ V(15, 10, 4), /* 278 */
  1191. /* 0001 */ V(12, 13, 4),
  1192. /* 0010 */ V(11, 14, 3),
  1193. /* 0011 */ V(11, 14, 3),
  1194. /* 0100 */ V(14, 11, 3),
  1195. /* 0101 */ V(14, 11, 3),
  1196. /* 0110 */ V(9, 15, 3),
  1197. /* 0111 */ V(9, 15, 3),
  1198. /* 1000 */ V(15, 9, 3),
  1199. /* 1001 */ V(15, 9, 3),
  1200. /* 1010 */ V(14, 10, 3),
  1201. /* 1011 */ V(14, 10, 3),
  1202. /* 1100 */ V(11, 13, 3),
  1203. /* 1101 */ V(11, 13, 3),
  1204. /* 1110 */ V(13, 11, 3),
  1205. /* 1111 */ V(13, 11, 3),
  1206. /* 0000 0000 0010 ... */
  1207. /* 0000 */ V(8, 15, 3), /* 294 */
  1208. /* 0001 */ V(8, 15, 3),
  1209. /* 0010 */ V(15, 8, 3),
  1210. /* 0011 */ V(15, 8, 3),
  1211. /* 0100 */ V(12, 12, 3),
  1212. /* 0101 */ V(12, 12, 3),
  1213. /* 0110 */ V(10, 14, 4),
  1214. /* 0111 */ V(9, 14, 4),
  1215. /* 1000 */ V(8, 14, 3),
  1216. /* 1001 */ V(8, 14, 3),
  1217. /* 1010 */ V(7, 15, 4),
  1218. /* 1011 */ V(7, 14, 4),
  1219. /* 1100 */ V(15, 7, 2),
  1220. /* 1101 */ V(15, 7, 2),
  1221. /* 1110 */ V(15, 7, 2),
  1222. /* 1111 */ V(15, 7, 2),
  1223. /* 0000 0000 0011 ... */
  1224. /* 000 */ V(13, 10, 2), /* 310 */
  1225. /* 001 */ V(13, 10, 2),
  1226. /* 010 */ V(10, 13, 3),
  1227. /* 011 */ V(11, 12, 3),
  1228. /* 100 */ V(12, 11, 3),
  1229. /* 101 */ V(15, 6, 3),
  1230. /* 110 */ V(6, 15, 2),
  1231. /* 111 */ V(6, 15, 2),
  1232. /* 0000 0000 0100 ... */
  1233. /* 00 */ V(14, 8, 2), /* 318 */
  1234. /* 01 */ V(5, 15, 2),
  1235. /* 10 */ V(9, 13, 2),
  1236. /* 11 */ V(13, 9, 2),
  1237. /* 0000 0000 0101 ... */
  1238. /* 00 */ V(15, 5, 2), /* 322 */
  1239. /* 01 */ V(14, 7, 2),
  1240. /* 10 */ V(10, 12, 2),
  1241. /* 11 */ V(11, 11, 2),
  1242. /* 0000 0000 0110 ... */
  1243. /* 000 */ V(4, 15, 2), /* 326 */
  1244. /* 001 */ V(4, 15, 2),
  1245. /* 010 */ V(15, 4, 2),
  1246. /* 011 */ V(15, 4, 2),
  1247. /* 100 */ V(12, 10, 3),
  1248. /* 101 */ V(14, 6, 3),
  1249. /* 110 */ V(15, 3, 2),
  1250. /* 111 */ V(15, 3, 2),
  1251. /* 0000 0000 0111 ... */
  1252. /* 00 */ V(3, 15, 1), /* 334 */
  1253. /* 01 */ V(3, 15, 1),
  1254. /* 10 */ V(8, 13, 2),
  1255. /* 11 */ V(13, 8, 2),
  1256. /* 0000 0000 1000 ... */
  1257. /* 0 */ V(2, 15, 1), /* 338 */
  1258. /* 1 */ V(15, 2, 1),
  1259. /* 0000 0000 1001 ... */
  1260. /* 00 */ V(6, 14, 2), /* 340 */
  1261. /* 01 */ V(9, 12, 2),
  1262. /* 10 */ V(0, 15, 1),
  1263. /* 11 */ V(0, 15, 1),
  1264. /* 0000 0000 1010 ... */
  1265. /* 00 */ V(12, 9, 2), /* 344 */
  1266. /* 01 */ V(5, 14, 2),
  1267. /* 10 */ V(10, 11, 1),
  1268. /* 11 */ V(10, 11, 1),
  1269. /* 0000 0000 1011 ... */
  1270. /* 00 */ V(7, 13, 2), /* 348 */
  1271. /* 01 */ V(13, 7, 2),
  1272. /* 10 */ V(4, 14, 1),
  1273. /* 11 */ V(4, 14, 1),
  1274. /* 0000 0000 1100 ... */
  1275. /* 00 */ V(12, 8, 2), /* 352 */
  1276. /* 01 */ V(13, 6, 2),
  1277. /* 10 */ V(3, 14, 1),
  1278. /* 11 */ V(3, 14, 1),
  1279. /* 0000 0000 1101 ... */
  1280. /* 00 */ V(11, 9, 1), /* 356 */
  1281. /* 01 */ V(11, 9, 1),
  1282. /* 10 */ V(9, 11, 2),
  1283. /* 11 */ V(10, 10, 2),
  1284. /* 0000 0001 0001 ... */
  1285. /* 0 */ V(11, 10, 1), /* 360 */
  1286. /* 1 */ V(14, 5, 1),
  1287. /* 0000 0001 0010 ... */
  1288. /* 0 */ V(14, 4, 1), /* 362 */
  1289. /* 1 */ V(8, 12, 1),
  1290. /* 0000 0001 0011 ... */
  1291. /* 0 */ V(6, 13, 1), /* 364 */
  1292. /* 1 */ V(14, 3, 1),
  1293. /* 0000 0001 0101 ... */
  1294. /* 0 */ V(2, 14, 1), /* 366 */
  1295. /* 1 */ V(0, 14, 1),
  1296. /* 0000 0001 1000 ... */
  1297. /* 0 */ V(14, 0, 1), /* 368 */
  1298. /* 1 */ V(5, 13, 1),
  1299. /* 0000 0001 1001 ... */
  1300. /* 0 */ V(13, 5, 1), /* 370 */
  1301. /* 1 */ V(7, 12, 1),
  1302. /* 0000 0001 1010 ... */
  1303. /* 0 */ V(12, 7, 1), /* 372 */
  1304. /* 1 */ V(4, 13, 1),
  1305. /* 0000 0001 1011 ... */
  1306. /* 0 */ V(8, 11, 1), /* 374 */
  1307. /* 1 */ V(11, 8, 1),
  1308. /* 0000 0001 1100 ... */
  1309. /* 0 */ V(13, 4, 1), /* 376 */
  1310. /* 1 */ V(9, 10, 1),
  1311. /* 0000 0001 1101 ... */
  1312. /* 0 */ V(10, 9, 1), /* 378 */
  1313. /* 1 */ V(6, 12, 1),
  1314. /* 0000 0010 0000 ... */
  1315. /* 0 */ V(13, 3, 1), /* 380 */
  1316. /* 1 */ V(7, 11, 1),
  1317. /* 0000 0010 0101 ... */
  1318. /* 0 */ V(5, 12, 1), /* 382 */
  1319. /* 1 */ V(12, 5, 1),
  1320. /* 0000 0010 0110 ... */
  1321. /* 0 */ V(9, 9, 1), /* 384 */
  1322. /* 1 */ V(7, 10, 1),
  1323. /* 0000 0010 1000 ... */
  1324. /* 0 */ V(10, 7, 1), /* 386 */
  1325. /* 1 */ V(9, 7, 1),
  1326. /* 0000 0000 0000 0000 ... */
  1327. /* 000 */ V(15, 14, 3), /* 388 */
  1328. /* 001 */ V(15, 12, 3),
  1329. /* 010 */ V(15, 13, 2),
  1330. /* 011 */ V(15, 13, 2),
  1331. /* 100 */ V(14, 13, 1),
  1332. /* 101 */ V(14, 13, 1),
  1333. /* 110 */ V(14, 13, 1),
  1334. /* 111 */ V(14, 13, 1),
  1335. /* 0000 0000 0000 1011 ... */
  1336. /* 0 */ V(10, 15, 1), /* 396 */
  1337. /* 1 */ V(14, 9, 1)
  1338. };
  1339. static
  1340. union huffpair const hufftab15[] = {
  1341. /* 0000 */ PTR(16, 4),
  1342. /* 0001 */ PTR(32, 4),
  1343. /* 0010 */ PTR(48, 4),
  1344. /* 0011 */ PTR(64, 4),
  1345. /* 0100 */ PTR(80, 4),
  1346. /* 0101 */ PTR(96, 3),
  1347. /* 0110 */ PTR(104, 3),
  1348. /* 0111 */ PTR(112, 2),
  1349. /* 1000 */ PTR(116, 1),
  1350. /* 1001 */ PTR(118, 1),
  1351. /* 1010 */ V(1, 1, 3),
  1352. /* 1011 */ V(1, 1, 3),
  1353. /* 1100 */ V(0, 1, 4),
  1354. /* 1101 */ V(1, 0, 4),
  1355. /* 1110 */ V(0, 0, 3),
  1356. /* 1111 */ V(0, 0, 3),
  1357. /* 0000 ... */
  1358. /* 0000 */ PTR(120, 4), /* 16 */
  1359. /* 0001 */ PTR(136, 4),
  1360. /* 0010 */ PTR(152, 4),
  1361. /* 0011 */ PTR(168, 4),
  1362. /* 0100 */ PTR(184, 4),
  1363. /* 0101 */ PTR(200, 3),
  1364. /* 0110 */ PTR(208, 3),
  1365. /* 0111 */ PTR(216, 4),
  1366. /* 1000 */ PTR(232, 3),
  1367. /* 1001 */ PTR(240, 3),
  1368. /* 1010 */ PTR(248, 3),
  1369. /* 1011 */ PTR(256, 3),
  1370. /* 1100 */ PTR(264, 2),
  1371. /* 1101 */ PTR(268, 3),
  1372. /* 1110 */ PTR(276, 3),
  1373. /* 1111 */ PTR(284, 2),
  1374. /* 0001 ... */
  1375. /* 0000 */ PTR(288, 2), /* 32 */
  1376. /* 0001 */ PTR(292, 2),
  1377. /* 0010 */ PTR(296, 2),
  1378. /* 0011 */ PTR(300, 2),
  1379. /* 0100 */ PTR(304, 2),
  1380. /* 0101 */ PTR(308, 2),
  1381. /* 0110 */ PTR(312, 2),
  1382. /* 0111 */ PTR(316, 2),
  1383. /* 1000 */ PTR(320, 1),
  1384. /* 1001 */ PTR(322, 1),
  1385. /* 1010 */ PTR(324, 1),
  1386. /* 1011 */ PTR(326, 2),
  1387. /* 1100 */ PTR(330, 1),
  1388. /* 1101 */ PTR(332, 1),
  1389. /* 1110 */ PTR(334, 2),
  1390. /* 1111 */ PTR(338, 1),
  1391. /* 0010 ... */
  1392. /* 0000 */ PTR(340, 1), /* 48 */
  1393. /* 0001 */ PTR(342, 1),
  1394. /* 0010 */ V(9, 1, 4),
  1395. /* 0011 */ PTR(344, 1),
  1396. /* 0100 */ PTR(346, 1),
  1397. /* 0101 */ PTR(348, 1),
  1398. /* 0110 */ PTR(350, 1),
  1399. /* 0111 */ PTR(352, 1),
  1400. /* 1000 */ V(2, 8, 4),
  1401. /* 1001 */ V(8, 2, 4),
  1402. /* 1010 */ V(1, 8, 4),
  1403. /* 1011 */ V(8, 1, 4),
  1404. /* 1100 */ PTR(354, 1),
  1405. /* 1101 */ PTR(356, 1),
  1406. /* 1110 */ PTR(358, 1),
  1407. /* 1111 */ PTR(360, 1),
  1408. /* 0011 ... */
  1409. /* 0000 */ V(2, 7, 4), /* 64 */
  1410. /* 0001 */ V(7, 2, 4),
  1411. /* 0010 */ V(6, 4, 4),
  1412. /* 0011 */ V(1, 7, 4),
  1413. /* 0100 */ V(5, 5, 4),
  1414. /* 0101 */ V(7, 1, 4),
  1415. /* 0110 */ PTR(362, 1),
  1416. /* 0111 */ V(3, 6, 4),
  1417. /* 1000 */ V(6, 3, 4),
  1418. /* 1001 */ V(4, 5, 4),
  1419. /* 1010 */ V(5, 4, 4),
  1420. /* 1011 */ V(2, 6, 4),
  1421. /* 1100 */ V(6, 2, 4),
  1422. /* 1101 */ V(1, 6, 4),
  1423. /* 1110 */ PTR(364, 1),
  1424. /* 1111 */ V(3, 5, 4),
  1425. /* 0100 ... */
  1426. /* 0000 */ V(6, 1, 3), /* 80 */
  1427. /* 0001 */ V(6, 1, 3),
  1428. /* 0010 */ V(5, 3, 4),
  1429. /* 0011 */ V(4, 4, 4),
  1430. /* 0100 */ V(2, 5, 3),
  1431. /* 0101 */ V(2, 5, 3),
  1432. /* 0110 */ V(5, 2, 3),
  1433. /* 0111 */ V(5, 2, 3),
  1434. /* 1000 */ V(1, 5, 3),
  1435. /* 1001 */ V(1, 5, 3),
  1436. /* 1010 */ V(5, 1, 3),
  1437. /* 1011 */ V(5, 1, 3),
  1438. /* 1100 */ V(0, 5, 4),
  1439. /* 1101 */ V(5, 0, 4),
  1440. /* 1110 */ V(3, 4, 3),
  1441. /* 1111 */ V(3, 4, 3),
  1442. /* 0101 ... */
  1443. /* 000 */ V(4, 3, 3), /* 96 */
  1444. /* 001 */ V(2, 4, 3),
  1445. /* 010 */ V(4, 2, 3),
  1446. /* 011 */ V(3, 3, 3),
  1447. /* 100 */ V(4, 1, 2),
  1448. /* 101 */ V(4, 1, 2),
  1449. /* 110 */ V(1, 4, 3),
  1450. /* 111 */ V(0, 4, 3),
  1451. /* 0110 ... */
  1452. /* 000 */ V(2, 3, 2), /* 104 */
  1453. /* 001 */ V(2, 3, 2),
  1454. /* 010 */ V(3, 2, 2),
  1455. /* 011 */ V(3, 2, 2),
  1456. /* 100 */ V(4, 0, 3),
  1457. /* 101 */ V(0, 3, 3),
  1458. /* 110 */ V(1, 3, 2),
  1459. /* 111 */ V(1, 3, 2),
  1460. /* 0111 ... */
  1461. /* 00 */ V(3, 1, 2), /* 112 */
  1462. /* 01 */ V(3, 0, 2),
  1463. /* 10 */ V(2, 2, 1),
  1464. /* 11 */ V(2, 2, 1),
  1465. /* 1000 ... */
  1466. /* 0 */ V(1, 2, 1), /* 116 */
  1467. /* 1 */ V(2, 1, 1),
  1468. /* 1001 ... */
  1469. /* 0 */ V(0, 2, 1), /* 118 */
  1470. /* 1 */ V(2, 0, 1),
  1471. /* 0000 0000 ... */
  1472. /* 0000 */ PTR(366, 1), /* 120 */
  1473. /* 0001 */ PTR(368, 1),
  1474. /* 0010 */ V(14, 14, 4),
  1475. /* 0011 */ PTR(370, 1),
  1476. /* 0100 */ PTR(372, 1),
  1477. /* 0101 */ PTR(374, 1),
  1478. /* 0110 */ V(15, 11, 4),
  1479. /* 0111 */ PTR(376, 1),
  1480. /* 1000 */ V(13, 13, 4),
  1481. /* 1001 */ V(10, 15, 4),
  1482. /* 1010 */ V(15, 10, 4),
  1483. /* 1011 */ V(11, 14, 4),
  1484. /* 1100 */ V(14, 11, 4),
  1485. /* 1101 */ V(12, 13, 4),
  1486. /* 1110 */ V(13, 12, 4),
  1487. /* 1111 */ V(9, 15, 4),
  1488. /* 0000 0001 ... */
  1489. /* 0000 */ V(15, 9, 4), /* 136 */
  1490. /* 0001 */ V(14, 10, 4),
  1491. /* 0010 */ V(11, 13, 4),
  1492. /* 0011 */ V(13, 11, 4),
  1493. /* 0100 */ V(8, 15, 4),
  1494. /* 0101 */ V(15, 8, 4),
  1495. /* 0110 */ V(12, 12, 4),
  1496. /* 0111 */ V(9, 14, 4),
  1497. /* 1000 */ V(14, 9, 4),
  1498. /* 1001 */ V(7, 15, 4),
  1499. /* 1010 */ V(15, 7, 4),
  1500. /* 1011 */ V(10, 13, 4),
  1501. /* 1100 */ V(13, 10, 4),
  1502. /* 1101 */ V(11, 12, 4),
  1503. /* 1110 */ V(6, 15, 4),
  1504. /* 1111 */ PTR(378, 1),
  1505. /* 0000 0010 ... */
  1506. /* 0000 */ V(12, 11, 3), /* 152 */
  1507. /* 0001 */ V(12, 11, 3),
  1508. /* 0010 */ V(15, 6, 3),
  1509. /* 0011 */ V(15, 6, 3),
  1510. /* 0100 */ V(8, 14, 4),
  1511. /* 0101 */ V(14, 8, 4),
  1512. /* 0110 */ V(5, 15, 4),
  1513. /* 0111 */ V(9, 13, 4),
  1514. /* 1000 */ V(15, 5, 3),
  1515. /* 1001 */ V(15, 5, 3),
  1516. /* 1010 */ V(7, 14, 3),
  1517. /* 1011 */ V(7, 14, 3),
  1518. /* 1100 */ V(14, 7, 3),
  1519. /* 1101 */ V(14, 7, 3),
  1520. /* 1110 */ V(10, 12, 3),
  1521. /* 1111 */ V(10, 12, 3),
  1522. /* 0000 0011 ... */
  1523. /* 0000 */ V(12, 10, 3), /* 168 */
  1524. /* 0001 */ V(12, 10, 3),
  1525. /* 0010 */ V(11, 11, 3),
  1526. /* 0011 */ V(11, 11, 3),
  1527. /* 0100 */ V(13, 9, 4),
  1528. /* 0101 */ V(8, 13, 4),
  1529. /* 0110 */ V(4, 15, 3),
  1530. /* 0111 */ V(4, 15, 3),
  1531. /* 1000 */ V(15, 4, 3),
  1532. /* 1001 */ V(15, 4, 3),
  1533. /* 1010 */ V(3, 15, 3),
  1534. /* 1011 */ V(3, 15, 3),
  1535. /* 1100 */ V(15, 3, 3),
  1536. /* 1101 */ V(15, 3, 3),
  1537. /* 1110 */ V(13, 8, 3),
  1538. /* 1111 */ V(13, 8, 3),
  1539. /* 0000 0100 ... */
  1540. /* 0000 */ V(14, 6, 3), /* 184 */
  1541. /* 0001 */ V(14, 6, 3),
  1542. /* 0010 */ V(2, 15, 3),
  1543. /* 0011 */ V(2, 15, 3),
  1544. /* 0100 */ V(15, 2, 3),
  1545. /* 0101 */ V(15, 2, 3),
  1546. /* 0110 */ V(6, 14, 4),
  1547. /* 0111 */ V(15, 0, 4),
  1548. /* 1000 */ V(1, 15, 3),
  1549. /* 1001 */ V(1, 15, 3),
  1550. /* 1010 */ V(15, 1, 3),
  1551. /* 1011 */ V(15, 1, 3),
  1552. /* 1100 */ V(9, 12, 3),
  1553. /* 1101 */ V(9, 12, 3),
  1554. /* 1110 */ V(12, 9, 3),
  1555. /* 1111 */ V(12, 9, 3),
  1556. /* 0000 0101 ... */
  1557. /* 000 */ V(5, 14, 3), /* 200 */
  1558. /* 001 */ V(10, 11, 3),
  1559. /* 010 */ V(11, 10, 3),
  1560. /* 011 */ V(14, 5, 3),
  1561. /* 100 */ V(7, 13, 3),
  1562. /* 101 */ V(13, 7, 3),
  1563. /* 110 */ V(4, 14, 3),
  1564. /* 111 */ V(14, 4, 3),
  1565. /* 0000 0110 ... */
  1566. /* 000 */ V(8, 12, 3), /* 208 */
  1567. /* 001 */ V(12, 8, 3),
  1568. /* 010 */ V(3, 14, 3),
  1569. /* 011 */ V(6, 13, 3),
  1570. /* 100 */ V(13, 6, 3),
  1571. /* 101 */ V(14, 3, 3),
  1572. /* 110 */ V(9, 11, 3),
  1573. /* 111 */ V(11, 9, 3),
  1574. /* 0000 0111 ... */
  1575. /* 0000 */ V(2, 14, 3), /* 216 */
  1576. /* 0001 */ V(2, 14, 3),
  1577. /* 0010 */ V(10, 10, 3),
  1578. /* 0011 */ V(10, 10, 3),
  1579. /* 0100 */ V(14, 2, 3),
  1580. /* 0101 */ V(14, 2, 3),
  1581. /* 0110 */ V(1, 14, 3),
  1582. /* 0111 */ V(1, 14, 3),
  1583. /* 1000 */ V(14, 1, 3),
  1584. /* 1001 */ V(14, 1, 3),
  1585. /* 1010 */ V(0, 14, 4),
  1586. /* 1011 */ V(14, 0, 4),
  1587. /* 1100 */ V(5, 13, 3),
  1588. /* 1101 */ V(5, 13, 3),
  1589. /* 1110 */ V(13, 5, 3),
  1590. /* 1111 */ V(13, 5, 3),
  1591. /* 0000 1000 ... */
  1592. /* 000 */ V(7, 12, 3), /* 232 */
  1593. /* 001 */ V(12, 7, 3),
  1594. /* 010 */ V(4, 13, 3),
  1595. /* 011 */ V(8, 11, 3),
  1596. /* 100 */ V(13, 4, 2),
  1597. /* 101 */ V(13, 4, 2),
  1598. /* 110 */ V(11, 8, 3),
  1599. /* 111 */ V(9, 10, 3),
  1600. /* 0000 1001 ... */
  1601. /* 000 */ V(10, 9, 3), /* 240 */
  1602. /* 001 */ V(6, 12, 3),
  1603. /* 010 */ V(12, 6, 3),
  1604. /* 011 */ V(3, 13, 3),
  1605. /* 100 */ V(13, 3, 2),
  1606. /* 101 */ V(13, 3, 2),
  1607. /* 110 */ V(13, 2, 2),
  1608. /* 111 */ V(13, 2, 2),
  1609. /* 0000 1010 ... */
  1610. /* 000 */ V(2, 13, 3), /* 248 */
  1611. /* 001 */ V(0, 13, 3),
  1612. /* 010 */ V(1, 13, 2),
  1613. /* 011 */ V(1, 13, 2),
  1614. /* 100 */ V(7, 11, 2),
  1615. /* 101 */ V(7, 11, 2),
  1616. /* 110 */ V(11, 7, 2),
  1617. /* 111 */ V(11, 7, 2),
  1618. /* 0000 1011 ... */
  1619. /* 000 */ V(13, 1, 2), /* 256 */
  1620. /* 001 */ V(13, 1, 2),
  1621. /* 010 */ V(5, 12, 3),
  1622. /* 011 */ V(13, 0, 3),
  1623. /* 100 */ V(12, 5, 2),
  1624. /* 101 */ V(12, 5, 2),
  1625. /* 110 */ V(8, 10, 2),
  1626. /* 111 */ V(8, 10, 2),
  1627. /* 0000 1100 ... */
  1628. /* 00 */ V(10, 8, 2), /* 264 */
  1629. /* 01 */ V(4, 12, 2),
  1630. /* 10 */ V(12, 4, 2),
  1631. /* 11 */ V(6, 11, 2),
  1632. /* 0000 1101 ... */
  1633. /* 000 */ V(11, 6, 2), /* 268 */
  1634. /* 001 */ V(11, 6, 2),
  1635. /* 010 */ V(9, 9, 3),
  1636. /* 011 */ V(0, 12, 3),
  1637. /* 100 */ V(3, 12, 2),
  1638. /* 101 */ V(3, 12, 2),
  1639. /* 110 */ V(12, 3, 2),
  1640. /* 111 */ V(12, 3, 2),
  1641. /* 0000 1110 ... */
  1642. /* 000 */ V(7, 10, 2), /* 276 */
  1643. /* 001 */ V(7, 10, 2),
  1644. /* 010 */ V(10, 7, 2),
  1645. /* 011 */ V(10, 7, 2),
  1646. /* 100 */ V(10, 6, 2),
  1647. /* 101 */ V(10, 6, 2),
  1648. /* 110 */ V(12, 0, 3),
  1649. /* 111 */ V(0, 11, 3),
  1650. /* 0000 1111 ... */
  1651. /* 00 */ V(12, 2, 1), /* 284 */
  1652. /* 01 */ V(12, 2, 1),
  1653. /* 10 */ V(2, 12, 2),
  1654. /* 11 */ V(5, 11, 2),
  1655. /* 0001 0000 ... */
  1656. /* 00 */ V(11, 5, 2), /* 288 */
  1657. /* 01 */ V(1, 12, 2),
  1658. /* 10 */ V(8, 9, 2),
  1659. /* 11 */ V(9, 8, 2),
  1660. /* 0001 0001 ... */
  1661. /* 00 */ V(12, 1, 2), /* 292 */
  1662. /* 01 */ V(4, 11, 2),
  1663. /* 10 */ V(11, 4, 2),
  1664. /* 11 */ V(6, 10, 2),
  1665. /* 0001 0010 ... */
  1666. /* 00 */ V(3, 11, 2), /* 296 */
  1667. /* 01 */ V(7, 9, 2),
  1668. /* 10 */ V(11, 3, 1),
  1669. /* 11 */ V(11, 3, 1),
  1670. /* 0001 0011 ... */
  1671. /* 00 */ V(9, 7, 2), /* 300 */
  1672. /* 01 */ V(8, 8, 2),
  1673. /* 10 */ V(2, 11, 2),
  1674. /* 11 */ V(5, 10, 2),
  1675. /* 0001 0100 ... */
  1676. /* 00 */ V(11, 2, 1), /* 304 */
  1677. /* 01 */ V(11, 2, 1),
  1678. /* 10 */ V(10, 5, 2),
  1679. /* 11 */ V(1, 11, 2),
  1680. /* 0001 0101 ... */
  1681. /* 00 */ V(11, 1, 1), /* 308 */
  1682. /* 01 */ V(11, 1, 1),
  1683. /* 10 */ V(11, 0, 2),
  1684. /* 11 */ V(6, 9, 2),
  1685. /* 0001 0110 ... */
  1686. /* 00 */ V(9, 6, 2), /* 312 */
  1687. /* 01 */ V(4, 10, 2),
  1688. /* 10 */ V(10, 4, 2),
  1689. /* 11 */ V(7, 8, 2),
  1690. /* 0001 0111 ... */
  1691. /* 00 */ V(8, 7, 2), /* 316 */
  1692. /* 01 */ V(3, 10, 2),
  1693. /* 10 */ V(10, 3, 1),
  1694. /* 11 */ V(10, 3, 1),
  1695. /* 0001 1000 ... */
  1696. /* 0 */ V(5, 9, 1), /* 320 */
  1697. /* 1 */ V(9, 5, 1),
  1698. /* 0001 1001 ... */
  1699. /* 0 */ V(2, 10, 1), /* 322 */
  1700. /* 1 */ V(10, 2, 1),
  1701. /* 0001 1010 ... */
  1702. /* 0 */ V(1, 10, 1), /* 324 */
  1703. /* 1 */ V(10, 1, 1),
  1704. /* 0001 1011 ... */
  1705. /* 00 */ V(0, 10, 2), /* 326 */
  1706. /* 01 */ V(10, 0, 2),
  1707. /* 10 */ V(6, 8, 1),
  1708. /* 11 */ V(6, 8, 1),
  1709. /* 0001 1100 ... */
  1710. /* 0 */ V(8, 6, 1), /* 330 */
  1711. /* 1 */ V(4, 9, 1),
  1712. /* 0001 1101 ... */
  1713. /* 0 */ V(9, 4, 1), /* 332 */
  1714. /* 1 */ V(3, 9, 1),
  1715. /* 0001 1110 ... */
  1716. /* 00 */ V(9, 3, 1), /* 334 */
  1717. /* 01 */ V(9, 3, 1),
  1718. /* 10 */ V(7, 7, 2),
  1719. /* 11 */ V(0, 9, 2),
  1720. /* 0001 1111 ... */
  1721. /* 0 */ V(5, 8, 1), /* 338 */
  1722. /* 1 */ V(8, 5, 1),
  1723. /* 0010 0000 ... */
  1724. /* 0 */ V(2, 9, 1), /* 340 */
  1725. /* 1 */ V(6, 7, 1),
  1726. /* 0010 0001 ... */
  1727. /* 0 */ V(7, 6, 1), /* 342 */
  1728. /* 1 */ V(9, 2, 1),
  1729. /* 0010 0011 ... */
  1730. /* 0 */ V(1, 9, 1), /* 344 */
  1731. /* 1 */ V(9, 0, 1),
  1732. /* 0010 0100 ... */
  1733. /* 0 */ V(4, 8, 1), /* 346 */
  1734. /* 1 */ V(8, 4, 1),
  1735. /* 0010 0101 ... */
  1736. /* 0 */ V(5, 7, 1), /* 348 */
  1737. /* 1 */ V(7, 5, 1),
  1738. /* 0010 0110 ... */
  1739. /* 0 */ V(3, 8, 1), /* 350 */
  1740. /* 1 */ V(8, 3, 1),
  1741. /* 0010 0111 ... */
  1742. /* 0 */ V(6, 6, 1), /* 352 */
  1743. /* 1 */ V(4, 7, 1),
  1744. /* 0010 1100 ... */
  1745. /* 0 */ V(7, 4, 1), /* 354 */
  1746. /* 1 */ V(0, 8, 1),
  1747. /* 0010 1101 ... */
  1748. /* 0 */ V(8, 0, 1), /* 356 */
  1749. /* 1 */ V(5, 6, 1),
  1750. /* 0010 1110 ... */
  1751. /* 0 */ V(6, 5, 1), /* 358 */
  1752. /* 1 */ V(3, 7, 1),
  1753. /* 0010 1111 ... */
  1754. /* 0 */ V(7, 3, 1), /* 360 */
  1755. /* 1 */ V(4, 6, 1),
  1756. /* 0011 0110 ... */
  1757. /* 0 */ V(0, 7, 1), /* 362 */
  1758. /* 1 */ V(7, 0, 1),
  1759. /* 0011 1110 ... */
  1760. /* 0 */ V(0, 6, 1), /* 364 */
  1761. /* 1 */ V(6, 0, 1),
  1762. /* 0000 0000 0000 ... */
  1763. /* 0 */ V(15, 15, 1), /* 366 */
  1764. /* 1 */ V(14, 15, 1),
  1765. /* 0000 0000 0001 ... */
  1766. /* 0 */ V(15, 14, 1), /* 368 */
  1767. /* 1 */ V(13, 15, 1),
  1768. /* 0000 0000 0011 ... */
  1769. /* 0 */ V(15, 13, 1), /* 370 */
  1770. /* 1 */ V(12, 15, 1),
  1771. /* 0000 0000 0100 ... */
  1772. /* 0 */ V(15, 12, 1), /* 372 */
  1773. /* 1 */ V(13, 14, 1),
  1774. /* 0000 0000 0101 ... */
  1775. /* 0 */ V(14, 13, 1), /* 374 */
  1776. /* 1 */ V(11, 15, 1),
  1777. /* 0000 0000 0111 ... */
  1778. /* 0 */ V(12, 14, 1), /* 376 */
  1779. /* 1 */ V(14, 12, 1),
  1780. /* 0000 0001 1111 ... */
  1781. /* 0 */ V(10, 14, 1), /* 378 */
  1782. /* 1 */ V(0, 15, 1)
  1783. };
  1784. static
  1785. union huffpair const hufftab16[] = {
  1786. /* 0000 */ PTR(16, 4),
  1787. /* 0001 */ PTR(32, 4),
  1788. /* 0010 */ PTR(48, 4),
  1789. /* 0011 */ PTR(64, 2),
  1790. /* 0100 */ V(1, 1, 4),
  1791. /* 0101 */ V(0, 1, 4),
  1792. /* 0110 */ V(1, 0, 3),
  1793. /* 0111 */ V(1, 0, 3),
  1794. /* 1000 */ V(0, 0, 1),
  1795. /* 1001 */ V(0, 0, 1),
  1796. /* 1010 */ V(0, 0, 1),
  1797. /* 1011 */ V(0, 0, 1),
  1798. /* 1100 */ V(0, 0, 1),
  1799. /* 1101 */ V(0, 0, 1),
  1800. /* 1110 */ V(0, 0, 1),
  1801. /* 1111 */ V(0, 0, 1),
  1802. /* 0000 ... */
  1803. /* 0000 */ PTR(68, 3), /* 16 */
  1804. /* 0001 */ PTR(76, 3),
  1805. /* 0010 */ PTR(84, 2),
  1806. /* 0011 */ V(15, 15, 4),
  1807. /* 0100 */ PTR(88, 2),
  1808. /* 0101 */ PTR(92, 1),
  1809. /* 0110 */ PTR(94, 4),
  1810. /* 0111 */ V(15, 2, 4),
  1811. /* 1000 */ PTR(110, 1),
  1812. /* 1001 */ V(1, 15, 4),
  1813. /* 1010 */ V(15, 1, 4),
  1814. /* 1011 */ PTR(112, 4),
  1815. /* 1100 */ PTR(128, 4),
  1816. /* 1101 */ PTR(144, 4),
  1817. /* 1110 */ PTR(160, 4),
  1818. /* 1111 */ PTR(176, 4),
  1819. /* 0001 ... */
  1820. /* 0000 */ PTR(192, 4), /* 32 */
  1821. /* 0001 */ PTR(208, 3),
  1822. /* 0010 */ PTR(216, 3),
  1823. /* 0011 */ PTR(224, 3),
  1824. /* 0100 */ PTR(232, 3),
  1825. /* 0101 */ PTR(240, 3),
  1826. /* 0110 */ PTR(248, 3),
  1827. /* 0111 */ PTR(256, 3),
  1828. /* 1000 */ PTR(264, 2),
  1829. /* 1001 */ PTR(268, 2),
  1830. /* 1010 */ PTR(272, 1),
  1831. /* 1011 */ PTR(274, 2),
  1832. /* 1100 */ PTR(278, 2),
  1833. /* 1101 */ PTR(282, 1),
  1834. /* 1110 */ V(5, 1, 4),
  1835. /* 1111 */ PTR(284, 1),
  1836. /* 0010 ... */
  1837. /* 0000 */ PTR(286, 1), /* 48 */
  1838. /* 0001 */ PTR(288, 1),
  1839. /* 0010 */ PTR(290, 1),
  1840. /* 0011 */ V(1, 4, 4),
  1841. /* 0100 */ V(4, 1, 4),
  1842. /* 0101 */ PTR(292, 1),
  1843. /* 0110 */ V(2, 3, 4),
  1844. /* 0111 */ V(3, 2, 4),
  1845. /* 1000 */ V(1, 3, 3),
  1846. /* 1001 */ V(1, 3, 3),
  1847. /* 1010 */ V(3, 1, 3),
  1848. /* 1011 */ V(3, 1, 3),
  1849. /* 1100 */ V(0, 3, 4),
  1850. /* 1101 */ V(3, 0, 4),
  1851. /* 1110 */ V(2, 2, 3),
  1852. /* 1111 */ V(2, 2, 3),
  1853. /* 0011 ... */
  1854. /* 00 */ V(1, 2, 2), /* 64 */
  1855. /* 01 */ V(2, 1, 2),
  1856. /* 10 */ V(0, 2, 2),
  1857. /* 11 */ V(2, 0, 2),
  1858. /* 0000 0000 ... */
  1859. /* 000 */ V(14, 15, 3), /* 68 */
  1860. /* 001 */ V(15, 14, 3),
  1861. /* 010 */ V(13, 15, 3),
  1862. /* 011 */ V(15, 13, 3),
  1863. /* 100 */ V(12, 15, 3),
  1864. /* 101 */ V(15, 12, 3),
  1865. /* 110 */ V(11, 15, 3),
  1866. /* 111 */ V(15, 11, 3),
  1867. /* 0000 0001 ... */
  1868. /* 000 */ V(10, 15, 2), /* 76 */
  1869. /* 001 */ V(10, 15, 2),
  1870. /* 010 */ V(15, 10, 3),
  1871. /* 011 */ V(9, 15, 3),
  1872. /* 100 */ V(15, 9, 3),
  1873. /* 101 */ V(15, 8, 3),
  1874. /* 110 */ V(8, 15, 2),
  1875. /* 111 */ V(8, 15, 2),
  1876. /* 0000 0010 ... */
  1877. /* 00 */ V(7, 15, 2), /* 84 */
  1878. /* 01 */ V(15, 7, 2),
  1879. /* 10 */ V(6, 15, 2),
  1880. /* 11 */ V(15, 6, 2),
  1881. /* 0000 0100 ... */
  1882. /* 00 */ V(5, 15, 2), /* 88 */
  1883. /* 01 */ V(15, 5, 2),
  1884. /* 10 */ V(4, 15, 1),
  1885. /* 11 */ V(4, 15, 1),
  1886. /* 0000 0101 ... */
  1887. /* 0 */ V(15, 4, 1), /* 92 */
  1888. /* 1 */ V(15, 3, 1),
  1889. /* 0000 0110 ... */
  1890. /* 0000 */ V(15, 0, 1), /* 94 */
  1891. /* 0001 */ V(15, 0, 1),
  1892. /* 0010 */ V(15, 0, 1),
  1893. /* 0011 */ V(15, 0, 1),
  1894. /* 0100 */ V(15, 0, 1),
  1895. /* 0101 */ V(15, 0, 1),
  1896. /* 0110 */ V(15, 0, 1),
  1897. /* 0111 */ V(15, 0, 1),
  1898. /* 1000 */ V(3, 15, 2),
  1899. /* 1001 */ V(3, 15, 2),
  1900. /* 1010 */ V(3, 15, 2),
  1901. /* 1011 */ V(3, 15, 2),
  1902. /* 1100 */ PTR(294, 4),
  1903. /* 1101 */ PTR(310, 3),
  1904. /* 1110 */ PTR(318, 3),
  1905. /* 1111 */ PTR(326, 3),
  1906. /* 0000 1000 ... */
  1907. /* 0 */ V(2, 15, 1), /* 110 */
  1908. /* 1 */ V(0, 15, 1),
  1909. /* 0000 1011 ... */
  1910. /* 0000 */ PTR(334, 2), /* 112 */
  1911. /* 0001 */ PTR(338, 2),
  1912. /* 0010 */ PTR(342, 2),
  1913. /* 0011 */ PTR(346, 1),
  1914. /* 0100 */ PTR(348, 2),
  1915. /* 0101 */ PTR(352, 2),
  1916. /* 0110 */ PTR(356, 1),
  1917. /* 0111 */ PTR(358, 2),
  1918. /* 1000 */ PTR(362, 2),
  1919. /* 1001 */ PTR(366, 2),
  1920. /* 1010 */ PTR(370, 2),
  1921. /* 1011 */ V(14, 3, 4),
  1922. /* 1100 */ PTR(374, 1),
  1923. /* 1101 */ PTR(376, 1),
  1924. /* 1110 */ PTR(378, 1),
  1925. /* 1111 */ PTR(380, 1),
  1926. /* 0000 1100 ... */
  1927. /* 0000 */ PTR(382, 1), /* 128 */
  1928. /* 0001 */ PTR(384, 1),
  1929. /* 0010 */ PTR(386, 1),
  1930. /* 0011 */ V(0, 13, 4),
  1931. /* 0100 */ PTR(388, 1),
  1932. /* 0101 */ PTR(390, 1),
  1933. /* 0110 */ PTR(392, 1),
  1934. /* 0111 */ V(3, 12, 4),
  1935. /* 1000 */ PTR(394, 1),
  1936. /* 1001 */ V(1, 12, 4),
  1937. /* 1010 */ V(12, 0, 4),
  1938. /* 1011 */ PTR(396, 1),
  1939. /* 1100 */ V(14, 2, 3),
  1940. /* 1101 */ V(14, 2, 3),
  1941. /* 1110 */ V(2, 14, 4),
  1942. /* 1111 */ V(1, 14, 4),
  1943. /* 0000 1101 ... */
  1944. /* 0000 */ V(13, 3, 4), /* 144 */
  1945. /* 0001 */ V(2, 13, 4),
  1946. /* 0010 */ V(13, 2, 4),
  1947. /* 0011 */ V(13, 1, 4),
  1948. /* 0100 */ V(3, 11, 4),
  1949. /* 0101 */ PTR(398, 1),
  1950. /* 0110 */ V(1, 13, 3),
  1951. /* 0111 */ V(1, 13, 3),
  1952. /* 1000 */ V(12, 4, 4),
  1953. /* 1001 */ V(6, 11, 4),
  1954. /* 1010 */ V(12, 3, 4),
  1955. /* 1011 */ V(10, 7, 4),
  1956. /* 1100 */ V(2, 12, 3),
  1957. /* 1101 */ V(2, 12, 3),
  1958. /* 1110 */ V(12, 2, 4),
  1959. /* 1111 */ V(11, 5, 4),
  1960. /* 0000 1110 ... */
  1961. /* 0000 */ V(12, 1, 4), /* 160 */
  1962. /* 0001 */ V(0, 12, 4),
  1963. /* 0010 */ V(4, 11, 4),
  1964. /* 0011 */ V(11, 4, 4),
  1965. /* 0100 */ V(6, 10, 4),
  1966. /* 0101 */ V(10, 6, 4),
  1967. /* 0110 */ V(11, 3, 3),
  1968. /* 0111 */ V(11, 3, 3),
  1969. /* 1000 */ V(5, 10, 4),
  1970. /* 1001 */ V(10, 5, 4),
  1971. /* 1010 */ V(2, 11, 3),
  1972. /* 1011 */ V(2, 11, 3),
  1973. /* 1100 */ V(11, 2, 3),
  1974. /* 1101 */ V(11, 2, 3),
  1975. /* 1110 */ V(1, 11, 3),
  1976. /* 1111 */ V(1, 11, 3),
  1977. /* 0000 1111 ... */
  1978. /* 0000 */ V(11, 1, 3), /* 176 */
  1979. /* 0001 */ V(11, 1, 3),
  1980. /* 0010 */ V(0, 11, 4),
  1981. /* 0011 */ V(11, 0, 4),
  1982. /* 0100 */ V(6, 9, 4),
  1983. /* 0101 */ V(9, 6, 4),
  1984. /* 0110 */ V(4, 10, 4),
  1985. /* 0111 */ V(10, 4, 4),
  1986. /* 1000 */ V(7, 8, 4),
  1987. /* 1001 */ V(8, 7, 4),
  1988. /* 1010 */ V(10, 3, 3),
  1989. /* 1011 */ V(10, 3, 3),
  1990. /* 1100 */ V(3, 10, 4),
  1991. /* 1101 */ V(5, 9, 4),
  1992. /* 1110 */ V(2, 10, 3),
  1993. /* 1111 */ V(2, 10, 3),
  1994. /* 0001 0000 ... */
  1995. /* 0000 */ V(9, 5, 4), /* 192 */
  1996. /* 0001 */ V(6, 8, 4),
  1997. /* 0010 */ V(10, 1, 3),
  1998. /* 0011 */ V(10, 1, 3),
  1999. /* 0100 */ V(8, 6, 4),
  2000. /* 0101 */ V(7, 7, 4),
  2001. /* 0110 */ V(9, 4, 3),
  2002. /* 0111 */ V(9, 4, 3),
  2003. /* 1000 */ V(4, 9, 4),
  2004. /* 1001 */ V(5, 7, 4),
  2005. /* 1010 */ V(6, 7, 3),
  2006. /* 1011 */ V(6, 7, 3),
  2007. /* 1100 */ V(10, 2, 2),
  2008. /* 1101 */ V(10, 2, 2),
  2009. /* 1110 */ V(10, 2, 2),
  2010. /* 1111 */ V(10, 2, 2),
  2011. /* 0001 0001 ... */
  2012. /* 000 */ V(1, 10, 2), /* 208 */
  2013. /* 001 */ V(1, 10, 2),
  2014. /* 010 */ V(0, 10, 3),
  2015. /* 011 */ V(10, 0, 3),
  2016. /* 100 */ V(3, 9, 3),
  2017. /* 101 */ V(9, 3, 3),
  2018. /* 110 */ V(5, 8, 3),
  2019. /* 111 */ V(8, 5, 3),
  2020. /* 0001 0010 ... */
  2021. /* 000 */ V(2, 9, 2), /* 216 */
  2022. /* 001 */ V(2, 9, 2),
  2023. /* 010 */ V(9, 2, 2),
  2024. /* 011 */ V(9, 2, 2),
  2025. /* 100 */ V(7, 6, 3),
  2026. /* 101 */ V(0, 9, 3),
  2027. /* 110 */ V(1, 9, 2),
  2028. /* 111 */ V(1, 9, 2),
  2029. /* 0001 0011 ... */
  2030. /* 000 */ V(9, 1, 2), /* 224 */
  2031. /* 001 */ V(9, 1, 2),
  2032. /* 010 */ V(9, 0, 3),
  2033. /* 011 */ V(4, 8, 3),
  2034. /* 100 */ V(8, 4, 3),
  2035. /* 101 */ V(7, 5, 3),
  2036. /* 110 */ V(3, 8, 3),
  2037. /* 111 */ V(8, 3, 3),
  2038. /* 0001 0100 ... */
  2039. /* 000 */ V(6, 6, 3), /* 232 */
  2040. /* 001 */ V(2, 8, 3),
  2041. /* 010 */ V(8, 2, 2),
  2042. /* 011 */ V(8, 2, 2),
  2043. /* 100 */ V(4, 7, 3),
  2044. /* 101 */ V(7, 4, 3),
  2045. /* 110 */ V(1, 8, 2),
  2046. /* 111 */ V(1, 8, 2),
  2047. /* 0001 0101 ... */
  2048. /* 000 */ V(8, 1, 2), /* 240 */
  2049. /* 001 */ V(8, 1, 2),
  2050. /* 010 */ V(8, 0, 2),
  2051. /* 011 */ V(8, 0, 2),
  2052. /* 100 */ V(0, 8, 3),
  2053. /* 101 */ V(5, 6, 3),
  2054. /* 110 */ V(3, 7, 2),
  2055. /* 111 */ V(3, 7, 2),
  2056. /* 0001 0110 ... */
  2057. /* 000 */ V(7, 3, 2), /* 248 */
  2058. /* 001 */ V(7, 3, 2),
  2059. /* 010 */ V(6, 5, 3),
  2060. /* 011 */ V(4, 6, 3),
  2061. /* 100 */ V(2, 7, 2),
  2062. /* 101 */ V(2, 7, 2),
  2063. /* 110 */ V(7, 2, 2),
  2064. /* 111 */ V(7, 2, 2),
  2065. /* 0001 0111 ... */
  2066. /* 000 */ V(6, 4, 3), /* 256 */
  2067. /* 001 */ V(5, 5, 3),
  2068. /* 010 */ V(0, 7, 2),
  2069. /* 011 */ V(0, 7, 2),
  2070. /* 100 */ V(1, 7, 1),
  2071. /* 101 */ V(1, 7, 1),
  2072. /* 110 */ V(1, 7, 1),
  2073. /* 111 */ V(1, 7, 1),
  2074. /* 0001 1000 ... */
  2075. /* 00 */ V(7, 1, 1), /* 264 */
  2076. /* 01 */ V(7, 1, 1),
  2077. /* 10 */ V(7, 0, 2),
  2078. /* 11 */ V(3, 6, 2),
  2079. /* 0001 1001 ... */
  2080. /* 00 */ V(6, 3, 2), /* 268 */
  2081. /* 01 */ V(4, 5, 2),
  2082. /* 10 */ V(5, 4, 2),
  2083. /* 11 */ V(2, 6, 2),
  2084. /* 0001 1010 ... */
  2085. /* 0 */ V(6, 2, 1), /* 272 */
  2086. /* 1 */ V(1, 6, 1),
  2087. /* 0001 1011 ... */
  2088. /* 00 */ V(6, 1, 1), /* 274 */
  2089. /* 01 */ V(6, 1, 1),
  2090. /* 10 */ V(0, 6, 2),
  2091. /* 11 */ V(6, 0, 2),
  2092. /* 0001 1100 ... */
  2093. /* 00 */ V(5, 3, 1), /* 278 */
  2094. /* 01 */ V(5, 3, 1),
  2095. /* 10 */ V(3, 5, 2),
  2096. /* 11 */ V(4, 4, 2),
  2097. /* 0001 1101 ... */
  2098. /* 0 */ V(2, 5, 1), /* 282 */
  2099. /* 1 */ V(5, 2, 1),
  2100. /* 0001 1111 ... */
  2101. /* 0 */ V(1, 5, 1), /* 284 */
  2102. /* 1 */ V(0, 5, 1),
  2103. /* 0010 0000 ... */
  2104. /* 0 */ V(3, 4, 1), /* 286 */
  2105. /* 1 */ V(4, 3, 1),
  2106. /* 0010 0001 ... */
  2107. /* 0 */ V(5, 0, 1), /* 288 */
  2108. /* 1 */ V(2, 4, 1),
  2109. /* 0010 0010 ... */
  2110. /* 0 */ V(4, 2, 1), /* 290 */
  2111. /* 1 */ V(3, 3, 1),
  2112. /* 0010 0101 ... */
  2113. /* 0 */ V(0, 4, 1), /* 292 */
  2114. /* 1 */ V(4, 0, 1),
  2115. /* 0000 0110 1100 ... */
  2116. /* 0000 */ V(12, 14, 4), /* 294 */
  2117. /* 0001 */ PTR(400, 1),
  2118. /* 0010 */ V(13, 14, 3),
  2119. /* 0011 */ V(13, 14, 3),
  2120. /* 0100 */ V(14, 9, 3),
  2121. /* 0101 */ V(14, 9, 3),
  2122. /* 0110 */ V(14, 10, 4),
  2123. /* 0111 */ V(13, 9, 4),
  2124. /* 1000 */ V(14, 14, 2),
  2125. /* 1001 */ V(14, 14, 2),
  2126. /* 1010 */ V(14, 14, 2),
  2127. /* 1011 */ V(14, 14, 2),
  2128. /* 1100 */ V(14, 13, 3),
  2129. /* 1101 */ V(14, 13, 3),
  2130. /* 1110 */ V(14, 11, 3),
  2131. /* 1111 */ V(14, 11, 3),
  2132. /* 0000 0110 1101 ... */
  2133. /* 000 */ V(11, 14, 2), /* 310 */
  2134. /* 001 */ V(11, 14, 2),
  2135. /* 010 */ V(12, 13, 2),
  2136. /* 011 */ V(12, 13, 2),
  2137. /* 100 */ V(13, 12, 3),
  2138. /* 101 */ V(13, 11, 3),
  2139. /* 110 */ V(10, 14, 2),
  2140. /* 111 */ V(10, 14, 2),
  2141. /* 0000 0110 1110 ... */
  2142. /* 000 */ V(12, 12, 2), /* 318 */
  2143. /* 001 */ V(12, 12, 2),
  2144. /* 010 */ V(10, 13, 3),
  2145. /* 011 */ V(13, 10, 3),
  2146. /* 100 */ V(7, 14, 3),
  2147. /* 101 */ V(10, 12, 3),
  2148. /* 110 */ V(12, 10, 2),
  2149. /* 111 */ V(12, 10, 2),
  2150. /* 0000 0110 1111 ... */
  2151. /* 000 */ V(12, 9, 3), /* 326 */
  2152. /* 001 */ V(7, 13, 3),
  2153. /* 010 */ V(5, 14, 2),
  2154. /* 011 */ V(5, 14, 2),
  2155. /* 100 */ V(11, 13, 1),
  2156. /* 101 */ V(11, 13, 1),
  2157. /* 110 */ V(11, 13, 1),
  2158. /* 111 */ V(11, 13, 1),
  2159. /* 0000 1011 0000 ... */
  2160. /* 00 */ V(9, 14, 1), /* 334 */
  2161. /* 01 */ V(9, 14, 1),
  2162. /* 10 */ V(11, 12, 2),
  2163. /* 11 */ V(12, 11, 2),
  2164. /* 0000 1011 0001 ... */
  2165. /* 00 */ V(8, 14, 2), /* 338 */
  2166. /* 01 */ V(14, 8, 2),
  2167. /* 10 */ V(9, 13, 2),
  2168. /* 11 */ V(14, 7, 2),
  2169. /* 0000 1011 0010 ... */
  2170. /* 00 */ V(11, 11, 2), /* 342 */
  2171. /* 01 */ V(8, 13, 2),
  2172. /* 10 */ V(13, 8, 2),
  2173. /* 11 */ V(6, 14, 2),
  2174. /* 0000 1011 0011 ... */
  2175. /* 0 */ V(14, 6, 1), /* 346 */
  2176. /* 1 */ V(9, 12, 1),
  2177. /* 0000 1011 0100 ... */
  2178. /* 00 */ V(10, 11, 2), /* 348 */
  2179. /* 01 */ V(11, 10, 2),
  2180. /* 10 */ V(14, 5, 2),
  2181. /* 11 */ V(13, 7, 2),
  2182. /* 0000 1011 0101 ... */
  2183. /* 00 */ V(4, 14, 1), /* 352 */
  2184. /* 01 */ V(4, 14, 1),
  2185. /* 10 */ V(14, 4, 2),
  2186. /* 11 */ V(8, 12, 2),
  2187. /* 0000 1011 0110 ... */
  2188. /* 0 */ V(12, 8, 1), /* 356 */
  2189. /* 1 */ V(3, 14, 1),
  2190. /* 0000 1011 0111 ... */
  2191. /* 00 */ V(6, 13, 1), /* 358 */
  2192. /* 01 */ V(6, 13, 1),
  2193. /* 10 */ V(13, 6, 2),
  2194. /* 11 */ V(9, 11, 2),
  2195. /* 0000 1011 1000 ... */
  2196. /* 00 */ V(11, 9, 2), /* 362 */
  2197. /* 01 */ V(10, 10, 2),
  2198. /* 10 */ V(14, 1, 1),
  2199. /* 11 */ V(14, 1, 1),
  2200. /* 0000 1011 1001 ... */
  2201. /* 00 */ V(13, 4, 1), /* 366 */
  2202. /* 01 */ V(13, 4, 1),
  2203. /* 10 */ V(11, 8, 2),
  2204. /* 11 */ V(10, 9, 2),
  2205. /* 0000 1011 1010 ... */
  2206. /* 00 */ V(7, 11, 1), /* 370 */
  2207. /* 01 */ V(7, 11, 1),
  2208. /* 10 */ V(11, 7, 2),
  2209. /* 11 */ V(13, 0, 2),
  2210. /* 0000 1011 1100 ... */
  2211. /* 0 */ V(0, 14, 1), /* 374 */
  2212. /* 1 */ V(14, 0, 1),
  2213. /* 0000 1011 1101 ... */
  2214. /* 0 */ V(5, 13, 1), /* 376 */
  2215. /* 1 */ V(13, 5, 1),
  2216. /* 0000 1011 1110 ... */
  2217. /* 0 */ V(7, 12, 1), /* 378 */
  2218. /* 1 */ V(12, 7, 1),
  2219. /* 0000 1011 1111 ... */
  2220. /* 0 */ V(4, 13, 1), /* 380 */
  2221. /* 1 */ V(8, 11, 1),
  2222. /* 0000 1100 0000 ... */
  2223. /* 0 */ V(9, 10, 1), /* 382 */
  2224. /* 1 */ V(6, 12, 1),
  2225. /* 0000 1100 0001 ... */
  2226. /* 0 */ V(12, 6, 1), /* 384 */
  2227. /* 1 */ V(3, 13, 1),
  2228. /* 0000 1100 0010 ... */
  2229. /* 0 */ V(5, 12, 1), /* 386 */
  2230. /* 1 */ V(12, 5, 1),
  2231. /* 0000 1100 0100 ... */
  2232. /* 0 */ V(8, 10, 1), /* 388 */
  2233. /* 1 */ V(10, 8, 1),
  2234. /* 0000 1100 0101 ... */
  2235. /* 0 */ V(9, 9, 1), /* 390 */
  2236. /* 1 */ V(4, 12, 1),
  2237. /* 0000 1100 0110 ... */
  2238. /* 0 */ V(11, 6, 1), /* 392 */
  2239. /* 1 */ V(7, 10, 1),
  2240. /* 0000 1100 1000 ... */
  2241. /* 0 */ V(5, 11, 1), /* 394 */
  2242. /* 1 */ V(8, 9, 1),
  2243. /* 0000 1100 1011 ... */
  2244. /* 0 */ V(9, 8, 1), /* 396 */
  2245. /* 1 */ V(7, 9, 1),
  2246. /* 0000 1101 0101 ... */
  2247. /* 0 */ V(9, 7, 1), /* 398 */
  2248. /* 1 */ V(8, 8, 1),
  2249. /* 0000 0110 1100 0001 ... */
  2250. /* 0 */ V(14, 12, 1), /* 400 */
  2251. /* 1 */ V(13, 13, 1)
  2252. };
  2253. static
  2254. union huffpair const hufftab24[] = {
  2255. /* 0000 */ PTR(16, 4),
  2256. /* 0001 */ PTR(32, 4),
  2257. /* 0010 */ PTR(48, 4),
  2258. /* 0011 */ V(15, 15, 4),
  2259. /* 0100 */ PTR(64, 4),
  2260. /* 0101 */ PTR(80, 4),
  2261. /* 0110 */ PTR(96, 4),
  2262. /* 0111 */ PTR(112, 4),
  2263. /* 1000 */ PTR(128, 4),
  2264. /* 1001 */ PTR(144, 4),
  2265. /* 1010 */ PTR(160, 3),
  2266. /* 1011 */ PTR(168, 2),
  2267. /* 1100 */ V(1, 1, 4),
  2268. /* 1101 */ V(0, 1, 4),
  2269. /* 1110 */ V(1, 0, 4),
  2270. /* 1111 */ V(0, 0, 4),
  2271. /* 0000 ... */
  2272. /* 0000 */ V(14, 15, 4), /* 16 */
  2273. /* 0001 */ V(15, 14, 4),
  2274. /* 0010 */ V(13, 15, 4),
  2275. /* 0011 */ V(15, 13, 4),
  2276. /* 0100 */ V(12, 15, 4),
  2277. /* 0101 */ V(15, 12, 4),
  2278. /* 0110 */ V(11, 15, 4),
  2279. /* 0111 */ V(15, 11, 4),
  2280. /* 1000 */ V(15, 10, 3),
  2281. /* 1001 */ V(15, 10, 3),
  2282. /* 1010 */ V(10, 15, 4),
  2283. /* 1011 */ V(9, 15, 4),
  2284. /* 1100 */ V(15, 9, 3),
  2285. /* 1101 */ V(15, 9, 3),
  2286. /* 1110 */ V(15, 8, 3),
  2287. /* 1111 */ V(15, 8, 3),
  2288. /* 0001 ... */
  2289. /* 0000 */ V(8, 15, 4), /* 32 */
  2290. /* 0001 */ V(7, 15, 4),
  2291. /* 0010 */ V(15, 7, 3),
  2292. /* 0011 */ V(15, 7, 3),
  2293. /* 0100 */ V(6, 15, 3),
  2294. /* 0101 */ V(6, 15, 3),
  2295. /* 0110 */ V(15, 6, 3),
  2296. /* 0111 */ V(15, 6, 3),
  2297. /* 1000 */ V(5, 15, 3),
  2298. /* 1001 */ V(5, 15, 3),
  2299. /* 1010 */ V(15, 5, 3),
  2300. /* 1011 */ V(15, 5, 3),
  2301. /* 1100 */ V(4, 15, 3),
  2302. /* 1101 */ V(4, 15, 3),
  2303. /* 1110 */ V(15, 4, 3),
  2304. /* 1111 */ V(15, 4, 3),
  2305. /* 0010 ... */
  2306. /* 0000 */ V(3, 15, 3), /* 48 */
  2307. /* 0001 */ V(3, 15, 3),
  2308. /* 0010 */ V(15, 3, 3),
  2309. /* 0011 */ V(15, 3, 3),
  2310. /* 0100 */ V(2, 15, 3),
  2311. /* 0101 */ V(2, 15, 3),
  2312. /* 0110 */ V(15, 2, 3),
  2313. /* 0111 */ V(15, 2, 3),
  2314. /* 1000 */ V(15, 1, 3),
  2315. /* 1001 */ V(15, 1, 3),
  2316. /* 1010 */ V(1, 15, 4),
  2317. /* 1011 */ V(15, 0, 4),
  2318. /* 1100 */ PTR(172, 3),
  2319. /* 1101 */ PTR(180, 3),
  2320. /* 1110 */ PTR(188, 3),
  2321. /* 1111 */ PTR(196, 3),
  2322. /* 0100 ... */
  2323. /* 0000 */ PTR(204, 4), /* 64 */
  2324. /* 0001 */ PTR(220, 3),
  2325. /* 0010 */ PTR(228, 3),
  2326. /* 0011 */ PTR(236, 3),
  2327. /* 0100 */ PTR(244, 2),
  2328. /* 0101 */ PTR(248, 2),
  2329. /* 0110 */ PTR(252, 2),
  2330. /* 0111 */ PTR(256, 2),
  2331. /* 1000 */ PTR(260, 2),
  2332. /* 1001 */ PTR(264, 2),
  2333. /* 1010 */ PTR(268, 2),
  2334. /* 1011 */ PTR(272, 2),
  2335. /* 1100 */ PTR(276, 2),
  2336. /* 1101 */ PTR(280, 3),
  2337. /* 1110 */ PTR(288, 2),
  2338. /* 1111 */ PTR(292, 2),
  2339. /* 0101 ... */
  2340. /* 0000 */ PTR(296, 2), /* 80 */
  2341. /* 0001 */ PTR(300, 3),
  2342. /* 0010 */ PTR(308, 2),
  2343. /* 0011 */ PTR(312, 3),
  2344. /* 0100 */ PTR(320, 1),
  2345. /* 0101 */ PTR(322, 2),
  2346. /* 0110 */ PTR(326, 2),
  2347. /* 0111 */ PTR(330, 1),
  2348. /* 1000 */ PTR(332, 2),
  2349. /* 1001 */ PTR(336, 1),
  2350. /* 1010 */ PTR(338, 1),
  2351. /* 1011 */ PTR(340, 1),
  2352. /* 1100 */ PTR(342, 1),
  2353. /* 1101 */ PTR(344, 1),
  2354. /* 1110 */ PTR(346, 1),
  2355. /* 1111 */ PTR(348, 1),
  2356. /* 0110 ... */
  2357. /* 0000 */ PTR(350, 1), /* 96 */
  2358. /* 0001 */ PTR(352, 1),
  2359. /* 0010 */ PTR(354, 1),
  2360. /* 0011 */ PTR(356, 1),
  2361. /* 0100 */ PTR(358, 1),
  2362. /* 0101 */ PTR(360, 1),
  2363. /* 0110 */ PTR(362, 1),
  2364. /* 0111 */ PTR(364, 1),
  2365. /* 1000 */ PTR(366, 1),
  2366. /* 1001 */ PTR(368, 1),
  2367. /* 1010 */ PTR(370, 2),
  2368. /* 1011 */ PTR(374, 1),
  2369. /* 1100 */ PTR(376, 2),
  2370. /* 1101 */ V(7, 3, 4),
  2371. /* 1110 */ PTR(380, 1),
  2372. /* 1111 */ V(7, 2, 4),
  2373. /* 0111 ... */
  2374. /* 0000 */ V(4, 6, 4), /* 112 */
  2375. /* 0001 */ V(6, 4, 4),
  2376. /* 0010 */ V(5, 5, 4),
  2377. /* 0011 */ V(7, 1, 4),
  2378. /* 0100 */ V(3, 6, 4),
  2379. /* 0101 */ V(6, 3, 4),
  2380. /* 0110 */ V(4, 5, 4),
  2381. /* 0111 */ V(5, 4, 4),
  2382. /* 1000 */ V(2, 6, 4),
  2383. /* 1001 */ V(6, 2, 4),
  2384. /* 1010 */ V(1, 6, 4),
  2385. /* 1011 */ V(6, 1, 4),
  2386. /* 1100 */ PTR(382, 1),
  2387. /* 1101 */ V(3, 5, 4),
  2388. /* 1110 */ V(5, 3, 4),
  2389. /* 1111 */ V(4, 4, 4),
  2390. /* 1000 ... */
  2391. /* 0000 */ V(2, 5, 4), /* 128 */
  2392. /* 0001 */ V(5, 2, 4),
  2393. /* 0010 */ V(1, 5, 4),
  2394. /* 0011 */ PTR(384, 1),
  2395. /* 0100 */ V(5, 1, 3),
  2396. /* 0101 */ V(5, 1, 3),
  2397. /* 0110 */ V(3, 4, 4),
  2398. /* 0111 */ V(4, 3, 4),
  2399. /* 1000 */ V(2, 4, 3),
  2400. /* 1001 */ V(2, 4, 3),
  2401. /* 1010 */ V(4, 2, 3),
  2402. /* 1011 */ V(4, 2, 3),
  2403. /* 1100 */ V(3, 3, 3),
  2404. /* 1101 */ V(3, 3, 3),
  2405. /* 1110 */ V(1, 4, 3),
  2406. /* 1111 */ V(1, 4, 3),
  2407. /* 1001 ... */
  2408. /* 0000 */ V(4, 1, 3), /* 144 */
  2409. /* 0001 */ V(4, 1, 3),
  2410. /* 0010 */ V(0, 4, 4),
  2411. /* 0011 */ V(4, 0, 4),
  2412. /* 0100 */ V(2, 3, 3),
  2413. /* 0101 */ V(2, 3, 3),
  2414. /* 0110 */ V(3, 2, 3),
  2415. /* 0111 */ V(3, 2, 3),
  2416. /* 1000 */ V(1, 3, 2),
  2417. /* 1001 */ V(1, 3, 2),
  2418. /* 1010 */ V(1, 3, 2),
  2419. /* 1011 */ V(1, 3, 2),
  2420. /* 1100 */ V(3, 1, 2),
  2421. /* 1101 */ V(3, 1, 2),
  2422. /* 1110 */ V(3, 1, 2),
  2423. /* 1111 */ V(3, 1, 2),
  2424. /* 1010 ... */
  2425. /* 000 */ V(0, 3, 3), /* 160 */
  2426. /* 001 */ V(3, 0, 3),
  2427. /* 010 */ V(2, 2, 2),
  2428. /* 011 */ V(2, 2, 2),
  2429. /* 100 */ V(1, 2, 1),
  2430. /* 101 */ V(1, 2, 1),
  2431. /* 110 */ V(1, 2, 1),
  2432. /* 111 */ V(1, 2, 1),
  2433. /* 1011 ... */
  2434. /* 00 */ V(2, 1, 1), /* 168 */
  2435. /* 01 */ V(2, 1, 1),
  2436. /* 10 */ V(0, 2, 2),
  2437. /* 11 */ V(2, 0, 2),
  2438. /* 0010 1100 ... */
  2439. /* 000 */ V(0, 15, 1), /* 172 */
  2440. /* 001 */ V(0, 15, 1),
  2441. /* 010 */ V(0, 15, 1),
  2442. /* 011 */ V(0, 15, 1),
  2443. /* 100 */ V(14, 14, 3),
  2444. /* 101 */ V(13, 14, 3),
  2445. /* 110 */ V(14, 13, 3),
  2446. /* 111 */ V(12, 14, 3),
  2447. /* 0010 1101 ... */
  2448. /* 000 */ V(14, 12, 3), /* 180 */
  2449. /* 001 */ V(13, 13, 3),
  2450. /* 010 */ V(11, 14, 3),
  2451. /* 011 */ V(14, 11, 3),
  2452. /* 100 */ V(12, 13, 3),
  2453. /* 101 */ V(13, 12, 3),
  2454. /* 110 */ V(10, 14, 3),
  2455. /* 111 */ V(14, 10, 3),
  2456. /* 0010 1110 ... */
  2457. /* 000 */ V(11, 13, 3), /* 188 */
  2458. /* 001 */ V(13, 11, 3),
  2459. /* 010 */ V(12, 12, 3),
  2460. /* 011 */ V(9, 14, 3),
  2461. /* 100 */ V(14, 9, 3),
  2462. /* 101 */ V(10, 13, 3),
  2463. /* 110 */ V(13, 10, 3),
  2464. /* 111 */ V(11, 12, 3),
  2465. /* 0010 1111 ... */
  2466. /* 000 */ V(12, 11, 3), /* 196 */
  2467. /* 001 */ V(8, 14, 3),
  2468. /* 010 */ V(14, 8, 3),
  2469. /* 011 */ V(9, 13, 3),
  2470. /* 100 */ V(13, 9, 3),
  2471. /* 101 */ V(7, 14, 3),
  2472. /* 110 */ V(14, 7, 3),
  2473. /* 111 */ V(10, 12, 3),
  2474. /* 0100 0000 ... */
  2475. /* 0000 */ V(12, 10, 3), /* 204 */
  2476. /* 0001 */ V(12, 10, 3),
  2477. /* 0010 */ V(11, 11, 3),
  2478. /* 0011 */ V(11, 11, 3),
  2479. /* 0100 */ V(8, 13, 3),
  2480. /* 0101 */ V(8, 13, 3),
  2481. /* 0110 */ V(13, 8, 3),
  2482. /* 0111 */ V(13, 8, 3),
  2483. /* 1000 */ V(0, 14, 4),
  2484. /* 1001 */ V(14, 0, 4),
  2485. /* 1010 */ V(0, 13, 3),
  2486. /* 1011 */ V(0, 13, 3),
  2487. /* 1100 */ V(14, 6, 2),
  2488. /* 1101 */ V(14, 6, 2),
  2489. /* 1110 */ V(14, 6, 2),
  2490. /* 1111 */ V(14, 6, 2),
  2491. /* 0100 0001 ... */
  2492. /* 000 */ V(6, 14, 3), /* 220 */
  2493. /* 001 */ V(9, 12, 3),
  2494. /* 010 */ V(12, 9, 2),
  2495. /* 011 */ V(12, 9, 2),
  2496. /* 100 */ V(5, 14, 2),
  2497. /* 101 */ V(5, 14, 2),
  2498. /* 110 */ V(11, 10, 2),
  2499. /* 111 */ V(11, 10, 2),
  2500. /* 0100 0010 ... */
  2501. /* 000 */ V(14, 5, 2), /* 228 */
  2502. /* 001 */ V(14, 5, 2),
  2503. /* 010 */ V(10, 11, 3),
  2504. /* 011 */ V(7, 13, 3),
  2505. /* 100 */ V(13, 7, 2),
  2506. /* 101 */ V(13, 7, 2),
  2507. /* 110 */ V(14, 4, 2),
  2508. /* 111 */ V(14, 4, 2),
  2509. /* 0100 0011 ... */
  2510. /* 000 */ V(8, 12, 2), /* 236 */
  2511. /* 001 */ V(8, 12, 2),
  2512. /* 010 */ V(12, 8, 2),
  2513. /* 011 */ V(12, 8, 2),
  2514. /* 100 */ V(4, 14, 3),
  2515. /* 101 */ V(2, 14, 3),
  2516. /* 110 */ V(3, 14, 2),
  2517. /* 111 */ V(3, 14, 2),
  2518. /* 0100 0100 ... */
  2519. /* 00 */ V(6, 13, 2), /* 244 */
  2520. /* 01 */ V(13, 6, 2),
  2521. /* 10 */ V(14, 3, 2),
  2522. /* 11 */ V(9, 11, 2),
  2523. /* 0100 0101 ... */
  2524. /* 00 */ V(11, 9, 2), /* 248 */
  2525. /* 01 */ V(10, 10, 2),
  2526. /* 10 */ V(14, 2, 2),
  2527. /* 11 */ V(1, 14, 2),
  2528. /* 0100 0110 ... */
  2529. /* 00 */ V(14, 1, 2), /* 252 */
  2530. /* 01 */ V(5, 13, 2),
  2531. /* 10 */ V(13, 5, 2),
  2532. /* 11 */ V(7, 12, 2),
  2533. /* 0100 0111 ... */
  2534. /* 00 */ V(12, 7, 2), /* 256 */
  2535. /* 01 */ V(4, 13, 2),
  2536. /* 10 */ V(8, 11, 2),
  2537. /* 11 */ V(11, 8, 2),
  2538. /* 0100 1000 ... */
  2539. /* 00 */ V(13, 4, 2), /* 260 */
  2540. /* 01 */ V(9, 10, 2),
  2541. /* 10 */ V(10, 9, 2),
  2542. /* 11 */ V(6, 12, 2),
  2543. /* 0100 1001 ... */
  2544. /* 00 */ V(12, 6, 2), /* 264 */
  2545. /* 01 */ V(3, 13, 2),
  2546. /* 10 */ V(13, 3, 2),
  2547. /* 11 */ V(2, 13, 2),
  2548. /* 0100 1010 ... */
  2549. /* 00 */ V(13, 2, 2), /* 268 */
  2550. /* 01 */ V(1, 13, 2),
  2551. /* 10 */ V(7, 11, 2),
  2552. /* 11 */ V(11, 7, 2),
  2553. /* 0100 1011 ... */
  2554. /* 00 */ V(13, 1, 2), /* 272 */
  2555. /* 01 */ V(5, 12, 2),
  2556. /* 10 */ V(12, 5, 2),
  2557. /* 11 */ V(8, 10, 2),
  2558. /* 0100 1100 ... */
  2559. /* 00 */ V(10, 8, 2), /* 276 */
  2560. /* 01 */ V(9, 9, 2),
  2561. /* 10 */ V(4, 12, 2),
  2562. /* 11 */ V(12, 4, 2),
  2563. /* 0100 1101 ... */
  2564. /* 000 */ V(6, 11, 2), /* 280 */
  2565. /* 001 */ V(6, 11, 2),
  2566. /* 010 */ V(11, 6, 2),
  2567. /* 011 */ V(11, 6, 2),
  2568. /* 100 */ V(13, 0, 3),
  2569. /* 101 */ V(0, 12, 3),
  2570. /* 110 */ V(3, 12, 2),
  2571. /* 111 */ V(3, 12, 2),
  2572. /* 0100 1110 ... */
  2573. /* 00 */ V(12, 3, 2), /* 288 */
  2574. /* 01 */ V(7, 10, 2),
  2575. /* 10 */ V(10, 7, 2),
  2576. /* 11 */ V(2, 12, 2),
  2577. /* 0100 1111 ... */
  2578. /* 00 */ V(12, 2, 2), /* 292 */
  2579. /* 01 */ V(5, 11, 2),
  2580. /* 10 */ V(11, 5, 2),
  2581. /* 11 */ V(1, 12, 2),
  2582. /* 0101 0000 ... */
  2583. /* 00 */ V(8, 9, 2), /* 296 */
  2584. /* 01 */ V(9, 8, 2),
  2585. /* 10 */ V(12, 1, 2),
  2586. /* 11 */ V(4, 11, 2),
  2587. /* 0101 0001 ... */
  2588. /* 000 */ V(12, 0, 3), /* 300 */
  2589. /* 001 */ V(0, 11, 3),
  2590. /* 010 */ V(3, 11, 2),
  2591. /* 011 */ V(3, 11, 2),
  2592. /* 100 */ V(11, 0, 3),
  2593. /* 101 */ V(0, 10, 3),
  2594. /* 110 */ V(1, 10, 2),
  2595. /* 111 */ V(1, 10, 2),
  2596. /* 0101 0010 ... */
  2597. /* 00 */ V(11, 4, 1), /* 308 */
  2598. /* 01 */ V(11, 4, 1),
  2599. /* 10 */ V(6, 10, 2),
  2600. /* 11 */ V(10, 6, 2),
  2601. /* 0101 0011 ... */
  2602. /* 000 */ V(7, 9, 2), /* 312 */
  2603. /* 001 */ V(7, 9, 2),
  2604. /* 010 */ V(9, 7, 2),
  2605. /* 011 */ V(9, 7, 2),
  2606. /* 100 */ V(10, 0, 3),
  2607. /* 101 */ V(0, 9, 3),
  2608. /* 110 */ V(9, 0, 2),
  2609. /* 111 */ V(9, 0, 2),
  2610. /* 0101 0100 ... */
  2611. /* 0 */ V(11, 3, 1), /* 320 */
  2612. /* 1 */ V(8, 8, 1),
  2613. /* 0101 0101 ... */
  2614. /* 00 */ V(2, 11, 2), /* 322 */
  2615. /* 01 */ V(5, 10, 2),
  2616. /* 10 */ V(11, 2, 1),
  2617. /* 11 */ V(11, 2, 1),
  2618. /* 0101 0110 ... */
  2619. /* 00 */ V(10, 5, 2), /* 326 */
  2620. /* 01 */ V(1, 11, 2),
  2621. /* 10 */ V(11, 1, 2),
  2622. /* 11 */ V(6, 9, 2),
  2623. /* 0101 0111 ... */
  2624. /* 0 */ V(9, 6, 1), /* 330 */
  2625. /* 1 */ V(10, 4, 1),
  2626. /* 0101 1000 ... */
  2627. /* 00 */ V(4, 10, 2), /* 332 */
  2628. /* 01 */ V(7, 8, 2),
  2629. /* 10 */ V(8, 7, 1),
  2630. /* 11 */ V(8, 7, 1),
  2631. /* 0101 1001 ... */
  2632. /* 0 */ V(3, 10, 1), /* 336 */
  2633. /* 1 */ V(10, 3, 1),
  2634. /* 0101 1010 ... */
  2635. /* 0 */ V(5, 9, 1), /* 338 */
  2636. /* 1 */ V(9, 5, 1),
  2637. /* 0101 1011 ... */
  2638. /* 0 */ V(2, 10, 1), /* 340 */
  2639. /* 1 */ V(10, 2, 1),
  2640. /* 0101 1100 ... */
  2641. /* 0 */ V(10, 1, 1), /* 342 */
  2642. /* 1 */ V(6, 8, 1),
  2643. /* 0101 1101 ... */
  2644. /* 0 */ V(8, 6, 1), /* 344 */
  2645. /* 1 */ V(7, 7, 1),
  2646. /* 0101 1110 ... */
  2647. /* 0 */ V(4, 9, 1), /* 346 */
  2648. /* 1 */ V(9, 4, 1),
  2649. /* 0101 1111 ... */
  2650. /* 0 */ V(3, 9, 1), /* 348 */
  2651. /* 1 */ V(9, 3, 1),
  2652. /* 0110 0000 ... */
  2653. /* 0 */ V(5, 8, 1), /* 350 */
  2654. /* 1 */ V(8, 5, 1),
  2655. /* 0110 0001 ... */
  2656. /* 0 */ V(2, 9, 1), /* 352 */
  2657. /* 1 */ V(6, 7, 1),
  2658. /* 0110 0010 ... */
  2659. /* 0 */ V(7, 6, 1), /* 354 */
  2660. /* 1 */ V(9, 2, 1),
  2661. /* 0110 0011 ... */
  2662. /* 0 */ V(1, 9, 1), /* 356 */
  2663. /* 1 */ V(9, 1, 1),
  2664. /* 0110 0100 ... */
  2665. /* 0 */ V(4, 8, 1), /* 358 */
  2666. /* 1 */ V(8, 4, 1),
  2667. /* 0110 0101 ... */
  2668. /* 0 */ V(5, 7, 1), /* 360 */
  2669. /* 1 */ V(7, 5, 1),
  2670. /* 0110 0110 ... */
  2671. /* 0 */ V(3, 8, 1), /* 362 */
  2672. /* 1 */ V(8, 3, 1),
  2673. /* 0110 0111 ... */
  2674. /* 0 */ V(6, 6, 1), /* 364 */
  2675. /* 1 */ V(2, 8, 1),
  2676. /* 0110 1000 ... */
  2677. /* 0 */ V(8, 2, 1), /* 366 */
  2678. /* 1 */ V(1, 8, 1),
  2679. /* 0110 1001 ... */
  2680. /* 0 */ V(4, 7, 1), /* 368 */
  2681. /* 1 */ V(7, 4, 1),
  2682. /* 0110 1010 ... */
  2683. /* 00 */ V(8, 1, 1), /* 370 */
  2684. /* 01 */ V(8, 1, 1),
  2685. /* 10 */ V(0, 8, 2),
  2686. /* 11 */ V(8, 0, 2),
  2687. /* 0110 1011 ... */
  2688. /* 0 */ V(5, 6, 1), /* 374 */
  2689. /* 1 */ V(6, 5, 1),
  2690. /* 0110 1100 ... */
  2691. /* 00 */ V(1, 7, 1), /* 376 */
  2692. /* 01 */ V(1, 7, 1),
  2693. /* 10 */ V(0, 7, 2),
  2694. /* 11 */ V(7, 0, 2),
  2695. /* 0110 1110 ... */
  2696. /* 0 */ V(3, 7, 1), /* 380 */
  2697. /* 1 */ V(2, 7, 1),
  2698. /* 0111 1100 ... */
  2699. /* 0 */ V(0, 6, 1), /* 382 */
  2700. /* 1 */ V(6, 0, 1),
  2701. /* 1000 0011 ... */
  2702. /* 0 */ V(0, 5, 1), /* 384 */
  2703. /* 1 */ V(5, 0, 1)
  2704. };
  2705. # undef V
  2706. # undef PTR
  2707. /* external tables */
  2708. union huffquad const *const mad_huff_quad_table[2] = { hufftabA, hufftabB };
  2709. struct hufftable const mad_huff_pair_table[32] = {
  2710. /* 0 */ { hufftab0, 0, 0 },
  2711. /* 1 */ { hufftab1, 0, 3 },
  2712. /* 2 */ { hufftab2, 0, 3 },
  2713. /* 3 */ { hufftab3, 0, 3 },
  2714. /* 4 */ { 0 /* not used */ },
  2715. /* 5 */ { hufftab5, 0, 3 },
  2716. /* 6 */ { hufftab6, 0, 4 },
  2717. /* 7 */ { hufftab7, 0, 4 },
  2718. /* 8 */ { hufftab8, 0, 4 },
  2719. /* 9 */ { hufftab9, 0, 4 },
  2720. /* 10 */ { hufftab10, 0, 4 },
  2721. /* 11 */ { hufftab11, 0, 4 },
  2722. /* 12 */ { hufftab12, 0, 4 },
  2723. /* 13 */ { hufftab13, 0, 4 },
  2724. /* 14 */ { 0 /* not used */ },
  2725. /* 15 */ { hufftab15, 0, 4 },
  2726. /* 16 */ { hufftab16, 1, 4 },
  2727. /* 17 */ { hufftab16, 2, 4 },
  2728. /* 18 */ { hufftab16, 3, 4 },
  2729. /* 19 */ { hufftab16, 4, 4 },
  2730. /* 20 */ { hufftab16, 6, 4 },
  2731. /* 21 */ { hufftab16, 8, 4 },
  2732. /* 22 */ { hufftab16, 10, 4 },
  2733. /* 23 */ { hufftab16, 13, 4 },
  2734. /* 24 */ { hufftab24, 4, 4 },
  2735. /* 25 */ { hufftab24, 5, 4 },
  2736. /* 26 */ { hufftab24, 6, 4 },
  2737. /* 27 */ { hufftab24, 7, 4 },
  2738. /* 28 */ { hufftab24, 8, 4 },
  2739. /* 29 */ { hufftab24, 9, 4 },
  2740. /* 30 */ { hufftab24, 11, 4 },
  2741. /* 31 */ { hufftab24, 13, 4 }
  2742. };