Showing the changes to codec/decoder/core/src/manage_dec_ref.cpp (1 of 14 files). Show all
Unified · Split
| @@ -123,7 +123,7 @@ int32_t WelsInitRefList (PWelsDecoderContext pCtx, int32_t iPoc) { · 122 unmodified lines | |||
| 123 | pRef->uiTemporalId = pRef->uiQualityId = 0; | 123 | pRef->uiTemporalId = pRef->uiQualityId = 0; |
| 124 | AddShortTermToList (&pCtx->sRefPic, pRef); | 124 | AddShortTermToList (&pCtx->sRefPic, pRef); |
| 125 | } else { | 125 | } else { |
| 126 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_ERROR, "WelsInitRefList()::PrefetchPic for EC errors.\n"); | 126 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_ERROR, "WelsInitRefList()::PrefetchPic for EC errors.\n"); |
| 127 | pCtx->iErrorCode |= dsOutOfMemory; | 127 | pCtx->iErrorCode |= dsOutOfMemory; |
| 128 | return ERR_INFO_REF_COUNT_OVERFLOW; | 128 | return ERR_INFO_REF_COUNT_OVERFLOW; |
| 129 | } | 129 | } |
| @@ -187,7 +187,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { · 57 unmodified lines | |||
| 187 | if (ppRefList[i]->iFrameNum == iPredFrameNum && !ppRefList[i]->bIsLongRef) { | 187 | if (ppRefList[i]->iFrameNum == iPredFrameNum && !ppRefList[i]->bIsLongRef) { |
| 188 | if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId) | 188 | if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId) |
| 189 | && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; | 189 | && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; |
| 190 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", | 190 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", |
| 191 | pSliceHeader->iSpsId, ppRefList[i]->iSpsId); | 191 | pSliceHeader->iSpsId, ppRefList[i]->iSpsId); |
| 192 | pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- | 192 | pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- |
| 193 | return ERR_INFO_REFERENCE_PIC_LOST; | 193 | return ERR_INFO_REFERENCE_PIC_LOST; |
| @@ -204,7 +204,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { · 10 unmodified lines | |||
| 204 | pRefPicListReorderSyn->sReorderingSyn[LIST_0][iReorderingIndex].uiLongTermPicNum) { | 204 | pRefPicListReorderSyn->sReorderingSyn[LIST_0][iReorderingIndex].uiLongTermPicNum) { |
| 205 | if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId) | 205 | if ((pNalHeaderExt->uiQualityId == ppRefList[i]->uiQualityId) |
| 206 | && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; | 206 | && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; |
| 207 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", | 207 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "WelsReorderRefList()::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", |
| 208 | pSliceHeader->iSpsId, ppRefList[i]->iSpsId); | 208 | pSliceHeader->iSpsId, ppRefList[i]->iSpsId); |
| 209 | pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- | 209 | pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- |
| 210 | return ERR_INFO_REFERENCE_PIC_LOST; | 210 | return ERR_INFO_REFERENCE_PIC_LOST; |
| @@ -328,13 +328,13 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, · 117 unmodified lines | |||
| 328 | case MMCO_SHORT2UNUSED: | 328 | case MMCO_SHORT2UNUSED: |
| 329 | pPic = WelsDelShortFromListSetUnref (pRefPic, iShortFrameNum); | 329 | pPic = WelsDelShortFromListSetUnref (pRefPic, iShortFrameNum); |
| 330 | if (pPic == NULL) { | 330 | if (pPic == NULL) { |
| 331 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_SHORT2UNUSED: delete a empty entry from short term list\n"); | 331 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_SHORT2UNUSED: delete a empty entry from short term list\n"); |
| 332 | } | 332 | } |
| 333 | break; | 333 | break; |
| 334 | case MMCO_LONG2UNUSED: | 334 | case MMCO_LONG2UNUSED: |
| 335 | pPic = WelsDelLongFromListSetUnref (pRefPic, uiLongTermPicNum); | 335 | pPic = WelsDelLongFromListSetUnref (pRefPic, uiLongTermPicNum); |
| 336 | if (pPic == NULL) { | 336 | if (pPic == NULL) { |
| 337 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2UNUSED: delete a empty entry from long term list\n"); | 337 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2UNUSED: delete a empty entry from long term list\n"); |
| 338 | } | 338 | } |
| 339 | break; | 339 | break; |
| 340 | case MMCO_SHORT2LONG: | 340 | case MMCO_SHORT2LONG: |
| @@ -343,14 +343,14 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, · 2 unmodified lines | |||
| 343 | } | 343 | } |
| 344 | pPic = WelsDelShortFromList (pRefPic, iShortFrameNum); | 344 | pPic = WelsDelShortFromList (pRefPic, iShortFrameNum); |
| 345 | if (pPic == NULL) { | 345 | if (pPic == NULL) { |
| 346 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2LONG: delete a empty entry from short term list\n"); | 346 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "MMCO_LONG2LONG: delete a empty entry from short term list\n"); |
| 347 | break; | 347 | break; |
| 348 | } | 348 | } |
| 349 | WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); | 349 | WelsDelLongFromListSetUnref (pRefPic, iLongTermFrameIdx); |
| 350 | #ifdef LONG_TERM_REF | 350 | #ifdef LONG_TERM_REF |
| 351 | pCtx->bCurAuContainLtrMarkSeFlag = true; | 351 | pCtx->bCurAuContainLtrMarkSeFlag = true; |
| 352 | pCtx->iFrameNumOfAuMarkedLtr = iShortFrameNum; | 352 | pCtx->iFrameNumOfAuMarkedLtr = iShortFrameNum; |
| 353 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_SHORT2LONG:::LTR marking....iFrameNum: %d\n", | 353 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_SHORT2LONG:::LTR marking....iFrameNum: %d\n", |
| 354 | pCtx->iFrameNumOfAuMarkedLtr); | 354 | pCtx->iFrameNumOfAuMarkedLtr); |
| 355 | #endif | 355 | #endif |
| 356 | 356 | ||
| @@ -379,7 +379,8 @@ static int32_t MMCOProcess (PWelsDecoderContext pCtx, uint32_t uiMmcoType, · 22 unmodified lines | |||
| 379 | #ifdef LONG_TERM_REF | 379 | #ifdef LONG_TERM_REF |
| 380 | pCtx->bCurAuContainLtrMarkSeFlag = true; | 380 | pCtx->bCurAuContainLtrMarkSeFlag = true; |
| 381 | pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum; | 381 | pCtx->iFrameNumOfAuMarkedLtr = pCtx->iFrameNum; |
| 382 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", pCtx->iFrameNum); | 382 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "ex_mark_avc():::MMCO_LONG:::LTR marking....iFrameNum: %d\n", |
| 383 | pCtx->iFrameNum); | ||
| 383 | #endif | 384 | #endif |
| 384 | iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx); | 385 | iRet = AddLongTermToList (pRefPic, pCtx->pDec, iLongTermFrameIdx); |
| 385 | break; | 386 | break; |
| @@ -564,7 +565,7 @@ static int32_t RemainOneBufferInDpbForEC (PWelsDecoderContext pCtx) { · 178 unmodified lines | |||
| 564 | } | 565 | } |
| 565 | if (pRefPic->uiShortRefCount[0] + pRefPic->uiLongRefCount[0] >= | 566 | if (pRefPic->uiShortRefCount[0] + pRefPic->uiLongRefCount[0] >= |
| 566 | pCtx->pSps->iNumRefFrames) { //fail to remain one empty buffer in DPB | 567 | pCtx->pSps->iNumRefFrames) { //fail to remain one empty buffer in DPB |
| 567 | WelsLog (&(pCtx->sLogCtx), WELS_LOG_WARNING, "RemainOneBufferInDpbForEC(): empty one DPB failed for EC!\n"); | 568 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, "RemainOneBufferInDpbForEC(): empty one DPB failed for EC!\n"); |
| 568 | iRet = ERR_INFO_REF_COUNT_OVERFLOW; | 569 | iRet = ERR_INFO_REF_COUNT_OVERFLOW; |
| 569 | } | 570 | } |
| 570 | 571 | ||