Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all
Unified · Split
| @@ -2001,7 +2001,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2000 unmodified lines | ||
| 2001 | 2001 | return ERR_NONE; |
| 2002 | 2002 | } |
| 2003 | 2003 | |
| 2004 | −bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) { | |
| 2004 | +bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstInfo) { | |
| 2005 | 2005 | PAccessUnit pAu = pCtx->pAccessUnitList; |
| 2006 | 2006 | PNalUnit pCurNal = pAu->pNalUnitsList[pAu->uiEndPos]; |
| 2007 | 2007 | if ((pCtx->iTotalNumMbRec != 0) |
| @@ -2009,12 +2009,16 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 1 unmodified line | ||
| 2009 | 2009 | &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader))) { |
| 2010 | 2010 | //Do Error Concealment here |
| 2011 | 2011 | if (NeedErrorCon (pCtx)) { //should always be true! |
| 2012 | − ImplementErrorCon (pCtx); | |
| 2013 | − pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | |
| 2014 | − DecodeFrameConstruction (pCtx, ppDst, pDstInfo); | |
| 2015 | − if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { | |
| 2016 | − pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use | |
| 2017 | − MarkECFrameAsRef (pCtx); | |
| 2012 | + if (pCtx->eErrorConMethod != ERROR_CON_DISABLE) { | |
| 2013 | + ImplementErrorCon (pCtx); | |
| 2014 | + pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | |
| 2015 | + DecodeFrameConstruction (pCtx, ppDst, pDstInfo); | |
| 2016 | + if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { | |
| 2017 | + pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use | |
| 2018 | + MarkECFrameAsRef (pCtx); | |
| 2019 | + } | |
| 2020 | + } else { | |
| 2021 | + DecodeFrameConstruction (pCtx, ppDst, pDstInfo); | |
| 2018 | 2022 | } |
| 2019 | 2023 | pCtx->iPrevFrameNum = pCtx->sLastSliceHeader.iFrameNum; //save frame_num |
| 2020 | 2024 | if (pCtx->bLastHasMmco5) |
| @@ -2023,5 +2027,4 @@ bool CheckAndDoEC (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferInfo* pDstI · 2 unmodified lines | ||
| 2023 | 2027 | } |
| 2024 | 2028 | return ERR_NONE; |
| 2025 | 2029 | } |
| 2026 | − | |
| 2027 | 2030 | } // namespace WelsDec |