1
0
mirror of https://github.com/mstorsjo/fdk-aac.git synced 2025-01-24 12:51:12 +01:00

Extend PS concealment/error treatment

Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc

Change-Id: I19b87d33b1d0ed8b43b4ea57992f1c6df500d9f4
This commit is contained in:
Fraunhofer IIS FDK 2018-10-19 16:42:53 +02:00 committed by Jean-Michel Trivi
parent 82383e3212
commit 55d2c9582a
2 changed files with 13 additions and 1 deletions

View File

@ -312,6 +312,7 @@ int DecodePs(struct PS_DEC *h_ps_d, /*!< PS handle */
if (pBsData->bEnableIid) { if (pBsData->bEnableIid) {
pBsData->bFineIidQ = h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ; 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++) { for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
pBsData->aaIidIndex[pBsData->noEnv - 1][gr] = pBsData->aaIidIndex[pBsData->noEnv - 1][gr] =
h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[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) { if (pBsData->bEnableIcc) {
pBsData->freqResIcc = h_ps_d->specificTo.mpeg.prevFreqResIcc;
for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) { for (gr = 0; gr < NO_HI_RES_ICC_BINS; gr++) {
pBsData->aaIccIndex[pBsData->noEnv - 1][gr] = pBsData->aaIccIndex[pBsData->noEnv - 1][gr] =
h_ps_d->specificTo.mpeg.aIccPrevFrameIndex[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 */ /* Update previous frame Iid quantization */
h_ps_d->specificTo.mpeg.bPrevFrameFineIidQ = pBsData->bFineIidQ; 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 */ /* Update previous frame index buffers */
for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) { for (gr = 0; gr < NO_HI_RES_IID_BINS; gr++) {
h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr] = h_ps_d->specificTo.mpeg.aIidPrevFrameIndex[gr] =

View File

@ -275,7 +275,11 @@ struct PS_DEC {
SCHAR aIccPrevFrameIndex[NO_HI_RES_ICC_BINS]; /*!< The ICC index for SCHAR aIccPrevFrameIndex[NO_HI_RES_ICC_BINS]; /*!< The ICC index for
previous frame */ previous frame */
UCHAR 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 */ UCHAR lastUsb; /*!< uppermost WMF delay band of last frame */
FIXP_DBL pHybridAnaStatesLFdmx FIXP_DBL pHybridAnaStatesLFdmx