Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 2 files). Show all
Unified · Split
| @@ -79,8 +79,8 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) { · 78 unmodified lines | ||
| 79 | 79 | pCurLayer->iMbXyIndex = iNextMbXyIndex; |
| 80 | 80 | |
| 81 | 81 | if (0 == iNextMbXyIndex) { |
| 82 | − pCurLayer->pDec->iSpsId = pSliceHeader->iSpsId; | |
| 83 | − pCurLayer->pDec->iPpsId = pSliceHeader->iPpsId; | |
| 82 | + pCurLayer->pDec->iSpsId = pCtx->pSps->iSpsId; | |
| 83 | + pCurLayer->pDec->iPpsId = pCtx->pPps->iPpsId; | |
| 84 | 84 | |
| 85 | 85 | pCurLayer->pDec->uiQualityId = pCurLayer->sLayerInfo.sNalHeaderExt.uiQualityId; |
| 86 | 86 | } |
| @@ -744,6 +744,9 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 657 unmodified lines | ||
| 744 | 744 | int32_t iQpDelta, iId8x8, iId4x4; |
| 745 | 745 | |
| 746 | 746 | WELS_READ_VERIFY (ParseDeltaQpCabac (pCtx, iQpDelta)); |
| 747 | + if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range | |
| 748 | + return ERR_INFO_INVALID_QP; | |
| 749 | + } | |
| 747 | 750 | pCurLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp |
| 748 | 751 | pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy]; |
| 749 | 752 | pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp + |