aboutsummaryrefslogtreecommitdiffstats
path: root/libPCMutils
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2012-10-02 10:16:04 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2012-10-02 10:46:47 -0700
commit6ab36997af5d5acda4f21d33031f4e45c85f96b7 (patch)
tree4696e6feca7d1243bb9e90da7699b00d8f026441 /libPCMutils
parented8b5a747e97c9b8b029ba6485e33f3aad081652 (diff)
downloadfdk-aac-dabplus-6ab36997af5d5acda4f21d33031f4e45c85f96b7.tar.gz
fdk-aac-dabplus-6ab36997af5d5acda4f21d33031f4e45c85f96b7.tar.bz2
fdk-aac-dabplus-6ab36997af5d5acda4f21d33031f4e45c85f96b7.zip
Bug 7170947 Update AAC codec
From Fraunhofer: * AAC Decoder - Stick to the written MPEG standard instead of the MPEG reference software in terms of reference level normalization. Always set the program reference level equal to the target level. This disables level normalization using a default level for streams without embedded metadata. Modified file(s): libAACdec\src\aacdec_drc.cpp - Fix downmix channel assignment when using a WAV output channel ordering. Modified file(s): libPCMutils\src\pcmutils_lib.cpp - Retain signal accuracy and prevent LSB alteration when no level correction needs to be done. Modified file(s): libAACdec\src\aacdec_drc.h libAACdec\src\aacdec_drc.cpp libSBRdec\src\sbrdecoder.cpp libSBRdec\src\sbr_dec.cpp libSBRdec\src\sbrdec_drc.cpp - Align metadata processing with reference implementation. Modified file(s): libAACdec\src\aacdec_drc.h libAACdec\src\aacdecoder.cpp * AAC-Encoder - Prevent potential overflow in energy calculation after TNS processing. Modified file(s): libAACenc\src\band_nrg.cpp - Added saturation for number of relevant lines which are used in pe calculation. Modified file(s): libAACenc\src\line_pe.cpp - Removed obsolete files. Deleded file(s): libAACenc\src\tns_param.h libAACenc\src\tns_param.cpp * FDK-Library - Added x86 Count Leading Zeros intrinsic. Modified file(s): libFDK\include\clz.h Added file(s): libFDK\include\x86\clz_x86.h - Fixed compilation for MIPS GCC-4.4 and higher. Modified file(s): libFDK\include\mips\cplx_mul.h libFDK\include\mips\fixmul_mips.h Change-Id: I4be65f07f88d412224c7fddc3f054e8f451176cc
Diffstat (limited to 'libPCMutils')
-rw-r--r--libPCMutils/src/pcmutils_lib.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libPCMutils/src/pcmutils_lib.cpp b/libPCMutils/src/pcmutils_lib.cpp
index 4272548..e0a9817 100644
--- a/libPCMutils/src/pcmutils_lib.cpp
+++ b/libPCMutils/src/pcmutils_lib.cpp
@@ -96,7 +96,7 @@ amm-info@iis.fraunhofer.de
/* Decoder library info */
#define PCMDMX_LIB_VL0 2
-#define PCMDMX_LIB_VL1 2
+#define PCMDMX_LIB_VL1 3
#define PCMDMX_LIB_VL2 1
#define PCMDMX_LIB_TITLE "PCM Downmix Lib"
#define PCMDMX_LIB_BUILD_DATE __DATE__
@@ -107,7 +107,7 @@ amm-info@iis.fraunhofer.de
#define PCM_DMX_MAX_CHANNELS ( 8 )
#define PCM_DMX_MAX_CHANNEL_GROUPS ( 4 )
#define PCM_DMX_MAX_CHANNELS_PER_GROUP ( 3 ) /* The maximum over all groups */
-#define PCMDMX_DFLT_EXPIRY_FRAME ( 40 ) /* At least 400ms (FL 960 @ 96kHz) */
+#define PCMDMX_DFLT_EXPIRY_FRAME ( 50 ) /* At least 500ms (FL 960 @ 96kHz) */
/* Fixed and unique channel group indices.
* The last group index has to be smaller than PCM_DMX_MAX_CHANNEL_GROUPS. */
@@ -264,7 +264,6 @@ C_ALLOC_MEM_STATIC(PcmDmxInstance, struct PCM_DMX_INSTANCE, 1)
* @param [in] The total number of channels of the given configuration.
* @param [in] Array holding the corresponding channel types for each channel.
* @param [in] Array holding the corresponding channel type indices for each channel.
- * @param [in] Array containing the channel mapping to be used (From MPEG PCE ordering to whatever is required).
* @param [out] Array where the buffer offsets for each channel are stored into.
* @returns Returns the packed channel mode.
**/
@@ -273,7 +272,6 @@ PCM_DMX_CHANNEL_MODE getChannelMode (
const INT numChannels, /* in */
const AUDIO_CHANNEL_TYPE channelType[], /* in */
const UCHAR channelIndices[], /* in */
- const UCHAR channelMapping[PCM_DMX_MAX_CHANNELS], /* in */
UCHAR offsetTable[PCM_DMX_MAX_CHANNELS] /* out */
)
{
@@ -284,12 +282,12 @@ PCM_DMX_CHANNEL_MODE getChannelMode (
FDK_ASSERT(channelType != NULL);
FDK_ASSERT(channelIndices != NULL);
- FDK_ASSERT(channelMapping != NULL);
FDK_ASSERT(offsetTable != NULL);
/* For details see ISO/IEC 13818-7:2005(E), 8.5.3 Channel configuration */
FDKmemclear(numChInGrp, PCM_DMX_MAX_CHANNEL_GROUPS*sizeof(UCHAR));
FDKmemset(offsetTable, 255, PCM_DMX_MAX_CHANNELS*sizeof(UCHAR));
+ FDKmemset(chIdx, 255, PCM_DMX_MAX_CHANNEL_GROUPS*PCM_DMX_MAX_CHANNELS_PER_GROUP*sizeof(UCHAR));
/* Categorize channels */
for (ch = 0; ch < numChannels; ch += 1) {
@@ -335,7 +333,7 @@ PCM_DMX_CHANNEL_MODE getChannelMode (
if (numChInGrp[CH_GROUP_FRONT] & 0x1) {
/* Odd number of front channels -> we have a center channel.
In MPEG-4 the center has the index 0. */
- offsetTable[CENTER_FRONT_CHANNEL] = channelMapping[chIdx[CH_GROUP_FRONT][0]];
+ offsetTable[CENTER_FRONT_CHANNEL] = chIdx[CH_GROUP_FRONT][0];
}
for (grpIdx = 0; grpIdx < PCM_DMX_MAX_CHANNEL_GROUPS; grpIdx += 1) {
@@ -367,7 +365,7 @@ PCM_DMX_CHANNEL_MODE getChannelMode (
for ( ; ch < numChInGrp[grpIdx]; ch += 1) {
if (ch < maxChannels) {
- offsetTable[chMapPos] = channelMapping[chIdx[grpIdx][ch]];
+ offsetTable[chMapPos] = chIdx[grpIdx][ch];
chMapPos += 1;
} else {
err = -1;
@@ -814,7 +812,6 @@ PCMDMX_ERROR pcmDmx_ApplyFrame (
numInChannels,
channelType,
channelIndices,
- channelMapping[numInChannels],
inOffsetTable
);
if (inChMode == CH_MODE_UNDEFINED) {