History

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.

Rostislav Pehlivanov committed 11 years ago

Commit a1c487e1 parent eab12d07 files · +311 −6Browse files

Showing the changes to libavcodec/aaccoder.c (1 of 7 files). Show all

Unified · Split

libavcodec/aaccoder.c+9−0
@@ -45,6 +45,7 @@ · 44 unmodified lines
4545 #include "aac_tablegen_decl.h"
4646
4747 #include "aacenc_is.h"
48+#include "aacenc_tns.h"
4849
4950 /** Frequency in Hz for lower limit of noise substitution **/
5051 #define NOISE_LOW_LIMIT 4500
@@ -958,8 +959,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { · 907 unmodified lines
958959 search_for_quantizers_faac,
959960 encode_window_bands_info,
960961 quantize_and_encode_band,
962+ encode_tns_info,
961963 set_special_band_scalefactors,
962964 search_for_pns,
965+ search_for_tns,
963966 search_for_ms,
964967 search_for_is,
965968 },
@@ -967,8 +970,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { · 1 unmodified line
967970 search_for_quantizers_anmr,
968971 encode_window_bands_info,
969972 quantize_and_encode_band,
973+ encode_tns_info,
970974 set_special_band_scalefactors,
971975 search_for_pns,
976+ search_for_tns,
972977 search_for_ms,
973978 search_for_is,
974979 },
@@ -976,8 +981,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { · 1 unmodified line
976981 search_for_quantizers_twoloop,
977982 codebook_trellis_rate,
978983 quantize_and_encode_band,
984+ encode_tns_info,
979985 set_special_band_scalefactors,
980986 search_for_pns,
987+ search_for_tns,
981988 search_for_ms,
982989 search_for_is,
983990 },
@@ -985,8 +992,10 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = { · 1 unmodified line
985992 search_for_quantizers_fast,
986993 encode_window_bands_info,
987994 quantize_and_encode_band,
995+ encode_tns_info,
988996 set_special_band_scalefactors,
989997 search_for_pns,
998+ search_for_tns,
990999 search_for_ms,
9911000 search_for_is,
9921001 },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t