Go to the documentation of this file.
30 #ifndef AVCODEC_AAC_AACDEC_H
31 #define AVCODEC_AAC_AACDEC_H
101 #define RENAME_FIXED(name) name ## _fixed
103 #define INTFLOAT_UNION(name, elems) \
105 int RENAME_FIXED(name) elems; \
109 #define INTFLOAT_ALIGNED_UNION(alignment, name, nb_elems) \
111 DECLARE_ALIGNED(alignment, int, RENAME_FIXED(name))[nb_elems]; \
112 DECLARE_ALIGNED(alignment, float, name)[nb_elems]; \
131 #define NUM_TW_NODES 16
407 int id_aac,
void *
L,
void *
R);
537 #if defined(USE_FIXED) && USE_FIXED
538 #define fdsp RENAME_FIXED(fdsp)
552 uint8_t (*layout_map)[3],
558 enum OCStatus oc_type,
int get_new_frame);
enum RawDataBlockType type[8]
Type of channel element to be coupled - SCE or CPE.
CouplingPoint
The point during decoding at which channel coupling is applied.
uint8_t stereo_config_index
uint8_t tns_on_lr
Apply TNS before M/S and stereo prediction.
int(* decode_spectrum_and_dequant)(AACDecContext *ac, GetBitContext *gb, const Pulse *pulse, SingleChannelElement *sce)
struct PredictorState * predictor_state
void(* apply_intensity_stereo)(AACDecContext *ac, ChannelElement *cpe, int ms_present)
uint16_t stream_identifier
struct AACUsacElemConfig::@24 sbr
int(* sbr_ctx_alloc_init)(AACDecContext *ac, ChannelElement **che, int id_aac)
int8_t used[MAX_LTP_LONG_SFB]
@ OC_TRIAL_PCE
Output configuration under trial specified by an inband PCE.
This structure describes decoded (raw) audio or video data.
uint8_t scale_factor_grouping
ChannelElement * tag_che_map[4][MAX_ELEM_ID]
void(* apply_tns)(void *_coef_param, TemporalNoiseShaping *tns, IndividualChannelStream *ics, int decode)
int warned_remapping_once
void(* apply_prediction)(AACDecContext *ac, SingleChannelElement *sce)
SingleChannelElement ch[2]
@ ID_CONFIG_EXT_STREAM_ID
int ff_aac_decode_init_float(AVCodecContext *avctx)
int dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
Dynamic Range Control - decoded from the bitstream but not processed further.
int num_swb
number of scalefactor window bands
int ff_aac_decode_init_fixed(AVCodecContext *avctx)
Dequantization-related.
INTFLOAT_UNION(gain, [16][120])
enum CouplingPoint coupling_point
The point during decoding at which coupling is applied.
float coeffs[1024]
coefficients for IMDCT, maybe processed
int force_dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
struct AACUsacElemConfig::@24::@27 dflt
int id_select[8]
element id
float ret_buf[2048]
PCM output buffer.
@ ID_EXT_ELE_AUDIOPREROLL
uint8_t window_clipping[8]
set if a certain window is near clipping
void(* sbr_apply)(AACDecContext *ac, ChannelElement *che, int id_aac, void *L, void *R)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
DynamicRangeControl che_drc
IndividualChannelStream ics
AACUsacElemConfig elems[64]
struct AACUsacElemConfig::@26 ext
void(* dequant_scalefactors)(SingleChannelElement *sce)
int exclude_mask[MAX_CHANNELS]
Channels to be excluded from DRC processing.
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
int ff_aac_decode_init(AVCodecContext *avctx)
@ OC_GLOBAL_HDR
Output configuration set in a global header but not yet locked.
float ltp_state[3072]
time signal for LTP
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
void(* apply_mid_side_stereo)(AACDecContext *ac, ChannelElement *cpe)
int num_coupled
number of target elements
int(* decode_cce)(AACDecContext *ac, GetBitContext *gb, ChannelElement *che)
void(* imdct_and_windowing_ld)(AACDecContext *ac, SingleChannelElement *sce)
uint8_t core_sbr_frame_len_idx
Individual Channel Stream.
ChannelElement * che[4][MAX_ELEM_ID]
int warned_num_aac_frames
Describe the class of an AVClass context structure.
int(* sbr_decode_extension)(AACDecContext *ac, ChannelElement *che, GetBitContext *gb, int crc, int cnt, int id_aac)
uint8_t use_kb_window[2]
If set, use Kaiser-Bessel window, otherwise use a sine window.
struct AACUSACConfig::@28 loudness
uint8_t ms_mask[128]
Set if mid/side stereo is used for each scalefactor window band.
int band_top[17]
Indicates the top of the i-th DRC band in units of 4 spectral lines.
INTFLOAT_UNION(sf, [128])
scalefactors (8 windows * 16 sfb max)
struct AACUSACLoudnessInfo::@23 measurements[16]
uint8_t temp_shape_config
@ OC_LOCKED
Output configuration locked in place.
int prev_num_window_groups
Previous frame's number of window groups.
AACUsacElemData ue
USAC element data.
uint8_t layout_map[MAX_ELEM_ID *4][3]
void(* update_ltp)(AACDecContext *ac, SingleChannelElement *sce)
void(* apply_independent_coupling)(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
ChannelElement * ff_aac_get_che(AACDecContext *ac, int type, int elem_id)
enum WindowSequence window_sequence[2]
void(* clip_output)(AACDecContext *ac, ChannelElement *che, int type, int samples)
@ OC_NONE
Output unconfigured.
void(* apply_dependent_coupling)(AACDecContext *ac, SingleChannelElement *target, ChannelElement *cce, int index)
An AVChannelLayout holds information about the channel layout of audio data.
void(* imdct_and_windowing)(AACDecContext *ac, SingleChannelElement *sce)
uint8_t max_sfb_ste
(USAC) Maximum of both max_sfb values
OCStatus
Output configuration status.
int sfo[128]
scalefactor offsets
int prog_ref_level
A reference level for the long-term program audio level for all channels combined.
SingleChannelElement * output_element[MAX_CHANNELS]
Points to each SingleChannelElement.
enum AACOutputChannelOrder output_channel_order
struct AACUsacElemConfig::@25 mps
INTFLOAT_ALIGNED_UNION(32, buf_mdct, 1024)
enum BandType band_type[128]
band types
int dyn_rng_ctl[17]
DRC magnitude information.
@ ID_CONFIG_EXT_LOUDNESS_INFO
void(* apply_ltp)(AACDecContext *ac, SingleChannelElement *sce)
float * output
PCM output.
void(* imdct_and_windowing_960)(AACDecContext *ac, SingleChannelElement *sce)
int ff_aac_decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, GetBitContext *gb, const IndividualChannelStream *ics)
Decode Temporal Noise Shaping data; reference: table 4.48.
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.
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.
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....
Single Channel Element - used for both SCE and LFE elements.
channel element - generic struct for SCE/CPE/CCE/LFE
const uint16_t * swb_offset
table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular wind...
#define RENAME_FIXED(name)
OutputConfiguration oc[2]
void(* imdct_and_windowing_eld)(AACDecContext *ac, SingleChannelElement *sce)
INTFLOAT_ALIGNED_UNION(32, coeffs, 1024)
coefficients for IMDCT, maybe processed
int pce_instance_tag
Indicates with which program the DRC info is associated.
float coef[8][4][TNS_MAX_ORDER]
int ch_select[8]
[0] shared list of gains; [1] list of gains for right channel; [2] list of gains for left channel; [3...
struct AACUSACLoudnessInfo::@22 true_peak
INTFLOAT_UNION(coef, [8][4][TNS_MAX_ORDER])
main AAC decoding context
AACUSACLoudnessInfo info[64]
main external API structure.
struct AVCodecContext * avctx
uint8_t prediction_used[41]
Filter the word “frame” indicates either a video frame or a group of audio samples
int band_incr
Number of DRC bands greater than 1 having DRC info.
struct AACUsacElemData::@16 fac
AVChannelLayout ch_layout
void(* imdct_and_windowing_768)(AACDecContext *ac, SingleChannelElement *sce)
int is_saved
Set if elements have stored overlap from previous frame.
int dyn_rng_sgn[17]
DRC sign information; 0 - positive, 1 - negative.
uint8_t tw_ratio[NUM_TW_NODES]
struct AACUsacElemData::@14 ldp
struct AACUsacElemData::@15 noise
INTFLOAT_ALIGNED_UNION(32, alpha_q_re, 1024)
Decode-specific primitives.
uint8_t max_sfb
number of scalefactor bands per group
int interpolation_scheme
Indicates the interpolation scheme used in the SBR QMF domain.
struct AACUSACLoudnessInfo::@21 sample_peak
@ OC_TRIAL_FRAME
Output configuration under trial specified by a frame header.
void(* sbr_ctx_close)(ChannelElement *che)
int predictor_reset_group
AACUSACLoudnessInfo album_info[64]
int predictor_initialized