summaryrefslogtreecommitdiffstats
path: root/libAACdec/src/aacdecoder.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2012-11-01 11:08:03 +0200
committerMartin Storsjo <martin@martin.st>2012-11-01 11:08:03 +0200
commit54dfe1ec6972ca0d56dcb671448f84fea5e37e35 (patch)
tree5d26aa077f3aa32d3e5113546abc5a4219332640 /libAACdec/src/aacdecoder.cpp
parentfea3c1d0ffaf5975bb15462e11edf9c7a664890d (diff)
parent6ab36997af5d5acda4f21d33031f4e45c85f96b7 (diff)
downloadfdk-aac-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.tar.gz
fdk-aac-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.tar.bz2
fdk-aac-54dfe1ec6972ca0d56dcb671448f84fea5e37e35.zip
Merge remote-tracking branch 'aosp/jb-mr1-release' into master
Conflicts: libAACenc/src/band_nrg.cpp libAACenc/src/grp_data.cpp libSBRenc/src/env_est.cpp
Diffstat (limited to 'libAACdec/src/aacdecoder.cpp')
-rw-r--r--libAACdec/src/aacdecoder.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/libAACdec/src/aacdecoder.cpp b/libAACdec/src/aacdecoder.cpp
index 4cf1391..8d3c18d 100644
--- a/libAACdec/src/aacdecoder.cpp
+++ b/libAACdec/src/aacdecoder.cpp
@@ -865,6 +865,17 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_Init(HANDLE_AACDECODER self, const CS
self->chMapping[ch] = 255;
}
}
+ #ifdef TP_PCE_ENABLE
+ else {
+ if (CProgramConfig_IsValid(&asc->m_progrConfigElement)) {
+ /* Set matrix mixdown infos if available from PCE. */
+ pcmDmx_SetMatrixMixdownFromPce ( self->hPcmUtils,
+ asc->m_progrConfigElement.MatrixMixdownIndexPresent,
+ asc->m_progrConfigElement.MatrixMixdownIndex,
+ asc->m_progrConfigElement.PseudoSurroundEnable );
+ }
+ }
+ #endif
self->streamInfo.channelConfig = asc->m_channelConfiguration;
@@ -1565,7 +1576,7 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_DecodeFrame(
self->streamInfo.numChannels = aacChannels;
#ifdef TP_PCE_ENABLE
- if (pceRead == 1 || CProgramConfig_IsValid(pce)) {
+ if (pceRead == 1 && CProgramConfig_IsValid(pce)) {
/* Set matrix mixdown infos if available from PCE. */
pcmDmx_SetMatrixMixdownFromPce ( self->hPcmUtils,
pce->MatrixMixdownIndexPresent,
@@ -1646,10 +1657,6 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_DecodeFrame(
self->sbrEnabled
);
- if ( flags&AACDEC_FLUSH ) {
- FDKmemclear(pAacDecoderChannelInfo->pSpectralCoefficient, sizeof(FIXP_DBL)*self->streamInfo.aacSamplesPerFrame);
- }
-
switch (pAacDecoderChannelInfo->renderMode)
{
case AACDEC_RENDER_IMDCT:
@@ -1677,6 +1684,7 @@ LINKSPEC_CPP AAC_DECODER_ERROR CAacDecoder_DecodeFrame(
break;
}
if ( flags&AACDEC_FLUSH ) {
+ FDKmemclear(pAacDecoderChannelInfo->pSpectralCoefficient, sizeof(FIXP_DBL)*self->streamInfo.aacSamplesPerFrame);
FDKmemclear(self->pAacDecoderStaticChannelInfo[c]->pOverlapBuffer, OverlapBufferSize*sizeof(FIXP_DBL));
}
}