hcb_10.h

00001 /*
00002 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding
00003 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com
00004 **  
00005 ** This program is free software; you can redistribute it and/or modify
00006 ** it under the terms of the GNU General Public License as published by
00007 ** the Free Software Foundation; either version 2 of the License, or
00008 ** (at your option) any later version.
00009 ** 
00010 ** This program is distributed in the hope that it will be useful,
00011 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 ** GNU General Public License for more details.
00014 ** 
00015 ** You should have received a copy of the GNU General Public License
00016 ** along with this program; if not, write to the Free Software 
00017 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 **
00019 ** Any non-GPL usage of this software or parts of this software is strictly
00020 ** forbidden.
00021 **
00022 ** Commercial non-GPL licensing of this software is possible.
00023 ** For more info contact Ahead Software through [email protected].
00024 **
00025 ** $Id: hcb_10.h,v 1.2 2005/11/01 21:41:43 gabest Exp $
00026 **/
00027 
00028 /* 2-step huffman table HCB_10 */
00029 
00030 
00031 /* 1st step: 6 bits
00032  *           2^6 = 64 entries
00033  *
00034  * Used to find offset into 2nd step table and number of extra bits to get
00035  */
00036 static hcb hcb10_1[] = {
00037     /* 4 bit codewords */
00038     { /* 000000 */ 0, 0 },
00039     { /*        */ 0, 0 },
00040     { /*        */ 0, 0 },
00041     { /*        */ 0, 0 },
00042     { /* 000100 */ 1, 0 },
00043     { /*        */ 1, 0 },
00044     { /*        */ 1, 0 },
00045     { /*        */ 1, 0 },
00046     { /* 001000 */ 2, 0 },
00047     { /*        */ 2, 0 },
00048     { /*        */ 2, 0 },
00049     { /*        */ 2, 0 },
00050     /* 5 bit codewords */
00051     { /* 001100 */ 3, 0 },
00052     { /*        */ 3, 0 },
00053     { /* 001110 */ 4, 0 },
00054     { /*        */ 4, 0 },
00055     { /* 010000 */ 5, 0 },
00056     { /*        */ 5, 0 },
00057     { /* 010010 */ 6, 0 },
00058     { /*        */ 6, 0 },
00059     { /* 010100 */ 7, 0 },
00060     { /*        */ 7, 0 },
00061     { /* 010110 */ 8, 0 },
00062     { /*        */ 8, 0 },
00063     { /* 011000 */ 9, 0 },
00064     { /*        */ 9, 0 },
00065     { /* 011010 */ 10, 0 },
00066     { /*        */ 10, 0 },
00067     /* 6 bit codewords */
00068     { /* 011100 */ 11, 0 },
00069     { /* 011101 */ 12, 0 },
00070     { /* 011110 */ 13, 0 },
00071     { /* 011111 */ 14, 0 },
00072     { /* 100000 */ 15, 0 },
00073     { /* 100001 */ 16, 0 },
00074     { /* 100010 */ 17, 0 },
00075     { /* 100011 */ 18, 0 },
00076     { /* 100100 */ 19, 0 },
00077     { /* 100101 */ 20, 0 },
00078     { /* 100110 */ 21, 0 },
00079     { /* 100111 */ 22, 0 },
00080     { /* 101000 */ 23, 0 },
00081     { /* 101001 */ 24, 0 },
00082     /* 7 bit codewords */
00083     { /* 101010 */ 25, 1 },
00084     { /* 101011 */ 27, 1 },
00085     { /* 101100 */ 29, 1 },
00086     { /* 101101 */ 31, 1 },
00087     { /* 101110 */ 33, 1 },
00088     { /* 101111 */ 35, 1 },
00089     { /* 110000 */ 37, 1 },
00090     { /* 110001 */ 39, 1 },
00091     /* 7/8 bit codewords */
00092     { /* 110010 */ 41, 2 },
00093     /* 8 bit codewords */
00094     { /* 110011 */ 45, 2 },
00095     { /* 110100 */ 49, 2 },
00096     { /* 110101 */ 53, 2 },
00097     { /* 110110 */ 57, 2 },
00098     { /* 110111 */ 61, 2 },
00099     /* 8/9 bit codewords */
00100     { /* 111000 */ 65, 3 },
00101     /* 9 bit codewords */
00102     { /* 111001 */ 73, 3 },
00103     { /* 111010 */ 81, 3 },
00104     { /* 111011 */ 89, 3 },
00105     /* 9/10 bit codewords */
00106     { /* 111100 */ 97, 4 },
00107     /* 10 bit codewords */
00108     { /* 111101 */ 113, 4 },
00109     { /* 111110 */ 129, 4 },
00110     /* 10/11/12 bit codewords */
00111     { /* 111111 */ 145, 6 }
00112 };
00113 
00114 /* 2nd step table
00115  *
00116  * Gives size of codeword and actual data (x,y,v,w)
00117  */
00118 static hcb_2_pair hcb10_2[] = {
00119     /* 4 bit codewords */
00120     { 4,  1,  1 },
00121     { 4,  1,  2 },
00122     { 4,  2,  1 },
00123 
00124     /* 5 bit codewords */
00125     { 5,  2,  2 },
00126     { 5,  1,  0 },
00127     { 5,  0,  1 },
00128     { 5,  1,  3 },
00129     { 5,  3,  2 },
00130     { 5,  3,  1 },
00131     { 5,  2,  3 },
00132     { 5,  3,  3 },
00133 
00134     /* 6 bit codewords */
00135     { 6,  2,  0 },
00136     { 6,  0,  2 },
00137     { 6,  2,  4 },
00138     { 6,  4,  2 },
00139     { 6,  1,  4 },
00140     { 6,  4,  1 },
00141     { 6,  0,  0 },
00142     { 6,  4,  3 },
00143     { 6,  3,  4 },
00144     { 6,  3,  0 },
00145     { 6,  0,  3 },
00146     { 6,  4,  4 },
00147     { 6,  2,  5 },
00148     { 6,  5,  2 },
00149 
00150     /* 7 bit codewords */
00151     { 7,  1,  5 },
00152     { 7,  5,  1 },
00153     { 7,  5,  3 },
00154     { 7,  3,  5 },
00155     { 7,  5,  4 },
00156     { 7,  4,  5 },
00157     { 7,  6,  2 },
00158     { 7,  2,  6 },
00159     { 7,  6,  3 },
00160     { 7,  4,  0 },
00161     { 7,  6,  1 },
00162     { 7,  0,  4 },
00163     { 7,  1,  6 },
00164     { 7,  3,  6 },
00165     { 7,  5,  5 },
00166     { 7,  6,  4 },
00167 
00168     /* 7/8 bit codewords */
00169     { 7,  4,  6 }, { 7,  4,  6 },
00170     { 8,  6,  5 },
00171     { 8,  7,  2 },
00172 
00173     /* 8 bit codewords */
00174     { 8,  3,  7 },
00175     { 8,  2,  7 },
00176     { 8,  5,  6 },
00177     { 8,  8,  2 },
00178     { 8,  7,  3 },
00179     { 8,  5,  0 },
00180     { 8,  7,  1 },
00181     { 8,  0,  5 },
00182     { 8,  8,  1 },
00183     { 8,  1,  7 },
00184     { 8,  8,  3 },
00185     { 8,  7,  4 },
00186     { 8,  4,  7 },
00187     { 8,  2,  8 },
00188     { 8,  6,  6 },
00189     { 8,  7,  5 },
00190     { 8,  1,  8 },
00191     { 8,  3,  8 },
00192     { 8,  8,  4 },
00193     { 8,  4,  8 },
00194 
00195     /* 8/9 bit codewords */
00196     { 8,  5,  7 }, { 8,  5,  7 },
00197     { 8,  8,  5 }, { 8,  8,  5 },
00198     { 8,  5,  8 }, { 8,  5,  8 },
00199     { 9,  7,  6 },
00200     { 9,  6,  7 },
00201 
00202     /* 9 bit codewords */
00203     { 9,  9,  2 },
00204     { 9,  6,  0 },
00205     { 9,  6,  8 },
00206     { 9,  9,  3 },
00207     { 9,  3,  9 },
00208     { 9,  9,  1 },
00209     { 9,  2,  9 },
00210     { 9,  0,  6 },
00211     { 9,  8,  6 },
00212     { 9,  9,  4 },
00213     { 9,  4,  9 },
00214     { 9, 10,  2 },
00215     { 9,  1,  9 },
00216     { 9,  7,  7 },
00217     { 9,  8,  7 },
00218     { 9,  9,  5 },
00219     { 9,  7,  8 },
00220     { 9, 10,  3 },
00221     { 9,  5,  9 },
00222     { 9, 10,  4 },
00223     { 9,  2, 10 },
00224     { 9, 10,  1 },
00225     { 9,  3, 10 },
00226     { 9,  9,  6 },
00227 
00228     /* 9/10 bit codewords */
00229     { 9,  6,  9 }, { 9,  6,  9 },
00230     { 9,  8,  0 }, { 9,  8,  0 },
00231     { 9,  4, 10 }, { 9,  4, 10 },
00232     { 9,  7,  0 }, { 9,  7,  0 },
00233     { 9, 11,  2 }, { 9, 11,  2 },
00234     { 10,  7,  9 },
00235     { 10, 11,  3 },
00236     { 10, 10,  6 },
00237     { 10,  1, 10 },
00238     { 10, 11,  1 },
00239     { 10,  9,  7 },
00240 
00241     /* 10 bit codewords */
00242     { 10,  0,  7 },
00243     { 10,  8,  8 },
00244     { 10, 10,  5 },
00245     { 10,  3, 11 },
00246     { 10,  5, 10 },
00247     { 10,  8,  9 },
00248     { 10, 11,  5 },
00249     { 10,  0,  8 },
00250     { 10, 11,  4 },
00251     { 10,  2, 11 },
00252     { 10,  7, 10 },
00253     { 10,  6, 10 },
00254     { 10, 10,  7 },
00255     { 10,  4, 11 },
00256     { 10,  1, 11 },
00257     { 10, 12,  2 },
00258     { 10,  9,  8 },
00259     { 10, 12,  3 },
00260     { 10, 11,  6 },
00261     { 10,  5, 11 },
00262     { 10, 12,  4 },
00263     { 10, 11,  7 },
00264     { 10, 12,  5 },
00265     { 10,  3, 12 },
00266     { 10,  6, 11 },
00267     { 10,  9,  0 },
00268     { 10, 10,  8 },
00269     { 10, 10,  0 },
00270     { 10, 12,  1 },
00271     { 10,  0,  9 },
00272     { 10,  4, 12 },
00273     { 10,  9,  9 },
00274 
00275     /* 10/11/12 bit codewords */
00276     { 10, 12,  6 }, { 10, 12,  6 }, { 10, 12,  6 }, { 10, 12,  6 },
00277     { 10,  2, 12 }, { 10,  2, 12 }, { 10,  2, 12 }, { 10,  2, 12 },
00278     { 10,  8, 10 }, { 10,  8, 10 }, { 10,  8, 10 }, { 10,  8, 10 },
00279     { 11,  9, 10 }, { 11,  9, 10 },
00280     { 11,  1, 12 }, { 11,  1, 12 },
00281     { 11, 11,  8 }, { 11, 11,  8 },
00282     { 11, 12,  7 }, { 11, 12,  7 },
00283     { 11,  7, 11 }, { 11,  7, 11 },
00284     { 11,  5, 12 }, { 11,  5, 12 },
00285     { 11,  6, 12 }, { 11,  6, 12 },
00286     { 11, 10,  9 }, { 11, 10,  9 },
00287     { 11,  8, 11 }, { 11,  8, 11 },
00288     { 11, 12,  8 }, { 11, 12,  8 },
00289     { 11,  0, 10 }, { 11,  0, 10 },
00290     { 11,  7, 12 }, { 11,  7, 12 },
00291     { 11, 11,  0 }, { 11, 11,  0 },
00292     { 11, 10, 10 }, { 11, 10, 10 },
00293     { 11, 11,  9 }, { 11, 11,  9 },
00294     { 11, 11, 10 }, { 11, 11, 10 },
00295     { 11,  0, 11 }, { 11,  0, 11 },
00296     { 11, 11, 11 }, { 11, 11, 11 },
00297     { 11,  9, 11 }, { 11,  9, 11 },
00298     { 11, 10, 11 }, { 11, 10, 11 },
00299     { 11, 12,  0 }, { 11, 12,  0 },
00300     { 11,  8, 12 }, { 11,  8, 12 },
00301     { 12, 12,  9 },
00302     { 12, 10, 12 },
00303     { 12,  9, 12 },
00304     { 12, 11, 12 },
00305     { 12, 12, 11 },
00306     { 12,  0, 12 },
00307     { 12, 12, 10 },
00308     { 12, 12, 12 }
00309 };

Generated on Tue Dec 13 14:47:29 2005 for guliverkli by  doxygen 1.4.5