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