summaryrefslogtreecommitdiffstats
path: root/libAACenc/src/psy_configuration.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-12-23 17:40:43 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-12-23 17:40:43 +0100
commit9610ae6cb3fdca806d92eaea20f2fff33c4915c9 (patch)
treeabcb2ff21e307d51f445f88ec3129ec7e35bd1d7 /libAACenc/src/psy_configuration.cpp
parentb7b1129d65218b63045e1518b11bd1faa46f72af (diff)
parentbe56dcde84b8d25ff7c06ab464afdb06f3c0e832 (diff)
downloadODR-AudioEnc-9610ae6cb3fdca806d92eaea20f2fff33c4915c9.tar.gz
ODR-AudioEnc-9610ae6cb3fdca806d92eaea20f2fff33c4915c9.tar.bz2
ODR-AudioEnc-9610ae6cb3fdca806d92eaea20f2fff33c4915c9.zip
Merge remote-tracking branch 'coinchon/next' into next
Diffstat (limited to 'libAACenc/src/psy_configuration.cpp')
-rw-r--r--libAACenc/src/psy_configuration.cpp104
1 files changed, 96 insertions, 8 deletions
diff --git a/libAACenc/src/psy_configuration.cpp b/libAACenc/src/psy_configuration.cpp
index 136e90a..3533231 100644
--- a/libAACenc/src/psy_configuration.cpp
+++ b/libAACenc/src/psy_configuration.cpp
@@ -132,6 +132,27 @@ const SFB_PARAM_SHORT p_FDKaacEnc_8000_short_120 = {
{ 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 16, 20, 12 }
};
+const SFB_PARAM_LONG p_FDKaacEnc_11025_long_960 = {
+ 42,
+ { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24,
+ 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_11025_short_120 = {
+ 15,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 12 }
+};
+
+const SFB_PARAM_LONG p_FDKaacEnc_12000_long_960 = {
+ 42,
+ { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12,
+ 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 20, 20, 20, 24,
+ 24, 28, 28, 32, 36, 40, 40, 44, 48, 52, 56, 60, 64, 64 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_12000_short_120 = {
+ 15,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 12 }
+};
const SFB_PARAM_LONG p_FDKaacEnc_16000_long_960 = {
42,
@@ -144,6 +165,18 @@ const SFB_PARAM_SHORT p_FDKaacEnc_16000_short_120 = {
{ 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 12, 12, 16, 20, 12 }
};
+const SFB_PARAM_LONG p_FDKaacEnc_22050_long_960 = {
+ 46,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16,
+ 20, 20, 24, 24, 28, 28, 32, 36, 36, 40, 44, 48, 52, 52,
+ 64, 64, 64, 64 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_22050_short_120 = {
+ 15,
+ { 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 12 }
+};
+
const SFB_PARAM_LONG p_FDKaacEnc_24000_long_960 = {
46,
{ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8,
@@ -156,11 +189,30 @@ const SFB_PARAM_SHORT p_FDKaacEnc_24000_short_120 = {
{ 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 16, 16, 12 }
};
+const SFB_PARAM_LONG p_FDKaacEnc_32000_long_960 = {
+ 49,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 8, 8, 12, 12, 12,
+ 12, 16, 16, 20, 20, 24, 24, 28, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32, 32, 32 }
+};
+
const SFB_PARAM_SHORT p_FDKaacEnc_32000_short_120 = {
14,
- { 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16 }
+ { 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 8 }
};
+const SFB_PARAM_LONG p_FDKaacEnc_44100_long_960 = {
+ 49,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8,
+ 8, 8, 8, 12, 12, 12, 12, 16, 16, 20, 20, 24, 24, 28,
+ 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
+ 32, 32, 32, 32, 32, 32, 32 }
+};
+
+const SFB_PARAM_SHORT p_FDKaacEnc_44100_short_120 = {
+ 14,
+ { 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 8 }
+};
const SFB_PARAM_LONG p_FDKaacEnc_48000_long_960 = {
49,
@@ -174,15 +226,51 @@ const SFB_PARAM_SHORT p_FDKaacEnc_48000_short_120 = {
{ 4, 4, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 8 }
};
-//TODO: add others
+const SFB_PARAM_LONG p_FDKaacEnc_64000_long_960 = {
+ 46,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12,
+ 12, 16, 16, 16, 20, 24, 24, 28, 36, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
+ 40, 40, 40, 40, 40, 16 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_64000_short_120 = {
+ 12,
+ { 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 28 }
+};
+
+const SFB_PARAM_LONG p_FDKaacEnc_88200_long_960 = {
+ 40,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12,
+ 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_88200_short_120 = {
+ 12,
+ { 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 28 }
+};
+
+const SFB_PARAM_LONG p_FDKaacEnc_96000_long_960 = {
+ 40,
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8, 12,
+ 12, 12, 12, 12, 16, 16, 24, 28, 36, 44, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }
+};
+const SFB_PARAM_SHORT p_FDKaacEnc_96000_short_120 = {
+ 12,
+ { 4, 4, 4, 4, 4, 4, 8, 8, 8, 16, 28, 28 }
+};
+
+
static const SFB_INFO_TAB sfbInfoTab960[] = {
{ 8000, &p_FDKaacEnc_8000_long_960, &p_FDKaacEnc_8000_short_120},
+ {11025, &p_FDKaacEnc_11025_long_960, &p_FDKaacEnc_11025_short_120},
+ {12000, &p_FDKaacEnc_12000_long_960, &p_FDKaacEnc_12000_short_120},
{16000, &p_FDKaacEnc_16000_long_960, &p_FDKaacEnc_16000_short_120},
- {22050, &p_FDKaacEnc_24000_long_960, &p_FDKaacEnc_24000_short_120},
+ {22050, &p_FDKaacEnc_22050_long_960, &p_FDKaacEnc_22050_short_120},
{24000, &p_FDKaacEnc_24000_long_960, &p_FDKaacEnc_24000_short_120},
- {32000, &p_FDKaacEnc_48000_long_960, &p_FDKaacEnc_32000_short_120},
- {44100, &p_FDKaacEnc_48000_long_960, &p_FDKaacEnc_48000_short_120},
+ {32000, &p_FDKaacEnc_32000_long_960, &p_FDKaacEnc_32000_short_120},
+ {44100, &p_FDKaacEnc_44100_long_960, &p_FDKaacEnc_44100_short_120},
{48000, &p_FDKaacEnc_48000_long_960, &p_FDKaacEnc_48000_short_120},
+ {64000, &p_FDKaacEnc_64000_long_960, &p_FDKaacEnc_64000_short_120},
+ {88200, &p_FDKaacEnc_88200_long_960, &p_FDKaacEnc_88200_short_120},
+ {96000, &p_FDKaacEnc_96000_long_960, &p_FDKaacEnc_96000_short_120},
};
@@ -378,13 +466,13 @@ static FIXP_DBL FDKaacEnc_BarcLineValue(INT noOfLines, INT fftLine, LONG samplin
center_freq = center_freq << 2; /* q13 */
break;
case 960:
- center_freq = fMult(center_freq, INV480) << 3;
+ center_freq = fMult(center_freq, INV480) << 3;
break;
case 128:
center_freq = center_freq << 5; /* q13 */
break;
case 120:
- center_freq = fMult(center_freq, INV480) << 6;
+ center_freq = fMult(center_freq, INV480) << 6;
break;
case 512:
center_freq = (fftLine * samplingFreq) << 3; // q13
@@ -582,7 +670,7 @@ static void FDKaacEnc_initMinSnr(const LONG bitrate,
pePerWindow = fMult(pePerWindow, FL2FXCONST_DBL(480.f/512.f));
break;
case 960:
- pePerWindow = fMult(pePerWindow, FL2FXCONST_DBL(960.f/1024.f));
+ pePerWindow = fMult(pePerWindow, FL2FXCONST_DBL(960.f/1024.f));
qperwin = qperwin - 10;
break;
case 120: