History

fix crash issue of sliceskip and inf-loop in fmo

huili2 committed 11 years ago

Commit 928a7ea1 parent a5cabf05 files · +5 −28Browse files

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

Unified · Split

codec/decoder/core/src/decode_slice.cpp+1−24
@@ -893,7 +893,7 @@ int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 892 unmodified lines
893893 int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNalUnit pNalCur) {
894894 PDqLayer pCurLayer = pCtx->pCurDqLayer;
895895 PFmo pFmo = pCtx->pFmo;
896− int32_t i, iRet;
896+ int32_t iRet;
897897 int32_t iNextMbXyIndex, iSliceIdc;
898898
899899 PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer;
@@ -957,29 +957,6 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNal · 57 unmodified lines
957957 pCurLayer->iMbY = iMbY;
958958 pCurLayer->iMbXyIndex = iNextMbXyIndex;
959959
960− if (pSliceHeaderExt->bSliceSkipFlag == 1) {
961− for (i = 0; i < (int32_t)pSliceHeaderExt->uiNumMbsInSlice; i++) {
962− pCurLayer->pSliceIdc[iNextMbXyIndex] = iSliceIdc;
963−
964−
965− pCurLayer->pResidualPredFlag[iNextMbXyIndex] = 1;
966−
967− if (pSliceHeaderExt->sSliceHeader.pPps->uiNumSliceGroups > 1) {
968− iNextMbXyIndex = FmoNextMb (pFmo, iNextMbXyIndex);
969− } else {
970− ++iNextMbXyIndex;
971− }
972−
973− iMbX = iNextMbXyIndex % pCurLayer->iMbWidth;
974− iMbY = iNextMbXyIndex % pCurLayer->iMbHeight;
975−
976− pCurLayer->iMbX = iMbX;
977− pCurLayer->iMbY = iMbY;
978− pCurLayer->iMbXyIndex = iNextMbXyIndex;
979− }
980− return 0;
981− }
982−
983960 do {
984961 if ((-1 == iNextMbXyIndex) || (iNextMbXyIndex >= kiCountNumMb)) { // slice group boundary or end of a frame
985962 break;

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