hcb_2.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_2.h,v 1.2 2005/11/01 21:41:43 gabest Exp $
00026 **/
00027 
00028 /* 2-step huffman table HCB_2 */
00029 
00030 
00031 /* 1st step: 5 bits
00032  *           2^5 = 32 entries
00033  *
00034  * Used to find offset into 2nd step table and number of extra bits to get
00035  */
00036 static hcb hcb2_1[] = {
00037     { /* 00000 */ 0, 0 },
00038     { /*       */ 0, 0 },
00039     { /*       */ 0, 0 },
00040     { /*       */ 0, 0 },
00041     { /* 00100 */ 1, 0 },
00042     { /*       */ 1, 0 },
00043     { /* 00110 */ 2, 0 },
00044     { /* 00111 */ 3, 0 },
00045     { /* 01000 */ 4, 0 },
00046     { /* 01001 */ 5, 0 },
00047     { /* 01010 */ 6, 0 },
00048     { /* 01011 */ 7, 0 },
00049     { /* 01100 */ 8, 0 },
00050 
00051     /* 6 bit codewords */
00052     { /* 01101 */ 9,  1 },
00053     { /* 01110 */ 11, 1 },
00054     { /* 01111 */ 13, 1 },
00055     { /* 10000 */ 15, 1 },
00056     { /* 10001 */ 17, 1 },
00057     { /* 10010 */ 19, 1 },
00058     { /* 10011 */ 21, 1 },
00059     { /* 10100 */ 23, 1 },
00060     { /* 10101 */ 25, 1 },
00061     { /* 10110 */ 27, 1 },
00062     { /* 10111 */ 29, 1 },
00063     { /* 11000 */ 31, 1 },
00064 
00065     /* 7 bit codewords */
00066     { /* 11001 */ 33, 2 },
00067     { /* 11010 */ 37, 2 },
00068     { /* 11011 */ 41, 2 },
00069 
00070     /* 7/8 bit codewords */
00071     { /* 11100 */ 45, 3 },
00072 
00073     /* 8 bit codewords */
00074     { /* 11101 */ 53, 3 },
00075     { /* 11110 */ 61, 3 },
00076 
00077     /* 8/9 bit codewords */
00078     { /* 11111 */ 69, 4 }
00079 };
00080 
00081 /* 2nd step table
00082  *
00083  * Gives size of codeword and actual data (x,y,v,w)
00084  */
00085 static hcb_2_quad hcb2_2[] = {
00086     /* 3 bit codeword */
00087     { 3,  0,  0,  0,  0 },
00088 
00089     /* 4 bit codeword */
00090     { 4,  1,  0,  0,  0 },
00091 
00092     /* 5 bit codewords */
00093     { 5, -1,  0,  0,  0 },
00094     { 5,  0,  0,  0,  1 },
00095     { 5,  0,  0, -1,  0 },
00096     { 5,  0,  0,  0, -1 },
00097     { 5,  0, -1,  0,  0 },
00098     { 5,  0,  0,  1,  0 },
00099     { 5,  0,  1,  0,  0 },
00100 
00101     /* 6 bit codewords */
00102     { 6,  0, -1,  1,  0 },
00103     { 6, -1,  1,  0,  0 },
00104     { 6,  0,  1, -1,  0 },
00105     { 6,  0,  0,  1, -1 },
00106     { 6,  0,  1,  0, -1 },
00107     { 6,  0,  0, -1,  1 },
00108     { 6, -1,  0,  0, -1 },
00109     { 6,  1, -1,  0,  0 },
00110     { 6,  1,  0, -1,  0 },
00111     { 6, -1, -1,  0,  0 },
00112     { 6,  0,  0, -1, -1 },
00113     { 6,  1,  0,  1,  0 },
00114     { 6,  1,  0,  0,  1 },
00115     { 6,  0, -1,  0,  1 },
00116     { 6, -1,  0,  1,  0 },
00117     { 6,  0,  1,  0,  1 },
00118     { 6,  0, -1, -1,  0 },
00119     { 6, -1,  0,  0,  1 },
00120     { 6,  0, -1,  0, -1 },
00121     { 6, -1,  0, -1,  0 },
00122     { 6,  1,  1,  0,  0 },
00123     { 6,  0,  1,  1,  0 },
00124     { 6,  0,  0,  1,  1 },
00125     { 6,  1,  0,  0, -1 },
00126 
00127     /* 7 bit codewords */
00128     { 7,  0,  1, -1,  1 },
00129     { 7,  1,  0, -1,  1 },
00130     { 7, -1,  1, -1,  0 },
00131     { 7,  0, -1,  1, -1 },
00132     { 7,  1, -1,  1,  0 },
00133     { 7,  1,  1,  0, -1 },
00134     { 7,  1,  0,  1,  1 },
00135     { 7, -1,  1,  1,  0 },
00136     { 7,  0, -1, -1,  1 },
00137     { 7,  1,  1,  1,  0 },
00138     { 7, -1,  0,  1, -1 },
00139     { 7, -1, -1, -1,  0 },
00140 
00141     /* 7/8 bit codewords */
00142     { 7, -1,  0, -1,  1 }, { 7, -1,  0, -1,  1 },
00143     { 7,  1, -1, -1,  0 }, { 7,  1, -1, -1,  0 },
00144     { 7,  1,  1, -1,  0 }, { 7,  1,  1, -1,  0 },
00145     { 8,  1, -1,  0,  1 },
00146     { 8, -1,  1,  0, -1 },
00147 
00148     /* 8 bit codewords */
00149     { 8, -1, -1,  1,  0 },
00150     { 8, -1,  0,  1,  1 },
00151     { 8, -1, -1,  0,  1 },
00152     { 8, -1, -1,  0, -1 },
00153     { 8,  0, -1, -1, -1 },
00154     { 8,  1,  0,  1, -1 },
00155     { 8,  1,  0, -1, -1 },
00156     { 8,  0,  1, -1, -1 },
00157     { 8,  0,  1,  1,  1 },
00158     { 8, -1,  1,  0,  1 },
00159     { 8, -1,  0, -1, -1 },
00160     { 8,  0,  1,  1, -1 },
00161     { 8,  1, -1,  0, -1 },
00162     { 8,  0, -1,  1,  1 },
00163     { 8,  1,  1,  0,  1 },
00164     { 8,  1, -1,  1, -1 },
00165 
00166     /* 8/9 bit codewords */
00167     { 8, -1,  1, -1,  1 }, { 8, -1,  1, -1,  1 },
00168     { 9,  1, -1, -1,  1 },
00169     { 9, -1, -1, -1, -1 },
00170     { 9, -1,  1,  1, -1 },
00171     { 9, -1,  1,  1,  1 },
00172     { 9,  1,  1,  1,  1 },
00173     { 9, -1, -1,  1, -1 },
00174     { 9,  1, -1,  1,  1 },
00175     { 9, -1,  1, -1, -1 },
00176     { 9, -1, -1,  1,  1 },
00177     { 9,  1,  1, -1, -1 },
00178     { 9,  1, -1, -1, -1 },
00179     { 9, -1, -1, -1,  1 },
00180     { 9,  1,  1, -1,  1 },
00181     { 9,  1,  1,  1, -1 }
00182 };

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