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

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