1 /* 2 * MPEG layer 3 tables include file 3 * 4 * Copyright (c) 1999 Albert L Faber 5 * 6 * This library is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU Library General Public 8 * License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * This library is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * Library General Public License for more details. 15 * 16 * You should have received a copy of the GNU Library General Public 17 * License along with this library; if not, write to the 18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 * Boston, MA 02111-1307, USA. 20 */ 21 22 #ifndef LAME_TABLES_H 23 #define LAME_TABLES_H 24 25 #if 0 26 typedef struct { 27 unsigned char no; 28 unsigned char width; 29 unsigned char minval_2; 30 float quiet_thr; 31 float norm; 32 float bark; 33 } type1_t; 34 35 typedef struct { 36 unsigned char no; 37 unsigned char width; 38 float quiet_thr; 39 float norm; 40 float SNR; 41 float bark; 42 } type2_t; 43 44 typedef struct { 45 unsigned int no:5; 46 unsigned int cbw:3; 47 unsigned int bu:6; 48 unsigned int bo:6; 49 unsigned int w1_576:10; 50 unsigned int w2_576:10; 51 } type34_t; 52 53 typedef struct { 54 size_t len1; 55 const type1_t *const tab1; 56 size_t len2; 57 const type2_t *const tab2; 58 size_t len3; 59 const type34_t *const tab3; 60 size_t len4; 61 const type34_t *const tab4; 62 } type5_t; 63 64 extern const type5_t table5[6]; 65 66 #endif 67 68 #define HTN 34 69 70 struct huffcodetab { 71 const unsigned int xlen; /* max. x-index+ */ 72 const unsigned int linmax; /* max number to be stored in linbits */ 73 const uint16_t *table; /* pointer to array[xlen][ylen] */ 74 const uint8_t *hlen; /* pointer to array[xlen][ylen] */ 75 }; 76 77 extern const struct huffcodetab ht[HTN]; 78 /* global memory block */ 79 /* array of all huffcodtable headers */ 80 /* 0..31 Huffman code table 0..31 */ 81 /* 32,33 count1-tables */ 82 83 extern const uint8_t t32l[]; 84 extern const uint8_t t33l[]; 85 86 extern const uint32_t largetbl[16 * 16]; 87 extern const uint32_t table23[3 * 3]; 88 extern const uint32_t table56[4 * 4]; 89 90 extern const int scfsi_band[5]; 91 92 extern const int bitrate_table [3][16]; 93 extern const int samplerate_table [3][ 4]; 94 95 #endif /* LAME_TABLES_H */ 96