History

add flag to count EC Mbs due to ref error add UT

dong zhang committed 11 years ago

Commit 2c468b91 parent ecc8ae611 files · +69 −25Browse files

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

Unified · Split

codec/decoder/core/src/decode_slice.cpp+7−3
@@ -101,6 +101,7 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) { · 100 unmodified lines
101101 ++iCountNumMb;
102102 if (!pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex]) { //already con-ed, overwrite
103103 pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex] = true;
104+ pCtx->pDec->iMbEcedPropNum += (pCurLayer->pMbRefConcealedFlag[iNextMbXyIndex]? 1 : 0);
104105 ++pCtx->iTotalNumMbRec;
105106 }
106107
@@ -839,6 +840,7 @@ int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 732 unmodified lines
839840 PDqLayer pCurLayer = pCtx->pCurDqLayer;
840841 PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer;
841842 PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
843+ PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
842844 uint32_t uiCode;
843845 int32_t iMbXy = pCurLayer->iMbXyIndex;
844846 int32_t i;
@@ -861,7 +863,7 @@ int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 16 unmodified lines
861863
862864 pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0;
863865 memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16);
864−
866+ pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || !(ppRefPic[0]&&ppRefPic[0]->bIsComplete);
865867 //predict mv
866868 PredPSkipMvFromNeighbor (pCurLayer, pMv);
867869 for (i = 0; i < 16; i++) {
@@ -963,8 +965,9 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNal · 95 unmodified lines
963965 }
964966
965967 pCurLayer->pSliceIdc[iNextMbXyIndex] = iSliceIdc;
968+ pCtx->bMbRefConcealed = false;
966969 iRet = pDecMbFunc (pCtx, pNalCur, uiEosFlag);
967−
970+ pCurLayer->pMbRefConcealedFlag[iNextMbXyIndex] = pCtx->bMbRefConcealed;
968971 if (iRet != ERR_NONE) {
969972 return iRet;
970973 }
@@ -1520,6 +1523,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 549 unmodified lines
15201523 PBitStringAux pBs = pCurLayer->pBitStringAux;
15211524 PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer;
15221525 PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader;
1526+ PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0];
15231527 intX_t iUsedBits;
15241528 const int32_t iMbXy = pCurLayer->iMbXyIndex;
15251529 int8_t* pNzc = pCurLayer->pNzc[iMbXy];
@@ -1547,7 +1551,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 21 unmodified lines
15471551
15481552 pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0;
15491553 memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16);
1550−
1554+ pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || !(ppRefPic[0]&&ppRefPic[0]->bIsComplete);
15511555 //predict iMv
15521556 PredPSkipMvFromNeighbor (pCurLayer, iMv);
15531557 for (i = 0; i < 16; i++) {

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