FFmpeg
aacenc.h
Go to the documentation of this file.
1 /*
2  * AAC encoder
3  * Copyright (C) 2008 Konstantin Shishkov
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #ifndef AVCODEC_AACENC_H
23 #define AVCODEC_AACENC_H
24 
25 #include <stdint.h>
26 
28 #include "libavutil/float_dsp.h"
29 #include "libavutil/mem_internal.h"
30 #include "libavutil/tx.h"
31 
32 #include "avcodec.h"
33 #include "put_bits.h"
34 
35 #include "aac.h"
36 #include "audio_frame_queue.h"
37 #include "psymodel.h"
38 
39 #include "lpc.h"
40 
41 #define CLIP_AVOIDANCE_FACTOR 0.95f
42 
43 typedef enum AACCoder {
47 
49 }AACCoder;
50 
51 typedef struct AACEncOptions {
52  int coder;
53  int pns;
54  int tns;
55  int ltp;
56  int pce;
57  int pred;
58  int mid_side;
61 
62 /**
63  * Long Term Prediction
64  */
65 typedef struct LongTermPrediction {
66  int8_t present;
67  int16_t lag;
68  int coef_idx;
69  float coef;
70  int8_t used[MAX_LTP_LONG_SFB];
72 
73 /**
74  * Individual Channel Stream
75  */
76 typedef struct IndividualChannelStream {
77  uint8_t max_sfb; ///< number of scalefactor bands per group
79  uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window.
80  uint8_t group_len[8];
82  const uint16_t *swb_offset; ///< table of offsets to the lowest spectral coefficient of a scalefactor band, sfb, for a particular window
83  const uint8_t *swb_sizes; ///< table of scalefactor band sizes for a particular window
84  int num_swb; ///< number of scalefactor window bands
85  int num_windows;
86  int tns_max_bands;
90  int predictor_reset_count[31]; ///< used to count prediction resets
91  uint8_t prediction_used[41];
92  uint8_t window_clipping[8]; ///< set if a certain window is near clipping
93  float clip_avoidance_factor; ///< set if any window is near clipping to the necessary atennuation factor to avoid it
95 
96 /**
97  * Temporal Noise Shaping
98  */
99 typedef struct TemporalNoiseShaping {
100  int present;
101  int n_filt[8];
102  int length[8][4];
103  int direction[8][4];
104  int order[8][4];
106  float coef[8][4][TNS_MAX_ORDER];
108 
109 /**
110  * Single Channel Element - used for both SCE and LFE elements.
111  */
112 typedef struct SingleChannelElement {
116  enum BandType band_type[128]; ///< band types
117  enum BandType band_alt[128]; ///< alternative band type
118  int sf_idx[128]; ///< scalefactor indices
119  uint8_t zeroes[128]; ///< band is not coded
120  uint8_t can_pns[128]; ///< band is allowed to PNS (informative)
121  float is_ener[128]; ///< Intensity stereo pos
122  float pns_ener[128]; ///< Noise energy values
123  DECLARE_ALIGNED(32, float, pcoeffs)[1024]; ///< coefficients for IMDCT, pristine
124  DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT, maybe processed
125  DECLARE_ALIGNED(32, float, ret_buf)[2048]; ///< PCM output buffer
126  DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP
127  DECLARE_ALIGNED(32, float, lcoeffs)[1024]; ///< MDCT of LTP coefficients
128  DECLARE_ALIGNED(32, float, prcoeffs)[1024]; ///< Main prediction coefs
131 
132 /**
133  * channel element - generic struct for SCE/CPE/CCE/LFE
134  */
135 typedef struct ChannelElement {
136  // CPE specific
137  int common_window; ///< Set if channels share a common 'IndividualChannelStream' in bitstream.
138  int ms_mode; ///< Signals mid/side stereo flags coding mode
139  uint8_t is_mode; ///< Set if any bands have been encoded using intensity stereo
140  uint8_t ms_mask[128]; ///< Set if mid/side stereo is used for each scalefactor window band
141  uint8_t is_mask[128]; ///< Set if intensity stereo is used
142  // shared
145 
146 struct AACEncContext;
147 
148 typedef struct AACCoefficientsEncoder {
150  SingleChannelElement *sce, const float lambda);
152  int win, int group_len, const float lambda);
153  void (*quantize_and_encode_band)(struct AACEncContext *s, PutBitContext *pb, const float *in, float *out, int size,
154  int scale_idx, int cb, const float lambda, int rtz);
156  void (*encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window);
168  void (*search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window);
173 
175 
177  float rd;
178  float energy;
179  int bits;
180  char cb;
181  char rtz;
182  uint16_t generation;
184 
185 typedef struct AACPCEInfo {
187  int num_ele[4]; ///< front, side, back, lfe
188  int pairing[3][8]; ///< front, side, back
189  int index[4][8]; ///< front, side, back, lfe
190  uint8_t config_map[16]; ///< configs the encoder's channel specific settings
191  uint8_t reorder_map[16]; ///< maps channels from lavc to aac order
192 } AACPCEInfo;
193 
194 /**
195  * AAC encoder context
196  */
197 typedef struct AACEncContext {
199  AACEncOptions options; ///< encoding options
201  AVTXContext *mdct1024; ///< long (1024 samples) frame transform context
203  AVTXContext *mdct128; ///< short (128 samples) frame transform context
206  AACPCEInfo pce; ///< PCE data, if needed
207  float *planar_samples[16]; ///< saved preprocessed input
208 
209  int profile; ///< copied from avctx
210  int needs_pce; ///< flag for non-standard layout
211  LPCContext lpc; ///< used by TNS
212  int samplerate_index; ///< MPEG-4 samplerate index
213  int channels; ///< channel count
214  const uint8_t *reorder_map; ///< lavc to aac reorder map
215  const uint8_t *chan_map; ///< channel configuration map
216 
217  ChannelElement *cpe; ///< channel elements
221  int cur_channel; ///< current channel for coder context
223  float lambda;
224  int last_frame_pb_count; ///< number of bits for the previous frame
225  float lambda_sum; ///< sum(lambda), for Qvg reporting
226  int lambda_count; ///< count(lambda), for Qvg reporting
227  enum RawDataBlockType cur_type; ///< channel group type cur_channel belongs to
228 
230  DECLARE_ALIGNED(16, int, qcoefs)[96]; ///< quantized coefficients
231  DECLARE_ALIGNED(32, float, scoefs)[1024]; ///< scaled coefficients
232 
234  AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]; ///< memoization area for quantize_band_cost
235 
236  void (*abs_pow34)(float *out, const float *in, const int size);
237  void (*quant_bands)(int *out, const float *in, const float *scaled,
238  int size, int is_signed, int maxval, const float Q34,
239  const float rounding);
240 
241  struct {
242  float *samples;
243  } buffer;
244 } AACEncContext;
245 
251 
252 
253 #endif /* AVCODEC_AACENC_H */
AACQuantizeBandCostCacheEntry
Definition: aacenc.h:176
SingleChannelElement::band_alt
enum BandType band_alt[128]
alternative band type
Definition: aacenc.h:117
AACCoefficientsEncoder::apply_tns_filt
void(* apply_tns_filt)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:161
AACEncOptions::ltp
int ltp
Definition: aacenc.h:55
AACCoefficientsEncoder::encode_window_bands_info
void(* encode_window_bands_info)(struct AACEncContext *s, SingleChannelElement *sce, int win, int group_len, const float lambda)
Definition: aacenc.h:151
SingleChannelElement::lcoeffs
float lcoeffs[1024]
MDCT of LTP coefficients.
Definition: aacenc.h:127
AACEncContext::planar_samples
float * planar_samples[16]
saved preprocessed input
Definition: aacenc.h:207
AACCoefficientsEncoder::search_for_quantizers
void(* search_for_quantizers)(AVCodecContext *avctx, struct AACEncContext *s, SingleChannelElement *sce, const float lambda)
Definition: aacenc.h:149
AACQuantizeBandCostCacheEntry::cb
char cb
Definition: aacenc.h:180
SingleChannelElement::can_pns
uint8_t can_pns[128]
band is allowed to PNS (informative)
Definition: aacenc.h:120
AACEncContext::needs_pce
int needs_pce
flag for non-standard layout
Definition: aacenc.h:210
SingleChannelElement::pulse
Pulse pulse
Definition: aacenc.h:115
mem_internal.h
AACEncOptions::coder
int coder
Definition: aacenc.h:52
out
FILE * out
Definition: movenc.c:54
cb
static double cb(void *priv, double x, double y)
Definition: vf_geq.c:241
AACEncContext::av_class
AVClass * av_class
Definition: aacenc.h:198
AVTXContext
Definition: tx_priv.h:235
SingleChannelElement::zeroes
uint8_t zeroes[128]
band is not coded
Definition: aacenc.h:119
LongTermPrediction::used
int8_t used[MAX_LTP_LONG_SFB]
Definition: aacdec.h:78
AACEncContext::abs_pow34
void(* abs_pow34)(float *out, const float *in, const int size)
Definition: aacenc.h:236
TemporalNoiseShaping::coef_idx
int coef_idx[8][4][TNS_MAX_ORDER]
Definition: aacenc.h:105
LongTermPrediction::coef
float coef
Definition: aacenc.h:69
AACCoefficientsEncoder::search_for_pns
void(* search_for_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
Definition: aacenc.h:165
AACCoefficientsEncoder::search_for_ms
void(* search_for_ms)(struct AACEncContext *s, ChannelElement *cpe)
Definition: aacenc.h:169
AACEncContext::samplerate_index
int samplerate_index
MPEG-4 samplerate index.
Definition: aacenc.h:212
MAX_PREDICTORS
#define MAX_PREDICTORS
Definition: aac.h:102
TemporalNoiseShaping::present
int present
Definition: aacdec.h:106
AACCoefficientsEncoder::search_for_tns
void(* search_for_tns)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:167
AAC_CODER_NB
@ AAC_CODER_NB
Definition: aacenc.h:48
lpc.h
AACQuantizeBandCostCacheEntry::generation
uint16_t generation
Definition: aacenc.h:182
AACCoefficientsEncoder::update_ltp
void(* update_ltp)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:162
ChannelElement::ch
SingleChannelElement ch[2]
Definition: aacdec.h:153
AACEncContext::chan_map
const uint8_t * chan_map
channel configuration map
Definition: aacenc.h:215
AAC_CODER_FAST
@ AAC_CODER_FAST
Definition: aacenc.h:46
win
static float win(SuperEqualizerContext *s, float n, int N)
Definition: af_superequalizer.c:119
IndividualChannelStream::num_swb
int num_swb
number of scalefactor window bands
Definition: aacdec.h:92
LPCContext
Definition: lpc.h:53
ff_quantize_band_cost_cache_init
void ff_quantize_band_cost_cache_init(struct AACEncContext *s)
Definition: aacenc.c:400
SingleChannelElement::ret_buf
INTFLOAT ret_buf[2048]
PCM output buffer.
Definition: aacdec.h:139
AACEncContext::psy
FFPsyContext psy
Definition: aacenc.h:218
ChannelElement::ms_mode
int ms_mode
Signals mid/side stereo flags coding mode.
Definition: aacenc.h:138
audio_frame_queue.h
IndividualChannelStream::window_clipping
uint8_t window_clipping[8]
set if a certain window is near clipping
Definition: aacdec.h:99
AACEncContext::options
AACEncOptions options
encoding options
Definition: aacenc.h:199
AACEncOptions::pce
int pce
Definition: aacenc.h:56
MAX_LTP_LONG_SFB
#define MAX_LTP_LONG_SFB
Definition: aac.h:40
AACPCEInfo::num_ele
int num_ele[4]
front, side, back, lfe
Definition: aacenc.h:187
SingleChannelElement::ics
IndividualChannelStream ics
Definition: aacdec.h:132
SingleChannelElement::prcoeffs
float prcoeffs[1024]
Main prediction coefs.
Definition: aacenc.h:128
AACEncContext::fdsp
AVFloatDSPContext * fdsp
Definition: aacenc.h:205
IndividualChannelStream::predictor_reset_count
int predictor_reset_count[31]
used to count prediction resets
Definition: aacenc.h:90
AACEncContext::lambda_count
int lambda_count
count(lambda), for Qvg reporting
Definition: aacenc.h:226
IndividualChannelStream::clip_avoidance_factor
float clip_avoidance_factor
set if any window is near clipping to the necessary atennuation factor to avoid it
Definition: aacenc.h:93
av_tx_fn
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
AACEncContext::lambda_sum
float lambda_sum
sum(lambda), for Qvg reporting
Definition: aacenc.h:225
ff_aac_coders
const AACCoefficientsEncoder ff_aac_coders[]
Definition: aaccoder.c:1119
s
#define s(width, name)
Definition: cbs_vp9.c:198
SingleChannelElement::coeffs
INTFLOAT coeffs[1024]
coefficients for IMDCT, maybe processed
Definition: aacdec.h:137
IndividualChannelStream::swb_sizes
const uint8_t * swb_sizes
table of scalefactor band sizes for a particular window
Definition: aacenc.h:83
TemporalNoiseShaping::direction
int direction[8][4]
Definition: aacdec.h:109
AudioFrameQueue
Definition: audio_frame_queue.h:32
PredictorState
Predictor State.
Definition: aac.h:91
AACEncContext::reorder_map
const uint8_t * reorder_map
lavc to aac reorder map
Definition: aacenc.h:214
LongTermPrediction::present
int8_t present
Definition: aacdec.h:75
ff_aac_dsp_init
void ff_aac_dsp_init(AACEncContext *s)
Definition: aacenc.c:1439
IndividualChannelStream
Individual Channel Stream.
Definition: aacdec.h:84
AACCoefficientsEncoder::adjust_common_ltp
void(* adjust_common_ltp)(struct AACEncContext *s, ChannelElement *cpe)
Definition: aacenc.h:159
AACPCEInfo::reorder_map
uint8_t reorder_map[16]
maps channels from lavc to aac order
Definition: aacenc.h:191
TemporalNoiseShaping::coef
INTFLOAT coef[8][4][TNS_MAX_ORDER]
Definition: aacdec.h:111
AACQuantizeBandCostCacheEntry::energy
float energy
Definition: aacenc.h:178
AACCoefficientsEncoder::encode_ltp_info
void(* encode_ltp_info)(struct AACEncContext *s, SingleChannelElement *sce, int common_window)
Definition: aacenc.h:156
PutBitContext
Definition: put_bits.h:50
SingleChannelElement::predictor_state
PredictorState predictor_state[MAX_PREDICTORS]
Definition: aacdec.h:141
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
ChannelElement::is_mask
uint8_t is_mask[128]
Set if intensity stereo is used.
Definition: aacenc.h:141
SingleChannelElement::is_ener
float is_ener[128]
Intensity stereo pos.
Definition: aacenc.h:121
IndividualChannelStream::use_kb_window
uint8_t use_kb_window[2]
If set, use Kaiser-Bessel window, otherwise use a sine window.
Definition: aacdec.h:87
AACEncContext::cur_type
enum RawDataBlockType cur_type
channel group type cur_channel belongs to
Definition: aacenc.h:227
AACCoefficientsEncoder::search_for_pred
void(* search_for_pred)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:171
LongTermPrediction::coef_idx
int coef_idx
Definition: aacenc.h:68
ChannelElement::ms_mask
uint8_t ms_mask[128]
Set if mid/side stereo is used for each scalefactor window band.
Definition: aacdec.h:151
aac.h
ff_aac_dsp_init_riscv
void ff_aac_dsp_init_riscv(AACEncContext *s)
Definition: aacencdsp_init.c:31
IndividualChannelStream::predictor_present
int predictor_present
Definition: aacdec.h:95
AACEncContext::mdct128_fn
av_tx_fn mdct128_fn
Definition: aacenc.h:204
AACEncContext::random_state
int random_state
Definition: aacenc.h:222
AACCoefficientsEncoder::ltp_insert_new_frame
void(* ltp_insert_new_frame)(struct AACEncContext *s)
Definition: aacenc.h:163
TNS_MAX_ORDER
#define TNS_MAX_ORDER
Definition: aac.h:39
AACEncContext::quantize_band_cost_cache_generation
uint16_t quantize_band_cost_cache_generation
Definition: aacenc.h:233
c
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
Definition: undefined.txt:32
AACCoefficientsEncoder::adjust_common_pred
void(* adjust_common_pred)(struct AACEncContext *s, ChannelElement *cpe)
Definition: aacenc.h:158
SingleChannelElement::sf_idx
int sf_idx[128]
scalefactor indices
Definition: aacenc.h:118
AACEncContext::qcoefs
int qcoefs[96]
quantized coefficients
Definition: aacenc.h:230
float_dsp.h
AACCoefficientsEncoder::apply_main_pred
void(* apply_main_pred)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:160
AACEncContext::buffer
struct AACEncContext::@11 buffer
AACEncOptions::tns
int tns
Definition: aacenc.h:54
AACPCEInfo
Definition: aacenc.h:185
AACEncContext::samples
float * samples
Definition: aacenc.h:242
AAC_CODER_ANMR
@ AAC_CODER_ANMR
Definition: aacenc.h:44
IndividualChannelStream::window_sequence
enum WindowSequence window_sequence[2]
Definition: aacdec.h:86
AACCoefficientsEncoder::set_special_band_scalefactors
void(* set_special_band_scalefactors)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:164
AACEncContext::channels
int channels
channel count
Definition: aacenc.h:213
AVChannelLayout
An AVChannelLayout holds information about the channel layout of audio data.
Definition: channel_layout.h:313
DECLARE_ALIGNED
#define DECLARE_ALIGNED(n, t, v)
Definition: mem_internal.h:111
BandType
BandType
Definition: aac.h:69
size
int size
Definition: twinvq_data.h:10344
AACCoefficientsEncoder::quantize_and_encode_band
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)
Definition: aacenc.h:153
FFPsyPreprocessContext
Definition: psymodel.c:93
AVFloatDSPContext
Definition: float_dsp.h:24
AACEncContext::quant_bands
void(* quant_bands)(int *out, const float *in, const float *scaled, int size, int is_signed, int maxval, const float Q34, const float rounding)
Definition: aacenc.h:237
AAC_CODER_TWOLOOP
@ AAC_CODER_TWOLOOP
Definition: aacenc.h:45
ff_aac_coder_init_mips
void ff_aac_coder_init_mips(AACEncContext *c)
Definition: aaccoder_mips.c:2484
ChannelElement::common_window
int common_window
Set if channels share a common 'IndividualChannelStream' in bitstream.
Definition: aacenc.h:137
AACCoefficientsEncoder::mark_pns
void(* mark_pns)(struct AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
Definition: aacenc.h:166
AACPCEInfo::index
int index[4][8]
front, side, back, lfe
Definition: aacenc.h:189
AACEncContext::mdct1024
AVTXContext * mdct1024
long (1024 samples) frame transform context
Definition: aacenc.h:201
SingleChannelElement::band_type
enum BandType band_type[128]
band types
Definition: aacdec.h:134
SingleChannelElement::pns_ener
float pns_ener[128]
Noise energy values.
Definition: aacenc.h:122
AACEncContext::cur_channel
int cur_channel
current channel for coder context
Definition: aacenc.h:221
AACCoder
AACCoder
Definition: aacenc.h:43
AACPCEInfo::config_map
uint8_t config_map[16]
configs the encoder's channel specific settings
Definition: aacenc.h:190
AACEncOptions::intensity_stereo
int intensity_stereo
Definition: aacenc.h:59
AACCoefficientsEncoder::encode_main_pred
void(* encode_main_pred)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:157
RawDataBlockType
RawDataBlockType
Definition: aac.h:42
SingleChannelElement
Single Channel Element - used for both SCE and LFE elements.
Definition: aacdec.h:131
IndividualChannelStream::num_windows
int num_windows
Definition: aacdec.h:93
AACQuantizeBandCostCacheEntry::rd
float rd
Definition: aacenc.h:177
AACCoefficientsEncoder::search_for_is
void(* search_for_is)(struct AACEncContext *s, AVCodecContext *avctx, ChannelElement *cpe)
Definition: aacenc.h:170
SingleChannelElement::pcoeffs
float pcoeffs[1024]
coefficients for IMDCT, pristine
Definition: aacenc.h:123
ChannelElement
channel element - generic struct for SCE/CPE/CCE/LFE
Definition: aacdec.h:148
IndividualChannelStream::swb_offset
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:91
AACPCEInfo::pairing
int pairing[3][8]
front, side, back
Definition: aacenc.h:188
AACQuantizeBandCostCacheEntry::bits
int bits
Definition: aacenc.h:179
LongTermPrediction::lag
int16_t lag
Definition: aacdec.h:76
ff_aac_dsp_init_x86
void ff_aac_dsp_init_x86(AACEncContext *s)
Definition: aacencdsp_init.c:35
TemporalNoiseShaping::order
int order[8][4]
Definition: aacdec.h:110
AACEncContext::quantize_band_cost_cache
AACQuantizeBandCostCacheEntry quantize_band_cost_cache[256][128]
memoization area for quantize_band_cost
Definition: aacenc.h:234
IndividualChannelStream::tns_max_bands
int tns_max_bands
Definition: aacdec.h:94
AACEncContext::psypp
struct FFPsyPreprocessContext * psypp
Definition: aacenc.h:219
AACCoefficientsEncoder
Definition: aacenc.h:148
TemporalNoiseShaping::length
int length[8][4]
Definition: aacdec.h:108
AACEncOptions::pns
int pns
Definition: aacenc.h:53
avcodec.h
AACEncOptions::mid_side
int mid_side
Definition: aacenc.h:58
AACEncContext::profile
int profile
copied from avctx
Definition: aacenc.h:209
AACEncContext::lpc
LPCContext lpc
used by TNS
Definition: aacenc.h:211
AACEncContext::afq
AudioFrameQueue afq
Definition: aacenc.h:229
SingleChannelElement::tns
TemporalNoiseShaping tns
Definition: aacdec.h:133
AACEncContext::pce
AACPCEInfo pce
PCE data, if needed.
Definition: aacenc.h:206
AACEncContext
AAC encoder context.
Definition: aacenc.h:197
AACQuantizeBandCostCacheEntry::rtz
char rtz
Definition: aacenc.h:181
AACCoefficientsEncoder::encode_tns_info
void(* encode_tns_info)(struct AACEncContext *s, SingleChannelElement *sce)
Definition: aacenc.h:155
AACEncContext::last_frame_pb_count
int last_frame_pb_count
number of bits for the previous frame
Definition: aacenc.h:224
AVCodecContext
main external API structure.
Definition: avcodec.h:445
AACCoefficientsEncoder::search_for_ltp
void(* search_for_ltp)(struct AACEncContext *s, SingleChannelElement *sce, int common_window)
Definition: aacenc.h:168
AACEncContext::mdct128
AVTXContext * mdct128
short (128 samples) frame transform context
Definition: aacenc.h:203
AACEncContext::scoefs
float scoefs[1024]
scaled coefficients
Definition: aacenc.h:231
LongTermPrediction
Long Term Prediction.
Definition: aacdec.h:74
channel_layout.h
IndividualChannelStream::prediction_used
uint8_t prediction_used[41]
Definition: aacdec.h:98
TemporalNoiseShaping
Temporal Noise Shaping.
Definition: aacdec.h:105
ChannelElement::is_mode
uint8_t is_mode
Set if any bands have been encoded using intensity stereo.
Definition: aacenc.h:139
AACEncContext::coder
const AACCoefficientsEncoder * coder
Definition: aacenc.h:220
AACEncContext::pb
PutBitContext pb
Definition: aacenc.h:200
IndividualChannelStream::max_sfb
uint8_t max_sfb
number of scalefactor bands per group
Definition: aacdec.h:85
AACEncOptions::pred
int pred
Definition: aacenc.h:57
Pulse
Definition: aac.h:116
SingleChannelElement::ltp_state
INTFLOAT ltp_state[3072]
time signal for LTP
Definition: aacdec.h:140
AACEncContext::mdct1024_fn
av_tx_fn mdct1024_fn
Definition: aacenc.h:202
WindowSequence
WindowSequence
Definition: aac.h:62
IndividualChannelStream::ltp
LongTermPrediction ltp
Definition: aacdec.h:90
AACEncContext::lambda
float lambda
Definition: aacenc.h:223
put_bits.h
FFPsyContext
context used by psychoacoustic model
Definition: psymodel.h:89
IndividualChannelStream::group_len
uint8_t group_len[8]
Definition: aacdec.h:89
AACEncOptions
Definition: aacenc.h:51
psymodel.h
TemporalNoiseShaping::n_filt
int n_filt[8]
Definition: aacdec.h:107
IndividualChannelStream::predictor_reset_group
int predictor_reset_group
Definition: aacdec.h:97
tx.h
AACEncContext::cpe
ChannelElement * cpe
channel elements
Definition: aacenc.h:217
AACPCEInfo::layout
AVChannelLayout layout
Definition: aacenc.h:186
IndividualChannelStream::predictor_initialized
int predictor_initialized
Definition: aacdec.h:96