1159b3361Sopenharmony_ci/*
2159b3361Sopenharmony_ci *	MPEG layer 3 tables include file
3159b3361Sopenharmony_ci *
4159b3361Sopenharmony_ci *	Copyright (c) 1999 Albert L Faber
5159b3361Sopenharmony_ci *
6159b3361Sopenharmony_ci * This library is free software; you can redistribute it and/or
7159b3361Sopenharmony_ci * modify it under the terms of the GNU Library General Public
8159b3361Sopenharmony_ci * License as published by the Free Software Foundation; either
9159b3361Sopenharmony_ci * version 2 of the License, or (at your option) any later version.
10159b3361Sopenharmony_ci *
11159b3361Sopenharmony_ci * This library is distributed in the hope that it will be useful,
12159b3361Sopenharmony_ci * but WITHOUT ANY WARRANTY; without even the implied warranty of
13159b3361Sopenharmony_ci * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
14159b3361Sopenharmony_ci * Library General Public License for more details.
15159b3361Sopenharmony_ci *
16159b3361Sopenharmony_ci * You should have received a copy of the GNU Library General Public
17159b3361Sopenharmony_ci * License along with this library; if not, write to the
18159b3361Sopenharmony_ci * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19159b3361Sopenharmony_ci * Boston, MA 02111-1307, USA.
20159b3361Sopenharmony_ci */
21159b3361Sopenharmony_ci
22159b3361Sopenharmony_ci#ifndef LAME_TABLES_H
23159b3361Sopenharmony_ci#define LAME_TABLES_H
24159b3361Sopenharmony_ci
25159b3361Sopenharmony_ci#if 0
26159b3361Sopenharmony_citypedef struct {
27159b3361Sopenharmony_ci    unsigned char no;
28159b3361Sopenharmony_ci    unsigned char width;
29159b3361Sopenharmony_ci    unsigned char minval_2;
30159b3361Sopenharmony_ci    float   quiet_thr;
31159b3361Sopenharmony_ci    float   norm;
32159b3361Sopenharmony_ci    float   bark;
33159b3361Sopenharmony_ci} type1_t;
34159b3361Sopenharmony_ci
35159b3361Sopenharmony_citypedef struct {
36159b3361Sopenharmony_ci    unsigned char no;
37159b3361Sopenharmony_ci    unsigned char width;
38159b3361Sopenharmony_ci    float   quiet_thr;
39159b3361Sopenharmony_ci    float   norm;
40159b3361Sopenharmony_ci    float   SNR;
41159b3361Sopenharmony_ci    float   bark;
42159b3361Sopenharmony_ci} type2_t;
43159b3361Sopenharmony_ci
44159b3361Sopenharmony_citypedef struct {
45159b3361Sopenharmony_ci    unsigned int no:5;
46159b3361Sopenharmony_ci    unsigned int cbw:3;
47159b3361Sopenharmony_ci    unsigned int bu:6;
48159b3361Sopenharmony_ci    unsigned int bo:6;
49159b3361Sopenharmony_ci    unsigned int w1_576:10;
50159b3361Sopenharmony_ci    unsigned int w2_576:10;
51159b3361Sopenharmony_ci} type34_t;
52159b3361Sopenharmony_ci
53159b3361Sopenharmony_citypedef struct {
54159b3361Sopenharmony_ci    size_t  len1;
55159b3361Sopenharmony_ci    const type1_t *const tab1;
56159b3361Sopenharmony_ci    size_t  len2;
57159b3361Sopenharmony_ci    const type2_t *const tab2;
58159b3361Sopenharmony_ci    size_t  len3;
59159b3361Sopenharmony_ci    const type34_t *const tab3;
60159b3361Sopenharmony_ci    size_t  len4;
61159b3361Sopenharmony_ci    const type34_t *const tab4;
62159b3361Sopenharmony_ci} type5_t;
63159b3361Sopenharmony_ci
64159b3361Sopenharmony_ciextern const type5_t table5[6];
65159b3361Sopenharmony_ci
66159b3361Sopenharmony_ci#endif
67159b3361Sopenharmony_ci
68159b3361Sopenharmony_ci#define HTN	34
69159b3361Sopenharmony_ci
70159b3361Sopenharmony_cistruct huffcodetab {
71159b3361Sopenharmony_ci    const unsigned int xlen;          /* max. x-index+   */
72159b3361Sopenharmony_ci    const unsigned int linmax;        /* max number to be stored in linbits */
73159b3361Sopenharmony_ci    const uint16_t *table;      /* pointer to array[xlen][ylen]  */
74159b3361Sopenharmony_ci    const uint8_t *hlen;        /* pointer to array[xlen][ylen]  */
75159b3361Sopenharmony_ci};
76159b3361Sopenharmony_ci
77159b3361Sopenharmony_ciextern const struct huffcodetab ht[HTN];
78159b3361Sopenharmony_ci    /* global memory block   */
79159b3361Sopenharmony_ci    /* array of all huffcodtable headers */
80159b3361Sopenharmony_ci    /* 0..31 Huffman code table 0..31  */
81159b3361Sopenharmony_ci    /* 32,33 count1-tables   */
82159b3361Sopenharmony_ci
83159b3361Sopenharmony_ciextern const uint8_t t32l[];
84159b3361Sopenharmony_ciextern const uint8_t t33l[];
85159b3361Sopenharmony_ci
86159b3361Sopenharmony_ciextern const uint32_t largetbl[16 * 16];
87159b3361Sopenharmony_ciextern const uint32_t table23[3 * 3];
88159b3361Sopenharmony_ciextern const uint32_t table56[4 * 4];
89159b3361Sopenharmony_ci
90159b3361Sopenharmony_ciextern const int scfsi_band[5];
91159b3361Sopenharmony_ci
92159b3361Sopenharmony_ciextern const int bitrate_table    [3][16];
93159b3361Sopenharmony_ciextern const int samplerate_table [3][ 4];
94159b3361Sopenharmony_ci
95159b3361Sopenharmony_ci#endif /* LAME_TABLES_H */
96