clean redundant checks in decoder
This commit is contained in:
parent
8492aac917
commit
f589c580eb
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user