removed most set<parameter>() functions. All parameters are now set
[swftools.git] / lib / bladeenc / tables.h
1 /*
2                         (c) Copyright 1998-2000 - Tord Jansson
3                         ======================================
4
5                 This file is part of the BladeEnc MP3 Encoder, based on
6                 ISO's reference code for MPEG Layer 3 compression, and might
7                 contain smaller or larger sections that are directly taken
8                 from ISO's reference code.
9
10                 All changes to the ISO reference code herein are either
11                 copyrighted by Tord Jansson (tord.jansson@swipnet.se)
12                 or sublicensed to Tord Jansson by a third party.
13
14         BladeEnc is free software; you can redistribute this file
15         and/or modify it under the terms of the GNU Lesser General Public
16         License as published by the Free Software Foundation; either
17         version 2.1 of the License, or (at your option) any later version.
18
19
20
21         ------------    Changes    ------------
22
23         2000-12-06  Andre Piotrowski
24
25         -       reformatted
26 */
27 #ifndef         __TABLES__
28 #define         __TABLES__
29
30
31
32
33
34 #define         NEW_L3PARM_TABLES               1
35 #define         CALC_NORM                               0
36
37
38
39
40
41 #define         CBANDS                                  63
42 #define         CBANDS_s                                42
43
44
45
46
47
48 #if NEW_L3PARM_TABLES
49
50
51         typedef         struct
52                                 {
53                                         int                                             cbmax_l;   /* number of valid entries */
54                                         int                                             numlines_l[CBANDS];
55                                         double                                  minval    [CBANDS];
56                                         double                                  qthr_l    [CBANDS];
57 #if !CALC_NORM   /* do we compute more exact values? */
58                                         double                                  norm_l    [CBANDS];
59 #endif
60                                         double                                  bval_l    [CBANDS];
61                                 }                                               l3_long_data;
62
63
64         typedef         struct
65                                 {
66                                         int                                             cbmax_s;   /* number of valid entries */
67                                         int                                             numlines_s[CBANDS_s];
68                                         double                                  qthr_s    [CBANDS_s];
69 #if !CALC_NORM   /* do we compute more exact values? */
70                                         double                                  norm_s    [CBANDS_s];
71 #endif
72                                         double                                  SNR_s     [CBANDS_s];
73                                         double                                  bval_s    [CBANDS_s];
74                                 }                                               l3_short_data;
75
76
77         typedef         struct
78                                 {
79                                         int                                             cbw_l     [CBANDS];
80                                         int                                             bu_l      [CBANDS];
81                                         int                                             bo_l      [CBANDS];
82                                         double                                  w1_l      [CBANDS];
83                                         double                                  w2_l      [CBANDS];
84                                 }                                               l3_long_thres;
85
86
87         typedef         struct
88                                 {
89                                         int                                             cbw_s     [CBANDS_s];
90                                         int                                             bu_s      [CBANDS_s];
91                                         int                                             bo_s      [CBANDS_s];
92                                         double                                  w1_s      [CBANDS_s];
93                                         double                                  w2_s      [CBANDS_s];
94                                 }                                               l3_short_thres;
95
96
97         typedef         struct
98                                 {
99                                         l3_long_data                    long_data;
100                                         l3_short_data                   short_data;
101                                         l3_long_thres                   long_thres;
102                                         l3_short_thres                  short_thres;
103                                 }                                               l3_parm_block;
104
105
106         extern          l3_parm_block                   l3_parm[3];
107
108
109 #else   /* NEW_L3PARM_TABLES */
110
111
112         typedef         struct
113                                 {
114                                 /*      int                                             no; */
115                                         int                                             lines;
116                                         double                                  minVal;
117                                         double                                  qthr;
118                                         double                                  norm;
119                                         double                                  bVal;
120                                 }                                               psyDataElem;
121
122
123         typedef         struct
124                                 {
125                                 /*      int                                             no; */
126                                         int                                             lines;
127                                         double                                  qthr;
128                                         double                                  norm;
129                                         double                                  snr;
130                                         double                                  bVal;
131                                 }                                               psyDataElem2;
132
133         typedef         struct
134                                 {
135                                         int                                             cbw;
136                                         int                                             bu;
137                                         int                                             bo;
138                                         float                                   w1;
139                                         float                                   w2;
140                                 }                                               psyDataElem3;
141
142
143         extern          psyDataElem                             psy_longBlock_48000_61[62];
144         extern          psyDataElem                             psy_longBlock_44100_62[63];
145         extern          psyDataElem                             psy_longBlock_32000_58[59];
146
147         extern          psyDataElem2                    psy_shortBlock_48000_37[38];
148         extern          psyDataElem2                    psy_shortBlock_44100_38[39];
149         extern          psyDataElem2                    psy_shortBlock_32000_41[42];
150
151         extern          psyDataElem3                    psy_data3_48000_20[21];
152         extern          psyDataElem3                    psy_data3_44100_20[21];
153         extern          psyDataElem3                    psy_data3_32000_20[21];
154
155         extern          psyDataElem3                    psy_data4_48000_11[12];
156         extern          psyDataElem3                    psy_data4_44100_11[12];
157         extern          psyDataElem3                    psy_data4_32000_11[12];
158
159
160 #endif   /* NEW_L3PARM_TABLES */
161
162
163
164
165
166 extern          double                                  enwindow[512];
167 extern          char                                    aHuffcode[1498][36];
168
169
170
171
172
173 #endif          /* __TABLES__ */