Go to the documentation of this file.
48 #define MAX_CHANNELS 64
49 #define MAX_ELEM_ID 16
51 #define TNS_MAX_ORDER 20
52 #define MAX_LTP_LONG_SFB 40
54 #define CLIP_AVOIDANCE_FACTOR 0.95f
93 #define IS_CODEBOOK_UNSIGNED(x) (((x) - 1) & 10)
147 #define MAX_PREDICTORS 672
149 #define SCALE_DIV_512 36
150 #define SCALE_ONE_POS 140
151 #define SCALE_MAX_POS 255
152 #define SCALE_MAX_DIFF 60
153 #define SCALE_DIFF_ZERO 60
155 #define POW_SF2_ZERO 200
157 #define NOISE_PRE 256
158 #define NOISE_PRE_BITS 9
159 #define NOISE_OFFSET 90
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.
enum BandType band_alt[128]
alternative band type (used by encoder)
uint8_t can_pns[128]
band is allowed to PNS (informative)
uint8_t zeroes[128]
band is not coded (used by encoder)
void(* subband_scale)(int *dst, int *src, int scale, int offset, int len, void *log_context)
int coef_idx[8][4][TNS_MAX_ORDER]
This structure describes decoded (raw) audio or video data.
ChannelElement * tag_che_map[4][MAX_ELEM_ID]
int8_t used[MAX_LTP_LONG_SFB]
INTFLOAT pcoeffs[1024]
coefficients for IMDCT, pristine
INTFLOAT * ret
PCM output.
Dynamic Range Control - decoded from the bitstream but not processed further.
int num_swb
number of scalefactor window bands
enum CouplingPoint coupling_point
The point during decoding at which coupling is applied.
@ OC_LOCKED
Output configuration locked in place.
void(* apply_ltp)(AACContext *ac, SingleChannelElement *sce)
INTFLOAT saved[1536]
overlap
INTFLOAT ret_buf[2048]
PCM output buffer.
int id_select[8]
element id
int ms_mode
Signals mid/side stereo flags coding mode (used by encoder)
static av_always_inline float scale(float x, float s)
uint8_t prediction_used[41]
IndividualChannelStream ics
int predictor_reset_count[31]
used by encoder to count prediction resets
int is_saved
Set if elements have stored overlap from previous frame.
@ ZERO_BT
Scalefactors and spectral data are all zero.
int exclude_mask[MAX_CHANNELS]
Channels to be excluded from DRC processing.
float clip_avoidance_factor
set if any window is near clipping to the necessary atennuation factor to avoid it
void(* vector_pow43)(int *coefs, int len)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
@ NOISE_BT
Spectral data are scaled white noise not coded in the bitstream.
@ OC_TRIAL_FRAME
Output configuration under trial specified by a frame header.
INTFLOAT coeffs[1024]
coefficients for IMDCT, maybe processed
int num_coupled
number of target elements
const uint8_t * swb_sizes
table of scalefactor band sizes for a particular window
@ OC_NONE
Output unconfigured.
@ INTENSITY_BT2
Scalefactor data are intensity stereo positions (out of phase).
int force_dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
Individual Channel Stream.
INTFLOAT coef[8][4][TNS_MAX_ORDER]
const uint16_t * swb_offset
table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular wind...
int warned_num_aac_frames
@ INTENSITY_BT
Scalefactor data are intensity stereo positions (in phase).
Describe the class of an AVClass context structure.
uint8_t is_mask[128]
Set if intensity stereo is used (used by encoder)
float is_ener[128]
Intensity stereo pos (used by encoder)
int band_top[17]
Indicates the top of the i-th DRC band in units of 4 spectral lines.
ChannelElement * che[4][MAX_ELEM_ID]
PredictorState predictor_state[MAX_PREDICTORS]
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
int band_type_run_end[120]
band type run end points
int sf_idx[128]
scalefactor indices (used by encoder)
uint8_t layout_map[MAX_ELEM_ID *4][3]
void(* apply_tns)(INTFLOAT coef[1024], TemporalNoiseShaping *tns, IndividualChannelStream *ics, int decode)
AAC_FLOAT lcoeffs[1024]
MDCT of LTP coefficients (used by encoder)
SingleChannelElement ch[2]
int warned_remapping_once
@ ESC_BT
Spectral data are coded with an escape sequence.
int prog_ref_level
A reference level for the long-term program audio level for all channels combined.
Spectral Band Replication.
OCStatus
Output configuration status.
int common_window
Set if channels share a common 'IndividualChannelStream' in bitstream.
AAC_FLOAT prcoeffs[1024]
Main prediction coefs (used by encoder)
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 offset
uint8_t ms_mask[128]
Set if mid/side stereo is used for each scalefactor window band.
int dyn_rng_ctl[17]
DRC magnitude information.
float pns_ener[128]
Noise energy values (used by encoder)
@ OC_GLOBAL_HDR
Output configuration set in a global header but not yet locked.
#define DECLARE_ALIGNED(n, t, v)
Single Channel Element - used for both SCE and LFE elements.
SpectralBandReplication sbr
channel element - generic struct for SCE/CPE/CCE/LFE
OutputConfiguration oc[2]
@ OC_TRIAL_PCE
Output configuration under trial specified by an inband PCE.
DynamicRangeControl che_drc
int pce_instance_tag
Indicates with which program the DRC info is associated.
INTFLOAT sf[120]
scalefactors
SingleChannelElement * output_element[MAX_CHANNELS]
Points to each SingleChannelElement.
@ RESERVED_BT
Band types following are encoded differently from others.
void(* update_ltp)(AACContext *ac, SingleChannelElement *sce)
int ch_select[8]
[0] shared list of gains; [1] list of gains for right channel; [2] list of gains for left channel; [3...
main external API structure.
void ff_aacdec_init_mips(AACContext *c)
enum WindowSequence window_sequence[2]
@ FIRST_PAIR_BT
This and later band types encode two values (rather than four) with one code word.
uint8_t is_mode
Set if any bands have been encoded using intensity stereo (used by encoder)
int band_incr
Number of DRC bands greater than 1 having DRC info.
void(* windowing_and_mdct_ltp)(AACContext *ac, INTFLOAT *out, INTFLOAT *in, IndividualChannelStream *ics)
int dyn_rng_sgn[17]
DRC sign information; 0 - positive, 1 - negative.
uint8_t window_clipping[8]
set if a certain window is near clipping
uint8_t max_sfb
number of scalefactor bands per group
INTFLOAT ltp_state[3072]
time signal for LTP
int interpolation_scheme
Indicates the interpolation scheme used in the SBR QMF domain.
void(* imdct_and_windowing)(AACContext *ac, SingleChannelElement *sce)
enum BandType band_type[128]
band types
uint8_t use_kb_window[2]
If set, use Kaiser-Bessel window, otherwise use a sine window.
int dmono_mode
0->not dmono, 1->use first channel, 2->use second channel
int predictor_reset_group
int predictor_initialized