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/lfg.h"
54 #include "ac3.h"
55 #include "ac3dsp.h"
56 #include "get_bits.h"
57 #include "dsputil.h"
58 #include "fft.h"
59 #include "fmtconvert.h"
60 
61 #define AC3_OUTPUT_LFEON 8
62 
63 #define SPX_MAX_BANDS 17
64 
66 #define AC3_FRAME_BUFFER_SIZE 32768
67 
68 typedef struct AC3DecodeContext {
69  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 
98  int dba_syntax;
100 
113 
123  int num_spx_bands;
129 
134 
138  int channels;
139  int lfe_ch;
141  int downmixed;
144 
147  float dynamic_range[2];
148  float drc_scale;
149 
154 
159 
165 
181 
186 
192 
198 
203 
214 
220 
226 
233 
234 #endif /* AVCODEC_AC3DEC_H */