hcb_6.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_6.h,v 1.2 2005/11/01 21:41:43 gabest Exp $
00026 **/
00027 
00028 /* 2-step huffman table HCB_6 */
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 hcb6_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 
00057     /* 6 bit codewords */
00058     { /* 10010 */ 9, 1 },
00059     { /* 10011 */ 11, 1 },
00060     { /* 10100 */ 13, 1 },
00061     { /* 10101 */ 15, 1 },
00062     { /* 10110 */ 17, 1 },
00063     { /* 10111 */ 19, 1 },
00064     { /* 11000 */ 21, 1 },
00065     { /* 11001 */ 23, 1 },
00066 
00067     /* 7 bit codewords */
00068     { /* 11010 */ 25, 2 },
00069     { /* 11011 */ 29, 2 },
00070     { /* 11100 */ 33, 2 },
00071 
00072     /* 7/8 bit codewords */
00073     { /* 11101 */ 37, 3 },
00074 
00075     /* 8/9 bit codewords */
00076     { /* 11110 */ 45, 4 },
00077 
00078     /* 9/10/11 bit codewords */
00079     { /* 11111 */ 61, 6 }
00080 };
00081 
00082 /* 2nd step table
00083  *
00084  * Gives size of codeword and actual data (x,y,v,w)
00085  */
00086 static hcb_2_pair hcb6_2[] = {
00087     /* 4 bit codewords */
00088     { 4,  0,  0 },
00089     { 4,  1,  0 },
00090     { 4,  0, -1 },
00091     { 4,  0,  1 },
00092     { 4, -1,  0 },
00093     { 4,  1,  1 },
00094     { 4, -1,  1 },
00095     { 4,  1, -1 },
00096     { 4, -1, -1 },
00097 
00098     /* 6 bit codewords */
00099     { 6,  2, -1 },
00100     { 6,  2,  1 },
00101     { 6, -2,  1 },
00102     { 6, -2, -1 },
00103     { 6, -2,  0 },
00104     { 6, -1,  2 },
00105     { 6,  2,  0 },
00106     { 6,  1, -2 },
00107     { 6,  1,  2 },
00108     { 6,  0, -2 },
00109     { 6, -1, -2 },
00110     { 6,  0,  2 },
00111     { 6,  2, -2 },
00112     { 6, -2,  2 },
00113     { 6, -2, -2 },
00114     { 6,  2,  2 },
00115 
00116     /* 7 bit codewords */
00117     { 7, -3,  1 },
00118     { 7,  3,  1 },
00119     { 7,  3, -1 },
00120     { 7, -1,  3 },
00121     { 7, -3, -1 },
00122     { 7,  1,  3 },
00123     { 7,  1, -3 },
00124     { 7, -1, -3 },
00125     { 7,  3,  0 },
00126     { 7, -3,  0 },
00127     { 7,  0, -3 },
00128     { 7,  0,  3 },
00129 
00130     /* 7/8 bit codewords */
00131     { 7,  3,  2 }, { 7,  3,  2 },
00132     { 8, -3, -2 },
00133     { 8, -2,  3 },
00134     { 8,  2,  3 },
00135     { 8,  3, -2 },
00136     { 8,  2, -3 },
00137     { 8, -2, -3 },
00138 
00139     /* 8 bit codewords */
00140     { 8, -3,  2 }, { 8, -3,  2 },
00141     { 8,  3,  3 }, { 8,  3,  3 },
00142     { 9,  3, -3 },
00143     { 9, -3, -3 },
00144     { 9, -3,  3 },
00145     { 9,  1, -4 },
00146     { 9, -1, -4 },
00147     { 9,  4,  1 },
00148     { 9, -4,  1 },
00149     { 9, -4, -1 },
00150     { 9,  1,  4 },
00151     { 9,  4, -1 },
00152     { 9, -1,  4 },
00153     { 9,  0, -4 },
00154 
00155     /* 9/10/11 bit codewords */
00156     { 9, -4,  2 }, { 9, -4,  2 }, { 9, -4,  2 }, { 9, -4,  2 },
00157     { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 },
00158     { 9,  2,  4 }, { 9,  2,  4 }, { 9,  2,  4 }, { 9,  2,  4 },
00159     { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 },
00160     { 9, -4,  0 }, { 9, -4,  0 }, { 9, -4,  0 }, { 9, -4,  0 },
00161     { 9,  4,  2 }, { 9,  4,  2 }, { 9,  4,  2 }, { 9,  4,  2 },
00162     { 9,  4, -2 }, { 9,  4, -2 }, { 9,  4, -2 }, { 9,  4, -2 },
00163     { 9, -2,  4 }, { 9, -2,  4 }, { 9, -2,  4 }, { 9, -2,  4 },
00164     { 9,  4,  0 }, { 9,  4,  0 }, { 9,  4,  0 }, { 9,  4,  0 },
00165     { 9,  2, -4 }, { 9,  2, -4 }, { 9,  2, -4 }, { 9,  2, -4 },
00166     { 9,  0,  4 }, { 9,  0,  4 }, { 9,  0,  4 }, { 9,  0,  4 },
00167     { 10, -3, -4 }, { 10, -3, -4 },
00168     { 10, -3,  4 }, { 10, -3,  4 },
00169     { 10,  3, -4 }, { 10,  3, -4 },
00170     { 10,  4, -3 }, { 10,  4, -3 },
00171     { 10,  3,  4 }, { 10,  3,  4 },
00172     { 10,  4,  3 }, { 10,  4,  3 },
00173     { 10, -4,  3 }, { 10, -4,  3 },
00174     { 10, -4, -3 }, { 10, -4, -3 },
00175     { 11,  4,  4 },
00176     { 11, -4,  4 },
00177     { 11, -4, -4 },
00178     { 11,  4, -4 }
00179 };

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