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

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