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

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