ref: d1fc0024309c459d7ae6118a67bdb3eb4b2e3645
parent: 96de6e01587666ef58f4eee5fdf6ba3f057185ef
parent: 646f3e92deae4f56f5712783ad827e023ef7925b
author: zhilwang <zhilwang@cisco.com>
date: Fri Aug 28 13:22:36 EDT 2015
Merge pull request #2091 from HaiboZhu/Bugfix_CheckRefPicturesComplete_FMO_enable Fix the bug that calculate mbAddr error when FMO enable
--- a/codec/decoder/core/src/decoder_core.cpp
+++ b/codec/decoder/core/src/decoder_core.cpp
@@ -2446,10 +2446,9 @@
bool CheckRefPicturesComplete (PWelsDecoderContext pCtx) {
// Multi Reference, RefIdx may differ
bool bAllRefComplete = true;
- int32_t iRealMbIdx;
+ int32_t iRealMbIdx = pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice;
for (int32_t iMbIdx = 0; bAllRefComplete
&& iMbIdx < pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.iTotalMbInCurSlice; iMbIdx++) {
- iRealMbIdx = pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice + iMbIdx;
switch (pCtx->pCurDqLayer->pMbType[iRealMbIdx]) {
case MB_TYPE_SKIP:
case MB_TYPE_16x16:
@@ -2477,6 +2476,8 @@
default:
break;
}
+ iRealMbIdx = (pCtx->pPps->uiNumSliceGroups > 1) ? FmoNextMb (pCtx->pFmo, iRealMbIdx) :
+ (pCtx->pCurDqLayer->sLayerInfo.sSliceInLayer.sSliceHeaderExt.sSliceHeader.iFirstMbInSlice + iMbIdx);
}
return bAllRefComplete;
}