ac3dec.h
Go to the documentation of this file.
1 /*
2  * Common code between the AC-3 and E-AC-3 decoders
3  * Copyright (c) 2007 Bartlomiej Wolowiec <bartek.wolowiec@gmail.com>
4  *
5  * This file is part of Libav.
6  *
7  * Libav is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * Libav is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with Libav; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
50 #ifndef AVCODEC_AC3DEC_H
51 #define AVCODEC_AC3DEC_H
52 
53 #include "libavutil/float_dsp.h"
54 #include "libavutil/lfg.h"
55 #include "ac3.h"
56 #include "ac3dsp.h"
57 #include "get_bits.h"
58 #include "dsputil.h"
59 #include "fft.h"
60 #include "fmtconvert.h"
61 
62 #define AC3_OUTPUT_LFEON 8
63 
64 #define SPX_MAX_BANDS 17
65 
67 #define AC3_FRAME_BUFFER_SIZE 32768
68 
69 typedef struct AC3DecodeContext {
70  AVClass *class;
74 
77  int frame_type;
79  int frame_size;
80  int bit_rate;
82  int num_blocks;
86  int lfe_on;
90  int eac3;
91 
92 
99  int dba_syntax;
101 
102 
114 
115 
124 
130 
131 
135 
136 
139  int channels;
140  int lfe_ch;
142  int downmixed;
145 
146 
148  float dynamic_range[2];
149  float drc_scale;
150 
151 
155 
156 
160 
161 
166 
167 
182 
183 
187 
188 
193 
194 
200 
201 
205 
214 
216 
222 
228 
235 
236 #endif /* AVCODEC_AC3DEC_H */