diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 19:27:38 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2015-08-21 19:27:38 +0100 |
commit | a1c487e9215c5685f0694ebde5bba07f4a07e95a (patch) | |
tree | cf7031383eb8a966eebeb2be96d22f57856c1a4c /libavcodec/aaccoder.c | |
parent | eab12d072e657ec748f0259b5281bd6912dccd70 (diff) | |
download | ffmpeg-a1c487e9215c5685f0694ebde5bba07f4a07e95a.tar.gz |
aacenc_tns: implement temporal noise shaping
This commit implements temporal noise shaping support in the
encoder, along with an -aac_tns option to toggle it on or off
(off by default for now). TNS will increase audio quality
and reduce quantization noise by applying a multitap FIR filter
across allowed coefficients and transmit side information to the
decoder so it could create an inverse filter.
Users are encouraged to test the new functionality by enabling
-aac_tns 1 during encoding.
No major bugs are observable at this time so after a while if no
new problems appear and if the current implementation is deemed
of high enough quality and stability it will be enabled by default,
possibly at the same time the encoder has its experimental flag
removed and becomes the standard aac encoder in ffmpeg.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r-- | libavcodec/aaccoder.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index 5df30a61ef..911668a42a 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -45,6 +45,7 @@ #include "aac_tablegen_decl.h" #include "aacenc_is.h" +#include "aacenc_tns.h" /** Frequency in Hz for lower limit of noise substitution **/ #define NOISE_LOW_LIMIT 4500 @@ -958,8 +959,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { search_for_quantizers_faac, encode_window_bands_info, quantize_and_encode_band, + encode_tns_info, set_special_band_scalefactors, search_for_pns, + search_for_tns, search_for_ms, search_for_is, }, @@ -967,8 +970,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { search_for_quantizers_anmr, encode_window_bands_info, quantize_and_encode_band, + encode_tns_info, set_special_band_scalefactors, search_for_pns, + search_for_tns, search_for_ms, search_for_is, }, @@ -976,8 +981,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { search_for_quantizers_twoloop, codebook_trellis_rate, quantize_and_encode_band, + encode_tns_info, set_special_band_scalefactors, search_for_pns, + search_for_tns, search_for_ms, search_for_is, }, @@ -985,8 +992,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { search_for_quantizers_fast, encode_window_bands_info, quantize_and_encode_band, + encode_tns_info, set_special_band_scalefactors, search_for_pns, + search_for_tns, search_for_ms, search_for_is, }, |