Go to the documentation of this file.
22 #ifndef AVCODEC_AACENC_H
23 #define AVCODEC_AACENC_H
42 #define CLIP_AVOIDANCE_FACTOR 0.95f
167 int win,
int group_len,
const float lambda);
169 int scale_idx,
int cb,
const float lambda,
int rtz);
enum BandType band_alt[128]
alternative band type
void(* apply_tns_filt)(struct AACEncContext *s, SingleChannelElement *sce)
void(* encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda)
float lcoeffs[1024]
MDCT of LTP coefficients.
float * planar_samples[16]
saved preprocessed input
void(* search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s, SingleChannelElement *sce, const float lambda)
struct PredictorState * predictor_state
uint8_t can_pns[128]
band is allowed to PNS (informative)
int needs_pce
flag for non-standard layout
static double cb(void *priv, double x, double y)
uint8_t zeroes[128]
band is not coded
int8_t used[MAX_LTP_LONG_SFB]
int coef_idx[8][4][TNS_MAX_ORDER]
void(* search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
void(* search_for_ms)(struct AACEncContext *s, ChannelElement *cpe)
int samplerate_index
MPEG-4 samplerate index.
void(* search_for_tns)(struct AACEncContext *s, SingleChannelElement *sce)
void(* update_ltp)(struct AACEncContext *s, SingleChannelElement *sce)
SingleChannelElement ch[2]
const uint8_t * chan_map
channel configuration map
static float win(SuperEqualizerContext *s, float n, int N)
int num_swb
number of scalefactor window bands
void ff_quantize_band_cost_cache_init(struct AACEncContext *s)
float coeffs[1024]
coefficients for IMDCT, maybe processed
float ret_buf[2048]
PCM output buffer.
int ms_mode
Signals mid/side stereo flags coding mode.
uint8_t window_clipping[8]
set if a certain window is near clipping
AACEncOptions options
encoding options
int num_ele[4]
front, side, back, lfe
IndividualChannelStream ics
float prcoeffs[1024]
Main prediction coefs.
int predictor_reset_count[31]
used to count prediction resets
int lambda_count
count(lambda), for Qvg reporting
float clip_avoidance_factor
set if any window is near clipping to the necessary atennuation factor to avoid it
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
float ltp_state[3072]
time signal for LTP
float lambda_sum
sum(lambda), for Qvg reporting
const AACCoefficientsEncoder ff_aac_coders[]
const uint8_t * swb_sizes
table of scalefactor band sizes for a particular window
const uint8_t * reorder_map
lavc to aac reorder map
Individual Channel Stream.
void(* adjust_common_ltp)(struct AACEncContext *s, ChannelElement *cpe)
uint8_t reorder_map[16]
maps channels from lavc to aac order
void(* encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window)
Describe the class of an AVClass context structure.
uint8_t is_mask[128]
Set if intensity stereo is used.
float is_ener[128]
Intensity stereo pos.
uint8_t use_kb_window[2]
If set, use Kaiser-Bessel window, otherwise use a sine window.
enum RawDataBlockType cur_type
channel group type cur_channel belongs to
void(* search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce)
uint8_t ms_mask[128]
Set if mid/side stereo is used for each scalefactor window band.
void(* ltp_insert_new_frame)(struct AACEncContext *s)
uint16_t quantize_band_cost_cache_generation
void(* adjust_common_pred)(struct AACEncContext *s, ChannelElement *cpe)
int sf_idx[128]
scalefactor indices
int qcoefs[96]
quantized coefficients
void(* apply_main_pred)(struct AACEncContext *s, SingleChannelElement *sce)
enum WindowSequence window_sequence[2]
void(* set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce)
int channels
channel count
An AVChannelLayout holds information about the channel layout of audio data.
#define DECLARE_ALIGNED(n, t, v)
void(* quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size, int scale_idx, int cb, const float lambda, int rtz)
int common_window
Set if channels share a common 'IndividualChannelStream' in bitstream.
void(* mark_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
int index[4][8]
front, side, back, lfe
AVTXContext * mdct1024
long (1024 samples) frame transform context
enum BandType band_type[128]
band types
float pns_ener[128]
Noise energy values.
int cur_channel
current channel for coder context
uint8_t config_map[16]
configs the encoder's channel specific settings
void(* encode_main_pred)(struct AACEncContext *s, SingleChannelElement *sce)
Single Channel Element - used for both SCE and LFE elements.
void(* search_for_is)(struct AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe)
float pcoeffs[1024]
coefficients for IMDCT, pristine
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...
int pairing[3][8]
front, side, back
AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]
memoization area for quantize_band_cost
struct FFPsyPreprocessContext * psypp
int profile
copied from avctx
LPCContext lpc
used by TNS
float coef[8][4][TNS_MAX_ORDER]
AACPCEInfo pce
PCE data, if needed.
void(* encode_tns_info)(struct AACEncContext *s, SingleChannelElement *sce)
int last_frame_pb_count
number of bits for the previous frame
main external API structure.
void(* search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window)
AVTXContext * mdct128
short (128 samples) frame transform context
float scoefs[1024]
scaled coefficients
uint8_t prediction_used[41]
uint8_t is_mode
Set if any bands have been encoded using intensity stereo.
const AACCoefficientsEncoder * coder
uint8_t max_sfb
number of scalefactor bands per group
context used by psychoacoustic model
int predictor_reset_group
ChannelElement * cpe
channel elements
struct AACEncContext::@31 buffer
int predictor_initialized