summaryrefslogtreecommitdiffstats
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-08-21 19:38:05 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-08-21 19:38:05 +0100
commit76b81b10d90732a6609522b7b152395ae2c049bb (patch)
tree9bcf7ab1758bd1e1d9d84dcebf3f218e20751ba6 /libavcodec/aaccoder.c
parenta1c487e9215c5685f0694ebde5bba07f4a07e95a (diff)
downloadffmpeg-streaming-76b81b10d90732a6609522b7b152395ae2c049bb.zip
ffmpeg-streaming-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/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index 911668a..a23f173 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -46,6 +46,7 @@
#include "aacenc_is.h"
#include "aacenc_tns.h"
+#include "aacenc_pred.h"
/** Frequency in Hz for lower limit of noise substitution **/
#define NOISE_LOW_LIMIT 4500
@@ -960,43 +961,63 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
encode_window_bands_info,
quantize_and_encode_band,
encode_tns_info,
+ encode_main_pred,
+ adjust_common_prediction,
+ apply_main_pred,
+ update_main_pred,
set_special_band_scalefactors,
search_for_pns,
search_for_tns,
search_for_ms,
search_for_is,
+ search_for_pred,
},
[AAC_CODER_ANMR] = {
search_for_quantizers_anmr,
encode_window_bands_info,
quantize_and_encode_band,
encode_tns_info,
+ encode_main_pred,
+ adjust_common_prediction,
+ apply_main_pred,
+ update_main_pred,
set_special_band_scalefactors,
search_for_pns,
search_for_tns,
search_for_ms,
search_for_is,
+ search_for_pred,
},
[AAC_CODER_TWOLOOP] = {
search_for_quantizers_twoloop,
codebook_trellis_rate,
quantize_and_encode_band,
encode_tns_info,
+ encode_main_pred,
+ adjust_common_prediction,
+ apply_main_pred,
+ update_main_pred,
set_special_band_scalefactors,
search_for_pns,
search_for_tns,
search_for_ms,
search_for_is,
+ search_for_pred,
},
[AAC_CODER_FAST] = {
search_for_quantizers_fast,
encode_window_bands_info,
quantize_and_encode_band,
encode_tns_info,
+ encode_main_pred,
+ adjust_common_prediction,
+ apply_main_pred,
+ update_main_pred,
set_special_band_scalefactors,
search_for_pns,
search_for_tns,
search_for_ms,
search_for_is,
+ search_for_pred,
},
};
OpenPOWER on IntegriCloud