History

unify spsid for pic and add check for mb_qp_delta

huili2 committed 11 years ago

Commit 208400e1 parent 030d3202 files · +9 −4Browse files

Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 2 files). Show all

Unified · Split

codec/decoder/core/src/decode_slice.cpp+5−2
@@ -79,8 +79,8 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) { · 78 unmodified lines
7979 pCurLayer->iMbXyIndex = iNextMbXyIndex;
8080
8181 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;
8484
8585 pCurLayer->pDec->uiQualityId = pCurLayer->sLayerInfo.sNalHeaderExt.uiQualityId;
8686 }
@@ -744,6 +744,9 @@ int32_t WelsDecodeMbCabacPSliceBaseMode0 (PWelsDecoderContext pCtx, PWelsNeighAv · 657 unmodified lines
744744 int32_t iQpDelta, iId8x8, iId4x4;
745745
746746 WELS_READ_VERIFY (ParseDeltaQpCabac (pCtx, iQpDelta));
747+ if (iQpDelta > 25 || iQpDelta < -26) { //out of iQpDelta range
748+ return ERR_INFO_INVALID_QP;
749+ }
747750 pCurLayer->pLumaQp[iMbXy] = (pSlice->iLastMbQp + iQpDelta + 52) % 52; //update last_mb_qp
748751 pSlice->iLastMbQp = pCurLayer->pLumaQp[iMbXy];
749752 pCurLayer->pChromaQp[iMbXy] = g_kuiChromaQpTable[WELS_CLIP3 (pSlice->iLastMbQp +

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t