aboutsummaryrefslogtreecommitdiffstats
path: root/libAACenc/src/aacenc_lib.cpp
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2013-08-08 18:32:55 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2013-08-20 15:31:42 -0700
commit16c472c201c197d3660334df5952eb4084897f9f (patch)
tree33f6729a47fb3a6021e9a6f6bc2c330fb17924e3 /libAACenc/src/aacenc_lib.cpp
parenta84864deb7c36b88f104f3116552d52d1ce64045 (diff)
downloadfdk-aac-dabplus-16c472c201c197d3660334df5952eb4084897f9f.tar.gz
fdk-aac-dabplus-16c472c201c197d3660334df5952eb4084897f9f.tar.bz2
fdk-aac-dabplus-16c472c201c197d3660334df5952eb4084897f9f.zip
AAC encoder metadata improvement
AAC-Encoder - Introduce metadata support for parametric stereo audio object type. Write metadata matrix mixdown coefficient only for channel config 5 and 6. Modified file(s): libAACenc/src/aacenc_lib.cpp - Revise metadata encoder downmix gain and fix matrix mixdown coefficient. Modified file(s): libAACenc/src/aacenc_lib.cpp libAACenc/src/metadata_compressor.cpp libMpegTPEnc/src/tpenc_asc.cpp libMpegTPEnc/src/tpenc_lib.cpp libMpegTPEnc/src/version Bug 9428126 Change-Id: I87f5f1a1fdddd8223187aa0f9dc733e0ecc3e7e4
Diffstat (limited to 'libAACenc/src/aacenc_lib.cpp')
-rw-r--r--libAACenc/src/aacenc_lib.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/libAACenc/src/aacenc_lib.cpp b/libAACenc/src/aacenc_lib.cpp
index 161ed1c..a256f05 100644
--- a/libAACenc/src/aacenc_lib.cpp
+++ b/libAACenc/src/aacenc_lib.cpp
@@ -98,7 +98,7 @@ amm-info@iis.fraunhofer.de
/* Encoder library info */
#define AACENCODER_LIB_VL0 3
#define AACENCODER_LIB_VL1 4
-#define AACENCODER_LIB_VL2 6
+#define AACENCODER_LIB_VL2 7
#define AACENCODER_LIB_TITLE "AAC Encoder"
#define AACENCODER_LIB_BUILD_DATE __DATE__
#define AACENCODER_LIB_BUILD_TIME __TIME__
@@ -759,6 +759,7 @@ AACENC_ERROR FDKaacEnc_AdjustEncSettings(HANDLE_AACENCODER hAacEncoder,
/* Allow metadata support */
case AOT_AAC_LC:
case AOT_SBR:
+ case AOT_PS:
hAacEncoder->metaDataAllowed = 1;
if (((INT)hAacConfig->channelMode < 1) || ((INT)hAacConfig->channelMode > 7)) {
config->userMetaDataMode = 0;
@@ -1337,8 +1338,12 @@ AACENC_ERROR aacEncEncode(
for (i=0; i<(INT)nMetaDataExtensions; i++) { /* Get meta data extension payload. */
hAacEncoder->extPayload[nExtensions++] = pMetaDataExtPayload[i];
}
- if (matrix_mixdown_idx!=-1) { /* Set matrix mixdown coefficient. */
- UINT pceValue = (UINT)( (1<<3) | ((matrix_mixdown_idx&0x2)<<1) | 1 );
+
+ if ( (matrix_mixdown_idx!=-1)
+ && ((hAacEncoder->extParam.userChannelMode==MODE_1_2_2)||(hAacEncoder->extParam.userChannelMode==MODE_1_2_2_1)) )
+ {
+ /* Set matrix mixdown coefficient. */
+ UINT pceValue = (UINT)( (1<<3) | ((matrix_mixdown_idx&0x3)<<1) | 1 );
if (hAacEncoder->extParam.userPceAdditions != pceValue) {
hAacEncoder->extParam.userPceAdditions = pceValue;
hAacEncoder->InitFlags |= AACENC_INIT_TRANSPORT;