Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all
Unified · Split
| @@ -1973,9 +1973,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1972 unmodified lines | |||
| 1973 | return ERR_NONE; | 1973 | return ERR_NONE; |
| 1974 | } | 1974 | } |
| 1975 | 1975 | ||
| 1976 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for EC | ||
| 1977 | |||
| 1978 | if (uiNalRefIdc > 0) { | 1976 | if (uiNalRefIdc > 0) { |
| 1977 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for EC | ||
| 1979 | iRet = WelsMarkAsRef (pCtx); | 1978 | iRet = WelsMarkAsRef (pCtx); |
| 1980 | if (iRet != ERR_NONE) { | 1979 | if (iRet != ERR_NONE) { |
| 1981 | if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) { | 1980 | if (pCtx->iErrorConMethod == ERROR_CON_DISABLE) { |
| @@ -2010,8 +2009,10 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 28 unmodified lines | |||
| 2010 | ImplementErrorCon (pCtx); | 2009 | ImplementErrorCon (pCtx); |
| 2011 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | 2010 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; |
| 2012 | DecodeFrameConstruction (pCtx, ppDst, pDstInfo); | 2011 | DecodeFrameConstruction (pCtx, ppDst, pDstInfo); |
| 2013 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use | 2012 | if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { |
| 2014 | MarkECFrameAsRef (pCtx); | 2013 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use |
| 2014 | MarkECFrameAsRef (pCtx); | ||
| 2015 | } | ||
| 2015 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num | 2016 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num |
| 2016 | if (pCtx->bLastHasMmco5) | 2017 | if (pCtx->bLastHasMmco5) |
| 2017 | pCtx->iPrevFrameNum = 0; | 2018 | pCtx->iPrevFrameNum = 0; |