FFmpeg
Loading...
Searching...
No Matches
aacdec.h
Go to the documentation of this file.
1/*
2 * AAC decoder definitions and structures
3 * Copyright (c) 2005-2006 Oded Shimon ( ods15 ods15 dyndns org )
4 * Copyright (c) 2006-2007 Maxim Gavrilov ( maxim.gavrilov gmail com )
5 *
6 * This file is part of FFmpeg.
7 *
8 * FFmpeg is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * FFmpeg is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with FFmpeg; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23/**
24 * @file
25 * AAC decoder definitions and structures
26 * @author Oded Shimon ( ods15 ods15 dyndns org )
27 * @author Maxim Gavrilov ( maxim.gavrilov gmail com )
28 */
29
30#ifndef AVCODEC_AAC_AACDEC_H
31#define AVCODEC_AAC_AACDEC_H
32
33#include <stdint.h>
34
36#include "libavutil/float_dsp.h"
37#include "libavutil/fixed_dsp.h"
39#include "libavutil/tx.h"
40
41#include "libavcodec/aac.h"
42#include "libavcodec/avcodec.h"
44
45#include "aacdec_ac.h"
46#include "aacdec_usac_mps212.h"
47
48typedef struct AACDecContext AACDecContext;
49
50/**
51 * Output configuration status
52 */
54 OC_NONE, ///< Output unconfigured
55 OC_TRIAL_PCE, ///< Output configuration under trial specified by an inband PCE
56 OC_TRIAL_FRAME, ///< Output configuration under trial specified by a frame header
57 OC_GLOBAL_HDR, ///< Output configuration set in a global header but not yet locked
58 OC_LOCKED, ///< Output configuration locked in place
59};
60
65
66/**
67 * The point during decoding at which channel coupling is applied.
68 */
74
81
87
95
100
106
107// Supposed to be equal to AAC_RENAME() in case of USE_FIXED.
108#define RENAME_FIXED(name) name ## _fixed
109
110#define INTFLOAT_UNION(name, elems) \
111 union { \
112 int RENAME_FIXED(name) elems; \
113 float name elems; \
114 }
115
116#define INTFLOAT_ALIGNED_UNION(alignment, name, nb_elems) \
117 union { \
118 DECLARE_ALIGNED(alignment, int, RENAME_FIXED(name))[nb_elems]; \
119 DECLARE_ALIGNED(alignment, float, name)[nb_elems]; \
120 }
121/**
122 * Long Term Prediction
123 */
130
131/* Per channel core mode */
132typedef struct AACUsacElemData {
133 uint8_t core_mode;
136
137 /* Timewarping ratio */
138#define NUM_TW_NODES 16
140
141 struct {
142 uint8_t acelp_core_mode : 3;
143 uint8_t lpd_mode : 5;
144
145 uint8_t bpf_control_info : 1;
146 uint8_t core_mode_last : 1;
147 uint8_t fac_data_present : 1;
148
151
152 struct {
153 unsigned int seed;
154 uint8_t level : 3;
155 uint8_t offset : 5;
157
158 struct {
159 uint8_t gain;
160 uint32_t kv[8 /* (1024 / 16) / 8 */][8];
162
165
166/**
167 * Individual Channel Stream
168 */
170 uint8_t max_sfb; ///< number of scalefactor bands per group
172 uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window.
174 int prev_num_window_groups; ///< Previous frame's number of window groups
175 uint8_t group_len[8];
177 const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window
178 int num_swb; ///< number of scalefactor window bands
184 uint8_t prediction_used[41];
185 uint8_t window_clipping[8]; ///< set if a certain window is near clipping
187
188/**
189 * Temporal Noise Shaping
190 */
191typedef struct TemporalNoiseShaping {
193 int n_filt[8];
194 int length[8][4];
195 int direction[8][4];
196 int order[8][4];
199
200/**
201 * coupling parameters
202 */
203typedef struct ChannelCoupling {
204 enum CouplingPoint coupling_point; ///< The point during decoding at which coupling is applied.
205 int num_coupled; ///< number of target elements
206 enum RawDataBlockType type[8]; ///< Type of channel element to be coupled - SCE or CPE.
207 int id_select[8]; ///< element id
208 int ch_select[8]; /**< [0] shared list of gains; [1] list of gains for right channel;
209 * [2] list of gains for left channel; [3] lists of gains for both channels
210 */
211 INTFLOAT_UNION(gain, [16][120]);
213
214/**
215 * Single Channel Element - used for both SCE and LFE elements.
216 */
217typedef struct SingleChannelElement {
219 AACUsacElemData ue; ///< USAC element data
221 enum BandType band_type[128]; ///< band types
222 int sfo[128]; ///< scalefactor offsets
223 INTFLOAT_UNION(sf, [128]); ///< scalefactors (8 windows * 16 sfb max)
224 INTFLOAT_ALIGNED_UNION(32, coeffs, 1024); ///< coefficients for IMDCT, maybe processed
225 INTFLOAT_ALIGNED_UNION(32, prev_coeffs, 1024); ///< unscaled previous contents of coeffs[] for USAC
226 INTFLOAT_ALIGNED_UNION(32, saved, 1536); ///< overlap
227 INTFLOAT_ALIGNED_UNION(32, ret_buf, 2048); ///< PCM output buffer
228 INTFLOAT_ALIGNED_UNION(16, ltp_state, 3072); ///< time signal for LTP
229 union {
230 struct PredictorStateFixed *RENAME_FIXED(predictor_state);
232 };
233 union {
234 float *output; ///< PCM output
235 int *RENAME_FIXED(output); ///< PCM output
236 };
238
265
266typedef struct AACUsacStereo {
268 uint8_t common_tw;
269 uint8_t tns_on_lr; ///< Apply TNS before M/S and stereo prediction
270
272 uint8_t config_idx;
273
274 /* Complex prediction */
276 uint8_t pred_dir;
278
279 uint8_t pred_used[128];
280
282
283 INTFLOAT_ALIGNED_UNION(32, alpha_q_re, 1024);
284 INTFLOAT_ALIGNED_UNION(32, alpha_q_im, 1024);
285 INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_re, 1024);
286 INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_im, 1024);
287
288 INTFLOAT_ALIGNED_UNION(32, dmix_re, 1024);
289 INTFLOAT_ALIGNED_UNION(32, prev_dmix_re, 1024); /* Recalculated on every frame */
290 INTFLOAT_ALIGNED_UNION(32, dmix_im, 1024); /* Final prediction data */
292
293/**
294 * channel element - generic struct for SCE/CPE/CCE/LFE
295 */
296typedef struct ChannelElement {
298 // CPE specific
299 uint8_t max_sfb_ste; ///< (USAC) Maximum of both max_sfb values
300 uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band
301 // shared
303 // CCE specific
305 // USAC stereo coupling data
308
309typedef struct AACUSACLoudnessInfo {
310 uint8_t drc_set_id : 6;
311 uint8_t eq_set_id : 6; /* loudnessInfoV1() only, 0 otherwise */
312 uint8_t downmix_id : 7;
313 struct {
314 uint16_t lvl : 12;
315 uint8_t present : 1;
317
318 struct {
319 uint16_t lvl : 12;
320 uint8_t measurement : 4;
321 uint8_t reliability : 2;
322 uint8_t present : 1;
324
325 uint8_t nb_measurements : 4;
326 struct {
327 uint8_t method_def : 4;
328 uint8_t method_val;
329 uint8_t measurement : 4;
330 uint8_t reliability : 2;
333
334typedef struct AACUsacElemConfig {
336
337 uint8_t tw_mdct : 1;
338 uint8_t noise_fill : 1;
339
341
342 struct {
343 int ratio;
344
345 uint8_t harmonic_sbr : 1; /* harmonicSBR */
346 uint8_t bs_intertes : 1; /* bs_interTes */
347 uint8_t bs_pvc : 1; /* bs_pvc */
348
349 struct {
350 uint8_t start_freq; /* dflt_start_freq */
351 uint8_t stop_freq; /* dflt_stop_freq */
352
353 uint8_t freq_scale; /* dflt_freq_scale */
354 uint8_t alter_scale : 1; /* dflt_alter_scale */
355 uint8_t noise_bands; /* dflt_noise_bands */
356
357 uint8_t limiter_bands; /* dflt_limiter_bands */
358 uint8_t limiter_gains; /* dflt_limiter_gains */
359 uint8_t interpol_freq : 1; /* dflt_interpol_freq */
360 uint8_t smoothing_mode : 1; /* dflt_smoothing_mode */
363
364 struct {
365 uint8_t freq_res; /* bsFreqRes */
366 uint8_t fixed_gain; /* bsFixedGainDMX */
367 uint8_t temp_shape_config; /* bsTempShapeConfig */
368 uint8_t decorr_config; /* bsDecorrConfig */
369 uint8_t high_rate_mode : 1; /* bsHighRateMode */
370 uint8_t phase_coding : 1; /* bsPhaseCoding */
371
372 uint8_t otts_bands_phase_present; /* bsOttBandsPhasePresent */
373 uint8_t otts_bands_phase; /* bsOttBandsPhase */
374 uint8_t residual_coding; /* bsResidualCoding */
375 uint8_t residual_bands; /* bsResidualBands */
376 uint8_t pseudo_lr : 1; /* bsPseudoLr */
377 uint8_t env_quant_mode : 1; /* bsEnvQuantMode */
379
380 struct {
383 uint32_t default_len;
385 uint8_t *pl_buf;
387
388 struct {
389 struct {
390 int lower;
391 int upper;
395
396typedef struct AACUSACConfig {
397 uint8_t core_sbr_frame_len_idx; /* coreSbrFrameLengthIndex */
400
403
404 struct {
405 uint8_t nb_album;
407 uint8_t nb_info;
409
410 /**
411 * Raw bsMethodValue (μ) of the program/anchor-loudness measurement
412 * selected for normalization at config time. -1 == none found.
413 * L_LKFS = -57.75 + 0.25 * input_method_val.
414 */
418
427
428/**
429 * Dynamic Range Control - decoded from the bitstream but not processed further.
430 */
431typedef struct DynamicRangeControl {
432 int pce_instance_tag; ///< Indicates with which program the DRC info is associated.
433 int dyn_rng_sgn[17]; ///< DRC sign information; 0 - positive, 1 - negative
434 int dyn_rng_ctl[17]; ///< DRC magnitude information
435 int exclude_mask[MAX_CHANNELS]; ///< Channels to be excluded from DRC processing.
436 int band_incr; ///< Number of DRC bands greater than 1 having DRC info.
437 int interpolation_scheme; ///< Indicates the interpolation scheme used in the SBR QMF domain.
438 int band_top[17]; ///< Indicates the top of the i-th DRC band in units of 4 spectral lines.
439 int prog_ref_level; /**< A reference level for the long-term program audio level for all
440 * channels combined.
441 */
443
444/**
445 * Decode-specific primitives
446 */
447typedef struct AACDecProc {
449 GetBitContext *gb,
450 const Pulse *pulse,
452
454
455 int (*sbr_ctx_alloc_init)(AACDecContext *ac, ChannelElement **che, int id_aac);
457 GetBitContext *gb, int crc, int cnt, int id_aac, int fl960);
458 void (*sbr_apply)(AACDecContext *ac, ChannelElement *che, int id_aac, int fl960,
459 void /* INTFLOAT */ *L, void /* INTFLOAT */ *R);
461} AACDecProc;
462
463/**
464 * DSP-specific primitives
465 */
496
497/**
498 * main AAC decoding context
499 */
501 const struct AVClass *class;
503
506
507 struct AVFrame *frame;
508
509 int is_saved; ///< Set if elements have stored overlap from previous frame.
511
512 /**
513 * @name Channel element related data
514 * @{
515 */
520 /** @} */
521
522 /**
523 * @name temporary aligned temporary buffers
524 * (We do not want to have these on the stack.)
525 * @{
526 */
527 INTFLOAT_ALIGNED_UNION(32, buf_mdct, 1024);
529 /** @} */
530
531 /**
532 * @name Computed / set up during initialization
533 * @{
534 */
544
554 union {
557 };
559 /** @} */
560
561 /**
562 * @name Members used for output
563 * @{
564 */
565 SingleChannelElement *output_element[MAX_CHANNELS]; ///< Points to each SingleChannelElement
566 /** @} */
567
568
569 /**
570 * @name Japanese DTV specific extension
571 * @{
572 */
573 int force_dmono_mode;///< 0->not dmono, 1->use first channel, 2->use second channel
574 int dmono_mode; ///< 0->not dmono, 1->use first channel, 2->use second channel
575 /** @} */
576
578
579 /**
580 * Target output loudness in dBFS, used for xHE-AAC loudness normalization
581 * based on the parsed loudnessInfoSet() metadata. 0 disables normalization.
582 */
585
591
593};
594
595#if defined(USE_FIXED) && USE_FIXED
596#define fdsp RENAME_FIXED(fdsp)
597#endif
598
602
604 GetBitContext *gb, int common_window, int scale_flag);
605
607 GetBitContext *gb, const IndividualChannelStream *ics);
608
610 uint8_t (*layout_map)[3],
611 int *tags,
612 int channel_config);
613
615 uint8_t layout_map[MAX_ELEM_ID * 4][3], int tags,
616 enum OCStatus oc_type, int get_new_frame);
617
618ChannelElement *ff_aac_get_che(AACDecContext *ac, int type, int elem_id);
619
620#endif /* AVCODEC_AAC_AACDEC_H */
AAC definitions and structures.
WindowSequence
Definition aac.h:63
BandType
Definition aac.h:70
RawDataBlockType
Definition aac.h:43
#define MAX_LTP_LONG_SFB
Definition aac.h:37
#define TNS_MAX_ORDER
Definition aac.h:36
#define MAX_CHANNELS
Definition aac.h:33
#define MPS_MAX_TIME_SLOTS
Definition aac.h:41
#define MPS_MAX_PARAM_SETS
Definition aac.h:39
#define MPS_MAX_PARAM_BANDS
Definition aac.h:40
#define MAX_ELEM_ID
Definition aac.h:34
AACOutputChannelOrder
Definition aacdec.h:61
@ CHANNEL_ORDER_DEFAULT
Definition aacdec.h:62
@ CHANNEL_ORDER_CODED
Definition aacdec.h:63
int ff_aac_output_configure(AACDecContext *ac, uint8_t layout_map[MAX_ELEM_ID *4][3], int tags, enum OCStatus oc_type, int get_new_frame)
Configure output channel order based on the current program configuration element.
Definition aacdec.c:487
#define NUM_TW_NODES
Definition aacdec.h:138
CouplingPoint
The point during decoding at which channel coupling is applied.
Definition aacdec.h:69
@ BETWEEN_TNS_AND_IMDCT
Definition aacdec.h:71
@ AFTER_IMDCT
Definition aacdec.h:72
@ BEFORE_TNS
Definition aacdec.h:70
int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag)
Decode an individual_channel_stream payload; reference: table 4.44.
Definition aacdec.c:1785
ChannelElement * ff_aac_get_che(AACDecContext *ac, int type, int elem_id)
Definition aacdec.c:623
#define RENAME_FIXED(name)
Definition aacdec.h:108
AACUsacExtension
Definition aacdec.h:88
@ ID_EXT_ELE_AUDIOPREROLL
Definition aacdec.h:92
@ ID_EXT_ELE_SAOC
Definition aacdec.h:91
@ ID_EXT_ELE_UNI_DRC
Definition aacdec.h:93
@ ID_EXT_ELE_MPEGS
Definition aacdec.h:90
@ ID_EXT_ELE_FILL
Definition aacdec.h:89
int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics)
Decode Temporal Noise Shaping data; reference: table 4.48.
Definition aacdec.c:1678
AACUSACDRCExt
Definition aacdec.h:101
@ UNIDRCCONFEXT_V1
Definition aacdec.h:104
@ UNIDRCCONFEXT_TERM
Definition aacdec.h:102
@ UNIDRCCONFEXT_PARAM_DRC
Definition aacdec.h:103
AACUsacElem
Definition aacdec.h:75
@ ID_USAC_EXT
Definition aacdec.h:79
@ ID_USAC_CPE
Definition aacdec.h:77
@ ID_USAC_SCE
Definition aacdec.h:76
@ ID_USAC_LFE
Definition aacdec.h:78
int ff_aac_set_default_channel_config(AACDecContext *ac, AVCodecContext *avctx, uint8_t(*layout_map)[3], int *tags, int channel_config)
Set up channel positions based on a default channel configuration as specified in table 1....
Definition aacdec.c:583
AACUSACLoudnessExt
Definition aacdec.h:96
@ UNIDRCLOUDEXT_TERM
Definition aacdec.h:97
@ UNIDRCLOUDEXT_EQ
Definition aacdec.h:98
int ff_aac_decode_init_fixed(AVCodecContext *avctx)
Dequantization-related.
int ff_aac_decode_init_float(AVCodecContext *avctx)
ExtensionHeaderType
Definition aacdec.h:82
@ ID_CONFIG_EXT_LOUDNESS_INFO
Definition aacdec.h:84
@ ID_CONFIG_EXT_STREAM_ID
Definition aacdec.h:85
@ ID_CONFIG_EXT_FILL
Definition aacdec.h:83
int ff_aac_decode_init(AVCodecContext *avctx)
Definition aacdec.c:1298
OCStatus
Output configuration status.
Definition aacdec.h:53
@ OC_TRIAL_FRAME
Output configuration under trial specified by a frame header.
Definition aacdec.h:56
@ OC_TRIAL_PCE
Output configuration under trial specified by an inband PCE.
Definition aacdec.h:55
@ OC_LOCKED
Output configuration locked in place.
Definition aacdec.h:58
@ OC_GLOBAL_HDR
Output configuration set in a global header but not yet locked.
Definition aacdec.h:57
@ OC_NONE
Output unconfigured.
Definition aacdec.h:54
@ MPS_ELE_NB
#define L(x)
Definition vpx_arith.h:36
Libavcodec external API header.
Public libavutil channel layout APIs header.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
int index
Definition gxfenc.c:90
#define R
Definition huffyuv.h:44
cl_device_type type
static int noise(AVBSFContext *ctx, AVPacket *pkt)
Definition noise.c:124
main AAC decoding context
Definition aacdec.h:500
AACDecProc proc
Definition aacdec.h:505
AVTXContext * mdct96
Definition aacdec.h:535
av_tx_fn mdct960_fn
Definition aacdec.h:551
av_tx_fn mdct768_fn
Definition aacdec.h:550
av_tx_fn mdct128_fn
Definition aacdec.h:547
int random_state
Definition aacdec.h:558
AACDecDSP dsp
Definition aacdec.h:504
av_tx_fn mdct1024_fn
Definition aacdec.h:552
int tags_mapped
Definition aacdec.h:518
av_tx_fn mdct480_fn
Definition aacdec.h:548
AVTXContext * mdct128
Definition aacdec.h:537
AVFloatDSPContext * fdsp
Definition aacdec.h:556
int target_level
Target output loudness in dBFS, used for xHE-AAC loudness normalization based on the parsed loudnessI...
Definition aacdec.h:583
int warned_loudness_missing
Definition aacdec.h:584
struct AVCodecContext * avctx
Definition aacdec.h:502
AVTXContext * mdct960
Definition aacdec.h:541
AVTXContext * mdct768
Definition aacdec.h:540
AVTXContext * mdct480
Definition aacdec.h:538
av_tx_fn mdct120_fn
Definition aacdec.h:546
AVTXContext * mdct512
Definition aacdec.h:539
ChannelElement * che[4][MAX_ELEM_ID]
Definition aacdec.h:516
int warned_he_aac_mono
Definition aacdec.h:590
ChannelElement * tag_che_map[4][MAX_ELEM_ID]
Definition aacdec.h:517
int warned_remapping_once
Definition aacdec.h:519
DynamicRangeControl che_drc
Definition aacdec.h:510
enum AACOutputChannelOrder output_channel_order
Definition aacdec.h:577
unsigned warned_71_wide
Definition aacdec.h:588
int is_saved
Set if elements have stored overlap from previous frame.
Definition aacdec.h:509
INTFLOAT_ALIGNED_UNION(32, buf_mdct, 1024)
av_tx_fn mdct96_fn
Definition aacdec.h:545
AVTXContext * mdct1024
Definition aacdec.h:542
int warned_num_aac_frames
Definition aacdec.h:587
struct AVFrame * frame
Definition aacdec.h:507
int dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
Definition aacdec.h:574
SingleChannelElement * output_element[MAX_CHANNELS]
Points to each SingleChannelElement.
Definition aacdec.h:565
av_tx_fn mdct512_fn
Definition aacdec.h:549
INTFLOAT_ALIGNED_UNION(32, temp, 128)
OutputConfiguration oc[2]
Definition aacdec.h:586
int warned_gain_control
Definition aacdec.h:589
int force_dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
Definition aacdec.h:573
AVTXContext * mdct_ltp
Definition aacdec.h:543
av_tx_fn mdct_ltp_fn
Definition aacdec.h:553
AVTXContext * mdct120
Definition aacdec.h:536
DSP-specific primitives.
Definition aacdec.h:466
void(* apply_intensity_stereo)(AACDecContext *ac, ChannelElement *cpe, int ms_present)
Definition aacdec.h:470
void(* imdct_and_windowing_eld)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:492
void(* imdct_and_windowing_960)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:490
void(* imdct_and_windowing_ld)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:491
void(* apply_independent_coupling)(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
Definition aacdec.h:484
void(* apply_prediction)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:479
void(* apply_tns)(void *_coef_param, TemporalNoiseShaping *tns, IndividualChannelStream *ics, int decode)
Definition aacdec.h:473
void(* imdct_and_windowing)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:488
void(* update_ltp)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:477
void(* apply_dependent_coupling)(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
Definition aacdec.h:481
void(* apply_ltp)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:476
void(* clip_output)(AACDecContext *ac, ChannelElement *che, int type, int samples)
Definition aacdec.h:494
void(* apply_mid_side_stereo)(AACDecContext *ac, ChannelElement *cpe)
Definition aacdec.h:469
void(* imdct_and_windowing_768)(AACDecContext *ac, SingleChannelElement *sce)
Definition aacdec.h:489
void(* dequant_scalefactors)(SingleChannelElement *sce)
Definition aacdec.h:467
Decode-specific primitives.
Definition aacdec.h:447
void(* sbr_ctx_close)(ChannelElement *che)
Definition aacdec.h:460
void(* sbr_apply)(AACDecContext *ac, ChannelElement *che, int id_aac, int fl960, void *L, void *R)
Definition aacdec.h:458
int(* decode_cce)(AACDecContext *ac, GetBitContext *gb, ChannelElement *che)
Definition aacdec.h:453
int(* sbr_ctx_alloc_init)(AACDecContext *ac, ChannelElement **che, int id_aac)
Definition aacdec.h:455
int(* sbr_decode_extension)(AACDecContext *ac, ChannelElement *che, GetBitContext *gb, int crc, int cnt, int id_aac, int fl960)
Definition aacdec.h:456
int(* decode_spectrum_and_dequant)(AACDecContext *ac, GetBitContext *gb, const Pulse *pulse, SingleChannelElement *sce)
Definition aacdec.h:448
uint8_t nb_info
Definition aacdec.h:407
uint16_t core_frame_len
Definition aacdec.h:398
AACUSACLoudnessInfo album_info[64]
Definition aacdec.h:406
uint8_t nb_album
Definition aacdec.h:405
uint8_t core_sbr_frame_len_idx
Definition aacdec.h:397
AACUSACLoudnessInfo info[64]
Definition aacdec.h:408
struct AACUSACConfig::@255231064241100350351340257372241321307313006210 loudness
uint16_t stream_identifier
Definition aacdec.h:399
int input_method_val
Raw bsMethodValue (μ) of the program/anchor-loudness measurement selected for normalization at config...
Definition aacdec.h:415
AACUsacElemConfig elems[MAX_ELEM_ID]
Definition aacdec.h:401
struct AACUSACLoudnessInfo::@144211065203337024143363352034022367376254316171 measurements[16]
struct AACUSACLoudnessInfo::@321071037316376126376256250004061141151267156374 sample_peak
uint8_t reliability
Definition aacdec.h:321
uint8_t method_def
Definition aacdec.h:327
uint8_t measurement
Definition aacdec.h:320
uint8_t downmix_id
Definition aacdec.h:312
uint8_t nb_measurements
Definition aacdec.h:325
struct AACUSACLoudnessInfo::@243062262052376245203144120027045262312013170327 true_peak
uint8_t eq_set_id
Definition aacdec.h:311
uint8_t method_val
Definition aacdec.h:328
uint8_t drc_set_id
Definition aacdec.h:310
struct AACUsacElemConfig::@355171322144321232200235357333175172075212042356::@272034025153077076322075376027006155226106336120 dflt
uint8_t residual_bands
Definition aacdec.h:375
uint8_t otts_bands_phase
Definition aacdec.h:373
struct AACUsacElemConfig::@155117225007163044355101232061326353222222330310 drc
uint8_t stereo_config_index
Definition aacdec.h:340
uint8_t high_rate_mode
Definition aacdec.h:369
uint8_t start_freq
Definition aacdec.h:350
uint8_t payload_frag
Definition aacdec.h:382
enum AACUsacElem type
Definition aacdec.h:335
struct AACUsacElemConfig::@031364347270230120164276243152035317262270312044 mps
uint8_t phase_coding
Definition aacdec.h:370
uint32_t pl_data_offset
Definition aacdec.h:384
uint32_t default_len
Definition aacdec.h:383
uint8_t decorr_config
Definition aacdec.h:368
uint8_t alter_scale
Definition aacdec.h:354
uint8_t fixed_gain
Definition aacdec.h:366
uint8_t temp_shape_config
Definition aacdec.h:367
uint8_t interpol_freq
Definition aacdec.h:359
uint8_t stop_freq
Definition aacdec.h:351
struct AACUsacElemConfig::@253167335173233142055027357074223104054112322124 ext
uint8_t bs_pvc
Definition aacdec.h:347
uint8_t * pl_buf
Definition aacdec.h:385
uint8_t residual_coding
Definition aacdec.h:374
uint8_t env_quant_mode
Definition aacdec.h:377
uint8_t bs_intertes
Definition aacdec.h:346
uint8_t noise_bands
Definition aacdec.h:355
uint8_t limiter_bands
Definition aacdec.h:357
uint8_t noise_fill
Definition aacdec.h:338
uint8_t freq_res
Definition aacdec.h:365
uint8_t otts_bands_phase_present
Definition aacdec.h:372
uint8_t harmonic_sbr
Definition aacdec.h:345
uint8_t freq_scale
Definition aacdec.h:353
uint8_t smoothing_mode
Definition aacdec.h:360
struct AACUsacElemConfig::@155117225007163044355101232061326353222222330310::@250177363014367151273127351060337350061157103052 loudness
uint8_t pseudo_lr
Definition aacdec.h:376
struct AACUsacElemConfig::@355171322144321232200235357333175172075212042356 sbr
uint8_t limiter_gains
Definition aacdec.h:358
uint8_t tw_mdct
Definition aacdec.h:337
uint8_t level
Definition aacdec.h:154
uint8_t scale_factor_grouping
Definition aacdec.h:134
struct AACUsacElemData::@170324333014322114255251102173201272223305376176 ldp
uint8_t core_mode
Definition aacdec.h:133
uint8_t gain
Definition aacdec.h:159
uint8_t acelp_core_mode
Definition aacdec.h:142
AACArithState ac
Definition aacdec.h:163
struct AACUsacElemData::@261150123320056304135021253254164365325070141151 fac
uint8_t core_mode_last
Definition aacdec.h:146
int last_lpd_mode
Definition aacdec.h:149
uint8_t offset
Definition aacdec.h:155
uint8_t fac_data_present
Definition aacdec.h:147
uint8_t lpd_mode
Definition aacdec.h:143
uint8_t tw_ratio[NUM_TW_NODES]
Definition aacdec.h:139
uint8_t bpf_control_info
Definition aacdec.h:145
uint8_t tns_data_present
Definition aacdec.h:135
uint32_t kv[8][8]
Definition aacdec.h:160
unsigned int seed
Definition aacdec.h:153
int smooth_mode[MPS_MAX_PARAM_SETS]
Definition aacdec.h:251
int nb_param_sets
Definition aacdec.h:242
int smooth_time[MPS_MAX_PARAM_SETS]
Definition aacdec.h:252
int framing_type
Definition aacdec.h:241
int16_t temp_shape_data[MPS_MAX_TIME_SLOTS]
Definition aacdec.h:260
int param_sets[MPS_MAX_PARAM_SETS]
Definition aacdec.h:243
int ott_idx[MPS_ELE_NB][MPS_MAX_PARAM_SETS][MPS_MAX_PARAM_BANDS]
Definition aacdec.h:247
bool opd_smoothing_mode
Definition aacdec.h:248
int tsd_num_tr_slots
Definition aacdec.h:262
bool tsd_enable
Definition aacdec.h:257
AACMPSLosslessData ott[MPS_ELE_NB]
Definition aacdec.h:246
bool temp_shape_enable
Definition aacdec.h:258
int freq_res_stride_smg[MPS_MAX_PARAM_SETS]
Definition aacdec.h:253
bool smg_data[MPS_MAX_PARAM_SETS][MPS_MAX_PARAM_BANDS]
Definition aacdec.h:254
int tsd_phase_data[64]
Definition aacdec.h:263
bool temp_shape_enable_ch[2]
Definition aacdec.h:259
uint8_t tns_on_lr
Apply TNS before M/S and stereo prediction.
Definition aacdec.h:269
INTFLOAT_ALIGNED_UNION(32, dmix_im, 1024)
uint8_t common_tw
Definition aacdec.h:268
uint8_t common_window
Definition aacdec.h:267
uint8_t pred_used[128]
Definition aacdec.h:279
INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_re, 1024)
INTFLOAT_ALIGNED_UNION(32, prev_alpha_q_im, 1024)
INTFLOAT_ALIGNED_UNION(32, prev_dmix_re, 1024)
INTFLOAT_ALIGNED_UNION(32, dmix_re, 1024)
uint8_t complex_coef
Definition aacdec.h:277
uint8_t ms_mask_mode
Definition aacdec.h:271
INTFLOAT_ALIGNED_UNION(32, alpha_q_im, 1024)
uint8_t config_idx
Definition aacdec.h:272
INTFLOAT_ALIGNED_UNION(32, alpha_q_re, 1024)
uint8_t use_prev_frame
Definition aacdec.h:275
AACUsacMPSData mps
Definition aacdec.h:281
uint8_t pred_dir
Definition aacdec.h:276
An AVChannelLayout holds information about the channel layout of audio data.
Describe the class of an AVClass context structure.
Definition log.h:76
main external API structure.
Definition avcodec.h:443
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
coupling parameters
Definition aacdec.h:203
int id_select[8]
element id
Definition aacdec.h:207
enum CouplingPoint coupling_point
The point during decoding at which coupling is applied.
Definition aacdec.h:204
int num_coupled
number of target elements
Definition aacdec.h:205
int ch_select[8]
[0] shared list of gains; [1] list of gains for right channel; [2] list of gains for left channel; [3...
Definition aacdec.h:208
INTFLOAT_UNION(gain, [16][120])
enum RawDataBlockType type[8]
Type of channel element to be coupled - SCE or CPE.
Definition aacdec.h:206
channel element - generic struct for SCE/CPE/CCE/LFE
Definition aacdec.h:296
AACUsacStereo us
Definition aacdec.h:306
uint8_t ms_mask[128]
Set if mid/side stereo is used for each scalefactor window band.
Definition aacdec.h:300
SingleChannelElement ch[2]
Definition aacdec.h:302
uint8_t max_sfb_ste
(USAC) Maximum of both max_sfb values
Definition aacdec.h:299
ChannelCoupling coup
Definition aacdec.h:304
Dynamic Range Control - decoded from the bitstream but not processed further.
Definition aacdec.h:431
int interpolation_scheme
Indicates the interpolation scheme used in the SBR QMF domain.
Definition aacdec.h:437
int exclude_mask[MAX_CHANNELS]
Channels to be excluded from DRC processing.
Definition aacdec.h:435
int band_incr
Number of DRC bands greater than 1 having DRC info.
Definition aacdec.h:436
int dyn_rng_ctl[17]
DRC magnitude information.
Definition aacdec.h:434
int prog_ref_level
A reference level for the long-term program audio level for all channels combined.
Definition aacdec.h:439
int pce_instance_tag
Indicates with which program the DRC info is associated.
Definition aacdec.h:432
int band_top[17]
Indicates the top of the i-th DRC band in units of 4 spectral lines.
Definition aacdec.h:438
int dyn_rng_sgn[17]
DRC sign information; 0 - positive, 1 - negative.
Definition aacdec.h:433
Individual Channel Stream.
Definition aacdec.h:169
uint8_t max_sfb
number of scalefactor bands per group
Definition aacdec.h:170
int prev_num_window_groups
Previous frame's number of window groups.
Definition aacdec.h:174
int num_swb
number of scalefactor window bands
Definition aacdec.h:178
LongTermPrediction ltp
Definition aacdec.h:176
uint8_t prediction_used[41]
Definition aacdec.h:184
uint8_t group_len[8]
Definition aacdec.h:175
uint8_t use_kb_window[2]
If set, use Kaiser-Bessel window, otherwise use a sine window.
Definition aacdec.h:172
enum WindowSequence window_sequence[2]
Definition aacdec.h:171
const uint16_t * swb_offset
table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular wind...
Definition aacdec.h:177
uint8_t window_clipping[8]
set if a certain window is near clipping
Definition aacdec.h:185
Long Term Prediction.
Definition aacdec.h:124
int8_t used[MAX_LTP_LONG_SFB]
Definition aacdec.h:128
AACUSACConfig usac
Definition aacdec.h:425
enum OCStatus status
Definition aacdec.h:424
MPEG4AudioConfig m4ac
Definition aacdec.h:420
AVChannelLayout ch_layout
Definition aacdec.h:423
uint8_t layout_map[MAX_ELEM_ID *4][3]
Definition aacdec.h:421
Predictor State.
Definition aac.h:103
Single Channel Element - used for both SCE and LFE elements.
Definition aacdec.h:217
struct PredictorState * predictor_state
Definition aacdec.h:231
float coeffs[1024]
coefficients for IMDCT, maybe processed
Definition aacenc.h:121
INTFLOAT_ALIGNED_UNION(16, ltp_state, 3072)
time signal for LTP
int sfo[128]
scalefactor offsets
Definition aacdec.h:222
INTFLOAT_ALIGNED_UNION(32, ret_buf, 2048)
PCM output buffer.
INTFLOAT_ALIGNED_UNION(32, saved, 1536)
overlap
TemporalNoiseShaping tns
Definition aacdec.h:220
INTFLOAT_ALIGNED_UNION(32, prev_coeffs, 1024)
unscaled previous contents of coeffs[] for USAC
AACUsacElemData ue
USAC element data.
Definition aacdec.h:219
float ret_buf[2048]
PCM output buffer.
Definition aacenc.h:122
float * output
PCM output.
Definition aacdec.h:234
enum BandType band_type[128]
band types
Definition aacdec.h:221
INTFLOAT_ALIGNED_UNION(32, coeffs, 1024)
coefficients for IMDCT, maybe processed
IndividualChannelStream ics
Definition aacdec.h:218
INTFLOAT_UNION(sf, [128])
scalefactors (8 windows * 16 sfb max)
Temporal Noise Shaping.
Definition aacdec.h:191
int direction[8][4]
Definition aacdec.h:195
int length[8][4]
Definition aacdec.h:194
INTFLOAT_UNION(coef, [8][4][TNS_MAX_ORDER])
int order[8][4]
Definition aacdec.h:196
float coef[8][4][TNS_MAX_ORDER]
Definition aacenc.h:103
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
Definition tx.h:151
else temp
Definition vf_mcdeint.c:275