Showing the changes to codec/decoder/core/src/decode_slice.cpp (1 of 11 files). Show all
Unified · Split
| @@ -101,6 +101,7 @@ int32_t WelsTargetSliceConstruction (PWelsDecoderContext pCtx) { · 100 unmodified lines | |||
| 101 | ++iCountNumMb; | 101 | ++iCountNumMb; |
| 102 | if (!pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex]) { //already con-ed, overwrite | 102 | if (!pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex]) { //already con-ed, overwrite |
| 103 | pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex] = true; | 103 | pCurLayer->pMbCorrectlyDecodedFlag[iNextMbXyIndex] = true; |
| 104 | pCtx->pDec->iMbEcedPropNum += (pCurLayer->pMbRefConcealedFlag[iNextMbXyIndex]? 1 : 0); | ||
| 104 | ++pCtx->iTotalNumMbRec; | 105 | ++pCtx->iTotalNumMbRec; |
| 105 | } | 106 | } |
| 106 | 107 | ||
| @@ -839,6 +840,7 @@ int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 732 unmodified lines | |||
| 839 | PDqLayer pCurLayer = pCtx->pCurDqLayer; | 840 | PDqLayer pCurLayer = pCtx->pCurDqLayer; |
| 840 | PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer; | 841 | PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer; |
| 841 | PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader; | 842 | PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader; |
| 843 | PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0]; | ||
| 842 | uint32_t uiCode; | 844 | uint32_t uiCode; |
| 843 | int32_t iMbXy = pCurLayer->iMbXyIndex; | 845 | int32_t iMbXy = pCurLayer->iMbXyIndex; |
| 844 | int32_t i; | 846 | int32_t i; |
| @@ -861,7 +863,7 @@ int32_t WelsDecodeMbCabacPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 16 unmodified lines | |||
| 861 | 863 | ||
| 862 | pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0; | 864 | pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0; |
| 863 | memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16); | 865 | memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16); |
| 864 | 866 | pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || !(ppRefPic[0]&&ppRefPic[0]->bIsComplete); | |
| 865 | //predict mv | 867 | //predict mv |
| 866 | PredPSkipMvFromNeighbor (pCurLayer, pMv); | 868 | PredPSkipMvFromNeighbor (pCurLayer, pMv); |
| 867 | for (i = 0; i < 16; i++) { | 869 | for (i = 0; i < 16; i++) { |
| @@ -963,8 +965,9 @@ int32_t WelsDecodeSlice (PWelsDecoderContext pCtx, bool bFirstSliceInLayer, PNal · 95 unmodified lines | |||
| 963 | } | 965 | } |
| 964 | 966 | ||
| 965 | pCurLayer->pSliceIdc[iNextMbXyIndex] = iSliceIdc; | 967 | pCurLayer->pSliceIdc[iNextMbXyIndex] = iSliceIdc; |
| 968 | pCtx->bMbRefConcealed = false; | ||
| 966 | iRet = pDecMbFunc (pCtx, pNalCur, uiEosFlag); | 969 | iRet = pDecMbFunc (pCtx, pNalCur, uiEosFlag); |
| 967 | 970 | pCurLayer->pMbRefConcealedFlag[iNextMbXyIndex] = pCtx->bMbRefConcealed; | |
| 968 | if (iRet != ERR_NONE) { | 971 | if (iRet != ERR_NONE) { |
| 969 | return iRet; | 972 | return iRet; |
| 970 | } | 973 | } |
| @@ -1520,6 +1523,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 549 unmodified lines | |||
| 1520 | PBitStringAux pBs = pCurLayer->pBitStringAux; | 1523 | PBitStringAux pBs = pCurLayer->pBitStringAux; |
| 1521 | PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer; | 1524 | PSlice pSlice = &pCurLayer->sLayerInfo.sSliceInLayer; |
| 1522 | PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader; | 1525 | PSliceHeader pSliceHeader = &pSlice->sSliceHeaderExt.sSliceHeader; |
| 1526 | PPicture* ppRefPic = pCtx->sRefPic.pRefList[LIST_0]; | ||
| 1523 | intX_t iUsedBits; | 1527 | intX_t iUsedBits; |
| 1524 | const int32_t iMbXy = pCurLayer->iMbXyIndex; | 1528 | const int32_t iMbXy = pCurLayer->iMbXyIndex; |
| 1525 | int8_t* pNzc = pCurLayer->pNzc[iMbXy]; | 1529 | int8_t* pNzc = pCurLayer->pNzc[iMbXy]; |
| @@ -1547,7 +1551,7 @@ int32_t WelsDecodeMbCavlcPSlice (PWelsDecoderContext pCtx, PNalUnit pNalCur, uin · 21 unmodified lines | |||
| 1547 | 1551 | ||
| 1548 | pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0; | 1552 | pCurLayer->pInterPredictionDoneFlag[iMbXy] = 0; |
| 1549 | memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16); | 1553 | memset (pCurLayer->pRefIndex[0][iMbXy], 0, sizeof (int8_t) * 16); |
| 1550 | 1554 | pCtx->bMbRefConcealed = pCtx->bRPLRError || pCtx->bMbRefConcealed || !(ppRefPic[0]&&ppRefPic[0]->bIsComplete); | |
| 1551 | //predict iMv | 1555 | //predict iMv |
| 1552 | PredPSkipMvFromNeighbor (pCurLayer, iMv); | 1556 | PredPSkipMvFromNeighbor (pCurLayer, iMv); |
| 1553 | for (i = 0; i < 16; i++) { | 1557 | for (i = 0; i < 16; i++) { |