clean redundant checks in decoder

This commit is contained in:
Licai Guo 2014-03-13 23:56:54 -07:00
parent 8492aac917
commit f589c580eb
2 changed files with 0 additions and 16 deletions

View File

@ -357,15 +357,6 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNal
}
iNextMbXyIndex = pSliceHeader->iFirstMbInSlice;
if ((iNextMbXyIndex < 0) || (iNextMbXyIndex >= kiCountNumMb)) {
WelsLog (pCtx, WELS_LOG_ERROR,
"WelsDecodeSlice()::iFirstMbInSlice(%d) > pSps->kiTotalMb(%d). ERROR!!! resolution change....\n",
iNextMbXyIndex, kiCountNumMb);
pCtx->iErrorCode |= dsNoParamSets;
return dsNoParamSets;
}
iMbX = iNextMbXyIndex % pCurLayer->iMbWidth;
iMbY = iNextMbXyIndex / pCurLayer->iMbWidth; // error is introduced by multiple slices case, 11/23/2009
pSlice->iMbSkipRun = -1;

View File

@ -475,12 +475,6 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_NO_PARAM_SETS);
}
if (pPps->iSpsId >= MAX_SPS_COUNT) {
WelsLog (pCtx, WELS_LOG_WARNING, "iSpsId out of range\n");
return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_SPS_ID_OVERFLOW);
}
//add check SPS available here
if (kbExtensionFlag) {
pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId];
pSps = &pSubsetSps->sSps;
@ -495,7 +489,6 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co
}
pSps = &pCtx->sSpsBuffer[pPps->iSpsId];
}
pCtx->pSps = pSps;
pSliceHead->iPpsId = iPpsId;
pSliceHead->iSpsId = pPps->iSpsId;
pSliceHead->pPps = pPps;