aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc_tns.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2013-12-14 17:32:17 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-09-09 14:01:13 +0200
commitc89fb86cefb19ac9cf198c1e5cc31a85beab072e (patch)
tree74a5bd821b8a2823d6a0391066bce9fca23e6f35 /libAACenc/src/aacenc_tns.cpp
parenta0bd8aa3b6339082fbe9d830264839fa50c0a4b7 (diff)
downloadfdk-aac-c89fb86cefb19ac9cf198c1e5cc31a85beab072e.tar.gz
fdk-aac-c89fb86cefb19ac9cf198c1e5cc31a85beab072e.tar.bz2
fdk-aac-c89fb86cefb19ac9cf198c1e5cc31a85beab072e.zip
Add DAB+ support
Diffstat (limited to 'libAACenc/src/aacenc_tns.cpp')
-rw-r--r--libAACenc/src/aacenc_tns.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/libAACenc/src/aacenc_tns.cpp b/libAACenc/src/aacenc_tns.cpp
index 9a07e8f..d0ff6ac 100644
--- a/libAACenc/src/aacenc_tns.cpp
+++ b/libAACenc/src/aacenc_tns.cpp
@@ -166,6 +166,22 @@ static const TNS_MAX_TAB_ENTRY tnsMaxBandsTab1024[] =
{ 8000, { 39, 14}}
};
+static const TNS_MAX_TAB_ENTRY tnsMaxBandsTab960[] =
+{
+ { 96000, { 31, 9}},
+ { 88200, { 31, 9}},
+ { 64000, { 34, 10}},
+ { 48000, { 49, 14}},
+ { 44100, { 49, 14}},
+ { 32000, { 49, 14}},
+ { 24000, { 46, 15}},
+ { 22050, { 46, 14}},
+ { 16000, { 46, 15}},
+ { 12000, { 42, 15}},
+ { 11025, { 42, 15}},
+ { 8000, { 40, 15}}
+};
+
static const TNS_MAX_TAB_ENTRY tnsMaxBandsTab480[] =
{
{ 48000, { 31, -1}},
@@ -261,6 +277,10 @@ static INT getTnsMaxBands(
int maxBandsTabSize = 0;
switch (granuleLength) {
+ case 960:
+ pMaxBandsTab = tnsMaxBandsTab960;
+ maxBandsTabSize = sizeof(tnsMaxBandsTab960)/sizeof(TNS_MAX_TAB_ENTRY);
+ break;
case 1024:
pMaxBandsTab = tnsMaxBandsTab1024;
maxBandsTabSize = sizeof(tnsMaxBandsTab1024)/sizeof(TNS_MAX_TAB_ENTRY);
@@ -386,6 +406,7 @@ AAC_ENCODER_ERROR FDKaacEnc_InitTnsConfiguration(INT bitRate,
tC->lpcStopLine = pC->sfbOffset[tC->lpcStopBand];
switch (granuleLength) {
+ case 960:
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);