summaryrefslogtreecommitdiffstats
path: root/fdk-aac/libSACdec/src/sac_dec_lib.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-01 14:42:00 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2021-06-01 14:42:00 +0200
commite0835d4cbde8e3b61b0c965afcd41f8f4b7ac121 (patch)
treef49619fc806249da71afaf2ac14f99e088d24153 /fdk-aac/libSACdec/src/sac_dec_lib.cpp
parent5ad4acef6721a67b8156cd6f7b45ad59849ca09b (diff)
downloadODR-AudioEnc-e0835d4cbde8e3b61b0c965afcd41f8f4b7ac121.tar.gz
ODR-AudioEnc-e0835d4cbde8e3b61b0c965afcd41f8f4b7ac121.tar.bz2
ODR-AudioEnc-e0835d4cbde8e3b61b0c965afcd41f8f4b7ac121.zip
Update fdk to v2.0.2
Diffstat (limited to 'fdk-aac/libSACdec/src/sac_dec_lib.cpp')
-rw-r--r--fdk-aac/libSACdec/src/sac_dec_lib.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/fdk-aac/libSACdec/src/sac_dec_lib.cpp b/fdk-aac/libSACdec/src/sac_dec_lib.cpp
index bf6dedf..57446f8 100644
--- a/fdk-aac/libSACdec/src/sac_dec_lib.cpp
+++ b/fdk-aac/libSACdec/src/sac_dec_lib.cpp
@@ -1,7 +1,7 @@
/* -----------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
-© Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten
+© Copyright 1995 - 2019 Fraunhofer-Gesellschaft zur Förderung der angewandten
Forschung e.V. All rights reserved.
1. INTRODUCTION
@@ -1507,15 +1507,17 @@ bail:
}
int mpegSurroundDecoder_Apply(CMpegSurroundDecoder *pMpegSurroundDecoder,
- INT_PCM *input, PCM_MPS *pTimeData,
+ PCM_MPS *input, PCM_MPS *pTimeData,
const int timeDataSize, int timeDataFrameSize,
int *nChannels, int *frameSize, int sampleRate,
AUDIO_OBJECT_TYPE coreCodec,
AUDIO_CHANNEL_TYPE channelType[],
UCHAR channelIndices[],
- const FDK_channelMapDescr *const mapDescr) {
+ const FDK_channelMapDescr *const mapDescr,
+ const INT inDataHeadroom, INT *outDataHeadroom) {
SACDEC_ERROR err = MPS_OK;
PCM_MPS *pTimeOut = pTimeData;
+ PCM_MPS *TDinput = NULL;
UINT initControlFlags = 0, controlFlags = 0;
int timeDataRequiredSize = 0;
int newData;
@@ -1534,6 +1536,9 @@ int mpegSurroundDecoder_Apply(CMpegSurroundDecoder *pMpegSurroundDecoder,
return MPS_NOTOK;
}
+ pMpegSurroundDecoder->pSpatialDec->sacInDataHeadroom = inDataHeadroom;
+ *outDataHeadroom = (INT)(8);
+
pMpegSurroundDecoder->pSpatialDec->pConfigCurrent =
&pMpegSurroundDecoder
->spatialSpecificConfig[pMpegSurroundDecoder->bsFrameDecode];
@@ -1682,8 +1687,7 @@ int mpegSurroundDecoder_Apply(CMpegSurroundDecoder *pMpegSurroundDecoder,
(timeDataFrameSize *
pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsSynthesis) /
pMpegSurroundDecoder->pQmfDomain->globalConf.nBandsAnalysis;
- pMpegSurroundDecoder->pQmfDomain->globalConf.TDinput =
- pTimeData + timeDataFrameSizeOut - timeDataFrameSize;
+ TDinput = pTimeData + timeDataFrameSizeOut - timeDataFrameSize;
for (int i = *nChannels - 1; i >= 0; i--) {
FDKmemmove(pTimeData + (i + 1) * timeDataFrameSizeOut - timeDataFrameSize,
pTimeData + timeDataFrameSize * i,
@@ -1694,8 +1698,8 @@ int mpegSurroundDecoder_Apply(CMpegSurroundDecoder *pMpegSurroundDecoder,
} else {
if (pMpegSurroundDecoder->mpegSurroundUseTimeInterface) {
FDKmemcpy(input, pTimeData,
- sizeof(INT_PCM) * (*nChannels) * (*frameSize));
- pMpegSurroundDecoder->pQmfDomain->globalConf.TDinput = input;
+ sizeof(PCM_MPS) * (*nChannels) * (*frameSize));
+ TDinput = input;
}
}
@@ -1707,8 +1711,8 @@ int mpegSurroundDecoder_Apply(CMpegSurroundDecoder *pMpegSurroundDecoder,
&pMpegSurroundDecoder->bsFrames[pMpegSurroundDecoder->bsFrameDecode],
pMpegSurroundDecoder->mpegSurroundUseTimeInterface ? INPUTMODE_TIME
: INPUTMODE_QMF_SBR,
- pMpegSurroundDecoder->pQmfDomain->globalConf.TDinput, NULL, NULL,
- pTimeOut, *frameSize, &controlFlags, *nChannels, mapDescr);
+ TDinput, NULL, NULL, pTimeOut, *frameSize, &controlFlags, *nChannels,
+ mapDescr);
*nChannels = pMpegSurroundDecoder->pSpatialDec->numOutputChannelsAT;
if (err !=
@@ -1781,7 +1785,7 @@ void mpegSurroundDecoder_Close(CMpegSurroundDecoder *pMpegSurroundDecoder) {
}
#define SACDEC_VL0 2
-#define SACDEC_VL1 0
+#define SACDEC_VL1 1
#define SACDEC_VL2 0
int mpegSurroundDecoder_GetLibInfo(LIB_INFO *info) {
@@ -1800,7 +1804,7 @@ int mpegSurroundDecoder_GetLibInfo(LIB_INFO *info) {
info += i;
info->module_id = FDK_MPSDEC;
-#ifdef __ANDROID__
+#ifdef SUPPRESS_BUILD_DATE_INFO
info->build_date = "";
info->build_time = "";
#else