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