ref: 0c45cbb1ecc1f6b7cfdafda61418e4266424e3d5
parent: 1b1654e9c6393bfbb491c47f261934d20b7f252b
author: huili2 <huili2@cisco.com>
date: Sun Apr 20 18:22:24 EDT 2014
modify sequence to fix bug for LTR feedback info
--- a/codec/decoder/core/src/manage_dec_ref.cpp
+++ b/codec/decoder/core/src/manage_dec_ref.cpp
@@ -333,15 +333,15 @@
if (iLongTermFrameIdx > pRefPic->iMaxLongTermFrameIdx) {
return ERR_INFO_INVALID_MMCO_LONG_TERM_IDX_EXCEED_MAX;
}
+ WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
+ if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) {
+ return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
+ }
#ifdef LONG_TERM_REF
pCtx->bCurAuContainLtrMarkSeFlag = true;
pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum;
WelsLog (pCtx, WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum);
#endif
- WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx);
- if (pRefPic->uiLongRefCount[LIST_0] + pRefPic->uiShortRefCount[LIST_0] >= WELS_MAX(1,pCtx->pSps->iNumRefFrames)) {
- return ERR_INFO_INVALID_MMCO_REF_NUM_OVERFLOW;
- }
iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx);
break;
default :