History

Update and fix temporal direct prediction and fix multi-reference picure re-ordering.

xiaotiansf committed 7 years ago

Commit 4b8913f1 parent 94ffa1f10 files · +411 −466Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 10 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+9−1
@@ -873,6 +873,8 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 872 unmodified lines
873873
874874 pSliceHeadExt = &kpCurNal->sNalData.sVclNal.sSliceHeaderExt;
875875
876+ pSliceHead->bIsRefPic = false;
877+
876878 if (pSliceHeadExt) {
877879 SRefBasePicMarking sBaseMarking;
878880 const bool kbStoreRefBaseFlag = pSliceHeadExt->bStoreRefBasePicFlag;
@@ -2473,6 +2475,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1594 unmodified lines
24732475 dq_cur->pBitStringAux = &pNalCur->sNalData.sVclNal.sSliceBitsRead;
24742476
24752477 uiNalRefIdc = pNalCur->sNalHeaderExt.sNalUnitHeader.uiNalRefIdc;
2478+ pSh->bIsRefPic = uiNalRefIdc > 0;
24762479
24772480 iPpsId = pSh->iPpsId;
24782481
@@ -2547,6 +2550,9 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 68 unmodified lines
25472550 }
25482551 }
25492552 }
2553+ //calculate Colocated mv scaler factor for temporal direct prediction
2554+ if (pSh->eSliceType == B_SLICE && !pSh->iDirectSpatialMvPredFlag)
2555+ ComputeColocated (pCtx);
25502556
25512557 iRet = WelsDecodeSlice (pCtx, bFreshSliceAvailable, pNalCur);
25522558
@@ -2645,8 +2651,10 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 92 unmodified lines
26452651 memcpy (pCtx->pDec->pRefIndex[LIST_1], pCtx->pCurDqLayer->pRefIndex[LIST_1],
26462652 pCtx->sMb.iMbWidth * pCtx->sMb.iMbHeight * sizeof (int8_t) * MB_BLOCK4x4_NUM);
26472653 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]) {
26492656 pCtx->pDec->pRefPic[listIdx][i] = pCtx->sRefPic.pRefList[listIdx][i];
2657+ ++i;
26502658 }
26512659 }
26522660 iRet = WelsMarkAsRef (pCtx);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t