aacenc_ltp: disable LTP with high lambda values
authorRostislav Pehlivanov <atomnuker@gmail.com>
Tue, 8 Dec 2015 13:24:48 +0000 (13:24 +0000)
committerRostislav Pehlivanov <atomnuker@gmail.com>
Tue, 8 Dec 2015 13:31:55 +0000 (13:31 +0000)
Makes no sense to enable for high bitrates, the coder does well enough.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
libavcodec/aacenc_ltp.c
tests/fate/aac.mak

index 1917ee9..b9d43b4 100644 (file)
@@ -173,7 +173,7 @@ void ff_aac_search_for_ltp(AACEncContext *s, SingleChannelElement *sce,
         return;
     }
 
-    if (!sce->ics.ltp.lag)
+    if (!sce->ics.ltp.lag || s->lambda > 120.0f)
         return;
 
     for (w = 0; w < sce->ics.num_windows; w += sce->ics.group_len[w]) {
index 816fbf0..4e55b76 100644 (file)
@@ -209,7 +209,7 @@ fate-aac-ltp-encode: CMD = enc_dec_pcm adts wav s16le $(TARGET_SAMPLES)/audio-re
 fate-aac-ltp-encode: CMP = stddev
 fate-aac-ltp-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav
 fate-aac-ltp-encode: CMP_SHIFT = -4096
-fate-aac-ltp-encode: CMP_TARGET = 1273
+fate-aac-ltp-encode: CMP_TARGET = 1270
 fate-aac-ltp-encode: SIZE_TOLERANCE = 3560
 fate-aac-ltp-encode: FUZZ = 17