diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 19:38:05 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 19:38:05 +0100 |
commit | 76b81b10d90732a6609522b7b152395ae2c049bb (patch) | |
tree | 9bcf7ab1758bd1e1d9d84dcebf3f218e20751ba6 /libavcodec/aac.h | |
parent | a1c487e9215c5685f0694ebde5bba07f4a07e95a (diff) | |
download | ffmpeg-76b81b10d90732a6609522b7b152395ae2c049bb.tar.gz |
aacenc: implement the complete AAC-Main profile
This commit finalizes AAC-Main profile encoding support
by implementing all mandatory and optional tools available
in the specifications and current decoders.
The AAC-Main profile reqires that prediction support be
present (although decoders don't require it to be enabled)
for an encoder to be deemed capable of AAC-Main encoding,
as well as TNS, PNS and IS, all of which were implemented
with previous commits or earlier of this year.
Users are encouraged to test the new functionality using either
-profile:a aac_main or -aac_pred 1, the former of which will enable
the prediction option by default and the latter will change the
profile to AAC-Main. No other options shall be changed by enabling
either, it's currently up to the users to decide what's best.
The current implementation works best using M/S and/or IS,
so users are also welcome to enable both options and any
other options (TNS, PNS) for maximum quality.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/aac.h')
-rw-r--r-- | libavcodec/aac.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/aac.h b/libavcodec/aac.h index 9ab2639ac8..dc6b439854 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -139,6 +139,8 @@ typedef struct PredictorState { AAC_FLOAT var1; AAC_FLOAT r0; AAC_FLOAT r1; + AAC_FLOAT k1; + AAC_FLOAT x_est; } PredictorState; #define MAX_PREDICTORS 672 @@ -181,6 +183,7 @@ typedef struct IndividualChannelStream { int predictor_present; int predictor_initialized; int predictor_reset_group; + int predictor_reset_count[31]; ///< used by encoder to count prediction resets uint8_t prediction_used[41]; uint8_t window_clipping[8]; ///< set if a certain window is near clipping float clip_avoidance_factor; ///< set if any window is near clipping to the necessary atennuation factor to avoid it @@ -244,6 +247,7 @@ typedef struct SingleChannelElement { TemporalNoiseShaping tns; Pulse pulse; enum BandType band_type[128]; ///< band types + enum BandType orig_band_type[128]; ///< band type backups for undoing prediction int band_type_run_end[120]; ///< band type run end points INTFLOAT sf[120]; ///< scalefactors int sf_idx[128]; ///< scalefactor indices (used by encoder) @@ -256,6 +260,7 @@ typedef struct SingleChannelElement { DECLARE_ALIGNED(32, INTFLOAT, ret_buf)[2048]; ///< PCM output buffer DECLARE_ALIGNED(16, INTFLOAT, ltp_state)[3072]; ///< time signal for LTP DECLARE_ALIGNED(32, AAC_FLOAT, pqcoeffs)[1024]; ///< quantization error of coefs (used by encoder) + DECLARE_ALIGNED(32, AAC_FLOAT, prcoeffs)[1024]; ///< Main prediction coefs (used by encoder) PredictorState predictor_state[MAX_PREDICTORS]; INTFLOAT *ret; ///< PCM output } SingleChannelElement; |