Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 2 files). Show all
Unified · Split
| @@ -1641,11 +1641,6 @@ int32_t ConstructAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferI · 1640 unmodified lines | |||
| 1641 | 1641 | ||
| 1642 | WelsDecodeAccessUnitEnd (pCtx); | 1642 | WelsDecodeAccessUnitEnd (pCtx); |
| 1643 | 1643 | ||
| 1644 | if (!pCtx->bInstantDecFlag) { | ||
| 1645 | //Do error concealment here | ||
| 1646 | ImplementErrorCon (pCtx); | ||
| 1647 | } | ||
| 1648 | |||
| 1649 | pCtx->bNewSeqBegin = false; | 1644 | pCtx->bNewSeqBegin = false; |
| 1650 | WriteBackActiveParameters (pCtx); | 1645 | WriteBackActiveParameters (pCtx); |
| 1651 | pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || pCtx->bNextNewSeqBegin; | 1646 | pCtx->bNewSeqBegin = pCtx->bNewSeqBegin || pCtx->bNextNewSeqBegin; |
| @@ -1943,6 +1938,14 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 291 unmodified lines | |||
| 1943 | #endif//#if !CODEC_FOR_TESTBED | 1938 | #endif//#if !CODEC_FOR_TESTBED |
| 1944 | 1939 | ||
| 1945 | if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) { | 1940 | if (dq_cur->uiLayerDqId == kuiTargetLayerDqId) { |
| 1941 | if (!pCtx->bInstantDecFlag) { | ||
| 1942 | //Do error concealment here | ||
| 1943 | if (NeedErrorCon (pCtx)) { | ||
| 1944 | ImplementErrorCon (pCtx); | ||
| 1945 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | ||
| 1946 | } | ||
| 1947 | } | ||
| 1948 | |||
| 1946 | if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo)) { | 1949 | if (DecodeFrameConstruction (pCtx, ppDst, pDstInfo)) { |
| 1947 | return ERR_NONE; | 1950 | return ERR_NONE; |
| 1948 | } | 1951 | } |
| @@ -1979,15 +1982,17 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 30 unmodified lines | |||
| 1979 | if ((pCtx->iTotalNumMbRec != 0) | 1982 | if ((pCtx->iTotalNumMbRec != 0) |
| 1980 | && (CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pCurNal->sNalHeaderExt, &pCtx->sLastSliceHeader, | 1983 | && (CheckAccessUnitBoundaryExt (&pCtx->sLastNalHdrExt, &pCurNal->sNalHeaderExt, &pCtx->sLastSliceHeader, |
| 1981 | &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) { | 1984 | &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) { |
| 1982 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | ||
| 1983 | DecodeFrameConstruction (pCtx, ppDst, pDstInfo); | ||
| 1984 | PPicture pCurPic = pCtx->pDec; //temporally store current picture | ||
| 1985 | //Do Error Concealment here | 1985 | //Do Error Concealment here |
| 1986 | ImplementErrorCon (pCtx); | 1986 | if (NeedErrorCon (pCtx)) { //should always be true! |
| 1987 | pCtx->pPreviousDecodedPictureInDpb = pCurPic; //save ECed pic for future use | 1987 | ImplementErrorCon (pCtx); |
| 1988 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num | 1988 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; |
| 1989 | if (pCtx->bLastHasMmco5) | 1989 | DecodeFrameConstruction (pCtx, ppDst, pDstInfo); |
| 1990 | pCtx->iPrevFrameNum = 0; | 1990 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use |
| 1991 | MarkECFrameAsRef (pCtx); | ||
| 1992 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num | ||
| 1993 | if (pCtx->bLastHasMmco5) | ||
| 1994 | pCtx->iPrevFrameNum = 0; | ||
| 1995 | } | ||
| 1991 | } | 1996 | } |
| 1992 | return ERR_NONE; | 1997 | return ERR_NONE; |
| 1993 | } | 1998 | } |