Update and fix temporal direct prediction and fix multi-reference pic…
Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 18 files). Show all
Unified · Split
| @@ -2550,6 +2550,9 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 2549 unmodified lines | |||
| 2550 | } | 2550 | } |
| 2551 | } | 2551 | } |
| 2552 | } | 2552 | } |
| 2553 | //calculate Colocated mv scaler factor for temporal direct prediction | ||
| 2554 | if (pSh->eSliceType == B_SLICE && !pSh->iDirectSpatialMvPredFlag) | ||
| 2555 | ComputeColocated (pCtx); | ||
| 2553 | 2556 | ||
| 2554 | iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur); | 2557 | iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur); |
| 2555 | 2558 | ||
| @@ -2648,8 +2651,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 92 unmodified lines | |||
| 2648 | memcpy (pCtx->pDec->pRefIndex[LIST_1], pCtx->pCurDqLayer->pRefIndex[LIST_1], | 2651 | memcpy (pCtx->pDec->pRefIndex[LIST_1], pCtx->pCurDqLayer->pRefIndex[LIST_1], |
| 2649 | pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM); | 2652 | pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM); |
| 2650 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { | 2653 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 2651 | for (uint32_t i = 0; i < pCtx->sRefPic.uiRefCount[listIdx]; ++i) { | 2654 | uint32_t i = 0; |
| 2655 | while (pCtx->sRefPic.pRefList[listIdx][i]) { | ||
| 2652 | pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i]; | 2656 | pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i]; |
| 2657 | ++i; | ||
| 2653 | } | 2658 | } |
| 2654 | } | 2659 | } |
| 2655 | iRet = WelsMarkAsRef (pCtx); | 2660 | iRet = WelsMarkAsRef (pCtx); |