aboutsummaryrefslogtreecommitdiffstats
path: root/libSBRdec
diff options
context:
space:
mode:
authorFraunhofer IIS FDK <audio-fdk@iis.fraunhofer.de>2018-10-19 16:42:53 +0200
committerJean-Michel Trivi <jmtrivi@google.com>2018-12-27 17:31:46 -0500
commit55d2c9582ad0698deb885440e0e5db48bdc1ed24 (patch)
tree241cb02467e22336716d8b25d5304f2e1af11b23 /libSBRdec
parent82383e3212cb5ec84dd403a44ee4c01193961c8f (diff)
downloadfdk-aac-55d2c9582ad0698deb885440e0e5db48bdc1ed24.tar.gz
fdk-aac-55d2c9582ad0698deb885440e0e5db48bdc1ed24.tar.bz2
fdk-aac-55d2c9582ad0698deb885440e0e5db48bdc1ed24.zip
Extend PS concealment/error treatment
Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I19b87d33b1d0ed8b43b4ea57992f1c6df500d9f4
Diffstat (limited to 'libSBRdec')
-rw-r--r--libSBRdec/src/psbitdec.cpp8
-rw-r--r--libSBRdec/src/psdec.h6
2 files changed, 13 insertions, 1 deletions
diff --git a/libSBRdec/src/psbitdec.cpp b/libSBRdec/src/psbitdec.cpp
index f40a156..82bb65b 100644
--- a/libSBRdec/src/psbitdec.cpp
+++ b/libSBRdec/src/psbitdec.cpp
@@ -312,6 +312,7 @@ int DecodePs(struct PS_DEC *h_ps_d, /*!< PS handle */
if (pBsData->bEnableIid) {
pBsData->bFineIidQ = h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ;
+ pBsData->freqResIid = h_ps_d->specificTo.mpeg.prevFreqResIid;
for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
pBsData->aaIidIndex[pBsData->noEnv - 1][gr] =
h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr];
@@ -323,6 +324,7 @@ int DecodePs(struct PS_DEC *h_ps_d, /*!< PS handle */
}
if (pBsData->bEnableIcc) {
+ pBsData->freqResIcc = h_ps_d->specificTo.mpeg.prevFreqResIcc;
for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
pBsData->aaIccIndex[pBsData->noEnv - 1][gr] =
h_ps_d->specificTo.mpeg.aIccPrevFrameIndex[gr];
@@ -337,6 +339,12 @@ int DecodePs(struct PS_DEC *h_ps_d, /*!< PS handle */
/* Update previous frame Iid quantization */
h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ = pBsData->bFineIidQ;
+ /* Update previous frequency resolution for IID */
+ h_ps_d->specificTo.mpeg.prevFreqResIid = pBsData->freqResIid;
+
+ /* Update previous frequency resolution for ICC */
+ h_ps_d->specificTo.mpeg.prevFreqResIcc = pBsData->freqResIcc;
+
/* Update previous frame index buffers */
for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr] =
diff --git a/libSBRdec/src/psdec.h b/libSBRdec/src/psdec.h
index 6ae1473..029eac4 100644
--- a/libSBRdec/src/psdec.h
+++ b/libSBRdec/src/psdec.h
@@ -275,7 +275,11 @@ struct PS_DEC {
SCHAR aIccPrevFrameIndex[NO_HI_RES_ICC_BINS]; /*!< The ICC index for
previous frame */
UCHAR
- bPrevFrameFineIidQ; /*!< The IID quantization of the previous frame */
+ bPrevFrameFineIidQ; /*!< The IID quantization of the previous frame */
+ UCHAR prevFreqResIid; /*!< Frequency resolution for IID of the previous
+ frame */
+ UCHAR prevFreqResIcc; /*!< Frequency resolution for ICC of the previous
+ frame */
UCHAR lastUsb; /*!< uppermost WMF delay band of last frame */
FIXP_DBL pHybridAnaStatesLFdmx