50#ifndef AVCODEC_AC3DEC_H
51#define AVCODEC_AC3DEC_H
65#define AC3_OUTPUT_LFEON 8
67#define SPX_MAX_BANDS 17
70#define AC3_FRAME_BUFFER_SIZE 32768
72typedef struct AC3DecodeContext {
74 AVCodecContext *avctx;
80 AVFixedDSPContext *fdsp;
82 AVFloatDSPContext *fdsp;
87 AVTXContext *tx_128, *tx_256;
93 AVChannelLayout downmix_layout;
112 int dialog_normalization[2];
113 int compression_exists[2];
115 int preferred_downmix;
116 int center_mix_level;
117 int center_mix_level_ltrt;
118 int surround_mix_level;
119 int surround_mix_level_ltrt;
120 int lfe_mix_level_exists;
123 int eac3_subsbtreamid_found;
124 int eac3_extension_type_a;
125 int dolby_surround_mode;
126 int dolby_surround_ex_mode;
127 int dolby_headphone_mode;
130 int preferred_stereo_downmix;
131 float ltrt_center_mix_level;
132 float ltrt_surround_mix_level;
133 float loro_center_mix_level;
134 float loro_surround_mix_level;
139 int snr_offset_strategy;
140 int block_switch_syntax;
141 int dither_flag_syntax;
142 int bit_allocation_syntax;
143 int fast_gain_syntax;
152 int phase_flags_in_use;
167 int spx_src_start_freq;
168 int spx_dst_end_freq;
169 int spx_dst_start_freq;
172 uint8_t spx_band_struct[SPX_MAX_BANDS];
173 uint8_t spx_band_sizes[SPX_MAX_BANDS];
190 int prev_output_mode;
198 int heavy_compression;
208 int consistent_noise_generation;
212 int num_rematrixing_bands;
213 int rematrixing_flags[4];
223 AC3BitAllocParameters bit_alloc_params;
254 int delay_coeff_bits[2];
Common code between the AC-3 encoder and decoder.
#define EAC3_MAX_CHANNELS
maximum number of channels in EAC3
#define AC3_MAX_CHANNELS
maximum number of channels, including coupling channel
#define AC3_CRITICAL_BANDS
#define AC3_MAX_CPL_BANDS
static const uint8_t channel_map[8][8]
Libavcodec external API header.
static void ff_eac3_decode_transform_coeffs_aht_ch(AC3DecodeContext *s, int ch)
static int ff_eac3_parse_header(AC3DecodeContext *s, const AC3HeaderInfo *hdr)
static void ff_eac3_apply_spectral_extension(AC3DecodeContext *s)
static SDL_Window * window
static const uint8_t frame_size[4]
bitstream reader API header.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding.
float ff_ac3_heavy_dynamic_range_tab[256]
static const uint16_t mask[17]
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.