Libav
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;
73 
76  int frame_type;
78  int frame_size;
79  int bit_rate;
81  int num_blocks;
85  int lfe_on;
94  int eac3;
98 
108 
121 
131  int num_spx_bands;
137 
142 
146  int channels;
147  int lfe_ch;
149  int downmixed;
152 
155  float dynamic_range[2];
156  float drc_scale;
157 
162 
167 
173 
189 
194 
200 
207 
212 
223 
229 
235 
242 
243 #endif /* AVCODEC_AC3DEC_H */