Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 10 files). Show all
Unified · Split
| @@ -873,6 +873,8 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 872 unmodified lines | |||
| 873 | 873 | ||
| 874 | pSliceHeadExt = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt; | 874 | pSliceHeadExt = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt; |
| 875 | 875 | ||
| 876 | pSliceHead->bIsRefPic = false; | ||
| 877 | |||
| 876 | if (pSliceHeadExt) { | 878 | if (pSliceHeadExt) { |
| 877 | SRefBasePicMarking sBaseMarking; | 879 | SRefBasePicMarking sBaseMarking; |
| 878 | const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag; | 880 | const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag; |
| @@ -2473,6 +2475,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1594 unmodified lines | |||
| 2473 | dq_cur->pBitStringAux = &pNalCur->sNalData.sVclNal.sSliceBitsRead; | 2475 | dq_cur->pBitStringAux = &pNalCur->sNalData.sVclNal.sSliceBitsRead; |
| 2474 | 2476 | ||
| 2475 | uiNalRefIdc = pNalCur->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc; | 2477 | uiNalRefIdc = pNalCur->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc; |
| 2478 | pSh->bIsRefPic = uiNalRefIdc > 0; | ||
| 2476 | 2479 | ||
| 2477 | iPpsId = pSh->iPpsId; | 2480 | iPpsId = pSh->iPpsId; |
| 2478 | 2481 | ||
| @@ -2547,6 +2550,9 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 68 unmodified lines | |||
| 2547 | } | 2550 | } |
| 2548 | } | 2551 | } |
| 2549 | } | 2552 | } |
| 2553 | //calculate Colocated mv scaler factor for temporal direct prediction | ||
| 2554 | if (pSh->eSliceType == B_SLICE && !pSh->iDirectSpatialMvPredFlag) | ||
| 2555 | ComputeColocated (pCtx); | ||
| 2550 | 2556 | ||
| 2551 | iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur); | 2557 | iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur); |
| 2552 | 2558 | ||
| @@ -2645,8 +2651,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 92 unmodified lines | |||
| 2645 | memcpy (pCtx->pDec->pRefIndex[LIST_1], pCtx->pCurDqLayer->pRefIndex[LIST_1], | 2651 | memcpy (pCtx->pDec->pRefIndex[LIST_1], pCtx->pCurDqLayer->pRefIndex[LIST_1], |
| 2646 | 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); |
| 2647 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { | 2653 | for (int32_t listIdx = LIST_0; listIdx < LIST_A; ++listIdx) { |
| 2648 | for (uint32_t i = 0; i < pCtx->sRefPic.uiRefCount[listIdx]; ++i) { | 2654 | uint32_t i = 0; |
| 2655 | while (pCtx->sRefPic.pRefList[listIdx][i]) { | ||
| 2649 | pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i]; | 2656 | pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i]; |
| 2657 | ++i; | ||
| 2650 | } | 2658 | } |
| 2651 | } | 2659 | } |
| 2652 | iRet = WelsMarkAsRef (pCtx); | 2660 | iRet = WelsMarkAsRef (pCtx); |