Remove the SPS/PPS exist ahead reset logic and change the CheckSpsActive logic

This commit is contained in:
Haibo Zhu
2014-11-19 17:13:25 -08:00
parent f48b2e55ba
commit aa5e7f7927
5 changed files with 14 additions and 40 deletions

View File

@@ -790,6 +790,14 @@ bool CheckSpsActive (PWelsDecoderContext pCtx, PSps pSps) {
if (pCtx->pActiveLayerSps[i] == pSps)
return true;
}
// Pre-active, will be used soon
if (pSps->iMbWidth > 0 && pSps->iMbHeight > 0 && pCtx->bSpsAvailFlags[pSps->iSpsId]
&& pCtx->pAccessUnitList->uiAvailUnitsNum > 0) {
PSps pNextUsedSps =
pCtx->pAccessUnitList->pNalUnitsList[pCtx->pAccessUnitList->uiStartPos]->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader.pSps;
if (pNextUsedSps->iSpsId == pSps->iSpsId)
return true;
}
return false;
}