FFmpeg  1.2.4
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 FFmpeg.
6  *
7  * FFmpeg 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  * FFmpeg 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 FFmpeg; 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;
89  int eac3;
90 
91 
97 
106 
107 
119 
120 
129 
135 
136 
140 
141 
144  int channels;
145  int lfe_ch;
147  int downmixed;
150 
151 
153  float dynamic_range[2];
154  float drc_scale;
155 
156 
160 
161 
165 
166 
171 
172 
187 
188 
192 
193 
198 
199 
205 
206 
210 
219 
221 
227 
233 
240 
241 #endif /* AVCODEC_AC3DEC_H */