summaryrefslogtreecommitdiff
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2015-10-17 02:22:51 +0100
committerRostislav Pehlivanov <atomnuker@gmail.com>2015-10-17 02:31:20 +0100
commit27d23ae07424a7c3a5d5e242ca702299cdd2e14c (patch)
treea0dbfe397948ae22e5ed1f591c00a90ed00a89e4 /libavcodec/aaccoder.c
parent83900c0ed34c22487d6a97cdf9e9949d0795f5b0 (diff)
downloadffmpeg-27d23ae07424a7c3a5d5e242ca702299cdd2e14c.tar.gz
aacenc: add support for encoding files using Long Term Prediction
Long Term Prediction allows for prediction of spectral coefficients via the previously decoded time-dependent samples. This feature works well with harmonic content 2 or more frames long, like speech, human or non-human, piano music or any constant tones at very low bitrates. It should be noted that the current coder is highly efficient and the rate control system is unable to encode files at extremely low bitrates (less than 14kbps seems to be impossible) so this extension isn't capable of optimum operation. Dramatic difference is observable with some types of audio and speech but for the most part the audiable differences are subtle. The spectrum looks better however so the encoder is able to harvest the additional bits that this feature provies, should the user choose to enable it. So it's best to enable this feature only if encoding at the absolutely lowest bitrate that the encoder is capable of.
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 c25189dbda..fd9785e26a 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -48,6 +48,7 @@
#include "aacenc_is.h"
#include "aacenc_tns.h"
+#include "aacenc_ltp.h"
#include "aacenc_pred.h"
#include "libavcodec/aaccoder_twoloop.h"
@@ -911,14 +912,19 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
encode_window_bands_info,
quantize_and_encode_band,
ff_aac_encode_tns_info,
+ ff_aac_encode_ltp_info,
ff_aac_encode_main_pred,
ff_aac_adjust_common_pred,
+ ff_aac_adjust_common_ltp,
ff_aac_apply_main_pred,
ff_aac_apply_tns,
+ ff_aac_update_ltp,
+ ff_aac_ltp_insert_new_frame,
set_special_band_scalefactors,
search_for_pns,
mark_pns,
ff_aac_search_for_tns,
+ ff_aac_search_for_ltp,
search_for_ms,
ff_aac_search_for_is,
ff_aac_search_for_pred,
@@ -928,14 +934,19 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
encode_window_bands_info,
quantize_and_encode_band,
ff_aac_encode_tns_info,
+ ff_aac_encode_ltp_info,
ff_aac_encode_main_pred,
ff_aac_adjust_common_pred,
+ ff_aac_adjust_common_ltp,
ff_aac_apply_main_pred,
ff_aac_apply_tns,
+ ff_aac_update_ltp,
+ ff_aac_ltp_insert_new_frame,
set_special_band_scalefactors,
search_for_pns,
mark_pns,
ff_aac_search_for_tns,
+ ff_aac_search_for_ltp,
search_for_ms,
ff_aac_search_for_is,
ff_aac_search_for_pred,
@@ -945,14 +956,19 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
codebook_trellis_rate,
quantize_and_encode_band,
ff_aac_encode_tns_info,
+ ff_aac_encode_ltp_info,
ff_aac_encode_main_pred,
ff_aac_adjust_common_pred,
+ ff_aac_adjust_common_ltp,
ff_aac_apply_main_pred,
ff_aac_apply_tns,
+ ff_aac_update_ltp,
+ ff_aac_ltp_insert_new_frame,
set_special_band_scalefactors,
search_for_pns,
mark_pns,
ff_aac_search_for_tns,
+ ff_aac_search_for_ltp,
search_for_ms,
ff_aac_search_for_is,
ff_aac_search_for_pred,
@@ -962,14 +978,19 @@ AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
encode_window_bands_info,
quantize_and_encode_band,
ff_aac_encode_tns_info,
+ ff_aac_encode_ltp_info,
ff_aac_encode_main_pred,
ff_aac_adjust_common_pred,
+ ff_aac_adjust_common_ltp,
ff_aac_apply_main_pred,
ff_aac_apply_tns,
+ ff_aac_update_ltp,
+ ff_aac_ltp_insert_new_frame,
set_special_band_scalefactors,
search_for_pns,
mark_pns,
ff_aac_search_for_tns,
+ ff_aac_search_for_ltp,
search_for_ms,
ff_aac_search_for_is,
ff_aac_search_for_pred,