modify sequence to fix bug for LTR feedback info
Showing the changes to codec/decoder (1 of 1 file). Show all
Unified · Split
| @@ -333,15 +333,15 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, · 332 unmodified lines | |||
| 333 | if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) { | 333 | if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) { |
| 334 | return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX; | 334 | return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX; |
| 335 | } | 335 | } |
| 336 | WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); | ||
| 337 | if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) { | ||
| 338 | return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW; | ||
| 339 | } | ||
| 336 | #ifdef LONG_TERM_REF | 340 | #ifdef LONG_TERM_REF |
| 337 | pCtx->bCurAuContainLtrMarkSeFlag = true; | 341 | pCtx->bCurAuContainLtrMarkSeFlag = true; |
| 338 | pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum; | 342 | pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum; |
| 339 | WelsLog (pCtx, WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum); | 343 | WelsLog (pCtx, WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum); |
| 340 | #endif | 344 | #endif |
| 341 | WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); | ||
| 342 | if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) { | ||
| 343 | return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW; | ||
| 344 | } | ||
| 345 | iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx); | 345 | iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx); |
| 346 | break; | 346 | break; |
| 347 | default : | 347 | default : |