diff options
author | Martin Storsjo <martin@martin.st> | 2017-08-18 22:33:37 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2017-08-18 22:36:48 +0300 |
commit | 963b1891562e930a7d997215e700ef5ec5b4461e (patch) | |
tree | 034d0319525a8b499dbc418d7b4f9ed9676c25bd | |
parent | 1244b257ee7ec7d56f021a5c2e39e2c04881a148 (diff) | |
download | fdk-aac-963b1891562e930a7d997215e700ef5ec5b4461e.tar.gz fdk-aac-963b1891562e930a7d997215e700ef5ec5b4461e.tar.bz2 fdk-aac-963b1891562e930a7d997215e700ef5ec5b4461e.zip |
Enhance TNS tuning for 8 kHz audio sampling rate
This tuning has been suggested by Fraunhofer, fixing overflows
in encoding certain sequences.
-rw-r--r-- | libAACenc/src/aacenc_tns.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libAACenc/src/aacenc_tns.cpp b/libAACenc/src/aacenc_tns.cpp index 9a07e8f..5fcd309 100644 --- a/libAACenc/src/aacenc_tns.cpp +++ b/libAACenc/src/aacenc_tns.cpp @@ -388,7 +388,7 @@ AAC_ENCODER_ERROR FDKaacEnc_InitTnsConfiguration(INT bitRate, switch (granuleLength) { case 1024: /* TNS start line: skip lower MDCT lines to prevent artifacts due to filter mismatch */ - tC->lpcStartBand[LOFILT] = (blockType == SHORT_WINDOW) ? 0 : ((sampleRate < 18783) ? 4 : 8); + tC->lpcStartBand[LOFILT] = (blockType == SHORT_WINDOW) ? 0 : ((sampleRate <= 8000) ? 2 : ((sampleRate < 18783) ? 4 : 8)); tC->lpcStartLine[LOFILT] = pC->sfbOffset[tC->lpcStartBand[LOFILT]]; i = tC->lpcStopBand; |