Version 0.94.1 of the bladeenc mp3 encoder
[swftools.git] / lib / bladeenc / l3side.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-04  Andre Piotrowski
24
25         -       reformatted, slimmed
26 */
27
28
29
30 /**********************************************************************
31  * ISO MPEG Audio Subgroup Software Simulation Group (1996)
32  * ISO 13818-3 MPEG-2 Audio Encoder - Lower Sampling Frequency Extension
33  *
34  * $Id: l3side.h,v 1.1 2002/01/10 17:30:00 kramm Exp $
35  *
36  * $Log: l3side.h,v $
37  * Revision 1.1  2002/01/10 17:30:00  kramm
38  * Version 0.94.1 of the bladeenc mp3 encoder
39  *
40  * Revision 1.1  1996/02/14 04:04:23  rowlands
41  * Initial revision
42  *
43  * Received from Mike Coleman
44  **********************************************************************/
45 /**********************************************************************
46  *   date   programmers                comment                        *
47  * 25. 6.92  Toshiyuki Ishino          Ver 1.0                        *
48  * 29.10.92  Masahiro Iwadare          Ver 2.0                        *
49  * 17. 4.93  Masahiro Iwadare          Updated for IS Modification    *
50  *                                                                    *
51  *********************************************************************/
52
53 #ifndef         __L3SIDE__
54 #define         __L3SIDE__
55
56
57
58
59
60 /* #define CBLIMIT_SHORT 12 */
61
62
63
64
65
66 /*      void                                    l3deco (void); */
67
68
69
70
71
72 /* Layer III side information. */
73
74 /*      typedef         double                                  D576[576]; */
75 /*      typedef         int                                             I576[576]; */
76 /*      typedef         double                                  D192_3[192][3]; */
77 /*      typedef         int                                             I192_3[192][3]; */
78 /*      typedef         char                                    C192_3[192][3]; */
79
80
81
82 /*      typedef         struct
83                                 {
84                                         unsigned                                cbl_max;
85                                         unsigned                                cbs_start;
86                                 }                                               III_cb_info; */
87
88 typedef         struct
89                         {
90                                 double                                  l[2][2][21];
91                                 double                                  s[2][2][12][3];
92                         }                                               III_psy_ratio;
93
94 /*      typedef         struct
95                                 {
96                                         double                                  l[2][2][21];
97                                         double                                  s[2][2][12][3];
98                                 }                                               III_psy_xmin;*/
99
100 /*      typedef         struct
101                                 {
102                                         double                                  xr[576];
103                                         double                                  xr_s[3][192];
104                                         double                                  xmin[21];
105                                         double                                  xmin_s[3][192];
106                                         int                                             ix[576];
107                                         int                                             ix_s[3][192];
108                                 }                                               III_input3;*/ /* ch */
109
110 typedef         struct
111                         {
112                                 unsigned                                part2_3_length;
113                                 unsigned                                big_values;
114                                 unsigned                                count1;
115                                 unsigned                                global_gain;
116                                 unsigned                                scalefac_compress;
117                                 unsigned                                window_switching_flag;
118                                 unsigned                                block_type;
119                                 unsigned                                mixed_block_flag;
120                                 unsigned                                table_select[3];
121                                 int /*  unsigned */             subblock_gain[3];
122                                 unsigned                                region0_count;
123                                 unsigned                                region1_count;
124                                 unsigned                                preflag;
125                                 unsigned                                scalefac_scale;
126                                 unsigned                                count1table_select;
127                                 unsigned                                part2_length;
128                                 unsigned                                sfb_lmax;
129                                 unsigned                                sfb_smax;
130                                 unsigned                                address1;
131                                 unsigned                                address2;
132                                 unsigned                                address3;
133                                 double                                  quantizerStepSize;
134                                 /* added for LSF */
135                                 unsigned                                *sfb_partition_table;
136                                 unsigned                                slen[4];
137                         }                                               gr_info;
138
139 typedef         struct
140                         {
141                                 int                                             main_data_begin; /* unsigned -> int */
142                                 unsigned                                private_bits;
143                                 int                                             resvDrain;
144                                 unsigned                                scfsi[2][4];
145                                 struct
146                                 {
147                                         struct gr_info_s
148                                         {
149                                                 gr_info                                 tt;
150                                         }                                               ch[2];
151                                 }                                               gr[2];
152                         } III_side_info_t;
153
154
155
156
157
158 /* Layer III scale factors. */
159
160 typedef         struct
161                         {
162                                 int                                             l[2][2][22];      /*         [cb] */
163                                 int                                             s[2][2][13][3];   /* [window][cb] */
164                         }                                               III_scalefac_t;   /* [gr][ch] */
165
166
167
168
169
170 #endif          /* __L3SIDE__ */