| 660 | } |
| 661 | |
| 662 | void WelsUpdateSliceHeaderSyntax (sWelsEncCtx* pCtx, const int32_t iAbsDiffPicNumMinus1, |
| 663 | SSlice** ppSliceList, const int32_t uiFrameType) { |
| 664 | const int32_t kiCountSliceNum = pCtx->pCurDqLayer->iMaxSliceNum; |
| 665 | SLTRState* pLtr = &pCtx->pLtr[pCtx->uiDependencyId]; |
| 666 | int32_t iIdx = 0; |
| 667 | |
| 668 | assert (kiCountSliceNum > 0); |
| 669 | |
| 670 | for (iIdx = 0; iIdx < kiCountSliceNum; iIdx++) { |
| 671 | SSliceHeaderExt* pSliceHdrExt = &ppSliceList[iIdx]->sSliceHeaderExt; |
| 672 | SSliceHeader* pSliceHdr = &pSliceHdrExt->sSliceHeader; |
| 673 | SRefPicListReorderSyntax* pRefReorder = &pSliceHdr->sRefReordering; |
| 674 | SRefPicMarking* pRefPicMark = &pSliceHdr->sRefMarking; |
| 675 | |
| 676 | /*syntax for num_ref_idx_l0_active_minus1*/ |
| 677 | pSliceHdr->uiRefCount = pCtx->iNumRef0; |
| 678 | if (pCtx->iNumRef0 > 0) { |
| 679 | if ((!pCtx->pRefList0[0]->bIsLongRef) || (!pCtx->pSvcParam->bEnableLongTermReference)) { |
| 680 | pRefReorder->SReorderingSyntax[0].uiReorderingOfPicNumsIdc = 0; |
| 681 | pRefReorder->SReorderingSyntax[0].uiAbsDiffPicNumMinus1 = iAbsDiffPicNumMinus1; |
| 682 | pRefReorder->SReorderingSyntax[1].uiReorderingOfPicNumsIdc = 3; |
| 683 | } else { |
| 684 | int32_t iRefIdx = 0; |
| 685 | for (iRefIdx = 0; iRefIdx < pCtx->iNumRef0; iRefIdx++) { |
| 686 | pRefReorder->SReorderingSyntax[iRefIdx].uiReorderingOfPicNumsIdc = 2; |
| 687 | pRefReorder->SReorderingSyntax[iRefIdx].iLongTermPicNum = pCtx->pRefList0[iRefIdx]->iLongTermPicNum; |
| 688 | } |
| 689 | pRefReorder->SReorderingSyntax[iRefIdx].uiReorderingOfPicNumsIdc = 3; |
| 690 | } |
| 691 | } |
| 692 | |
| 693 | /*syntax for dec_ref_pic_marking()*/ |
| 694 | if (videoFrameTypeIDR == uiFrameType) { |
| 695 | pRefPicMark->bNoOutputOfPriorPicsFlag = false; |
| 696 | pRefPicMark->bLongTermRefFlag = pCtx->pSvcParam->bEnableLongTermReference; |
| 697 | } else { |
| 698 | if (pCtx->pSvcParam->iUsageType == SCREEN_CONTENT_REAL_TIME) |
| 699 | pRefPicMark->bAdaptiveRefPicMarkingModeFlag = pCtx->pSvcParam->bEnableLongTermReference; |
| 700 | else |
| 701 | pRefPicMark->bAdaptiveRefPicMarkingModeFlag = (pCtx->pSvcParam->bEnableLongTermReference |
| 702 | && pLtr->bLTRMarkingFlag) ? (true) : (false); |
| 703 | } |
| 704 | } |
| 705 | } |
| 706 | |
| 707 | /* |
| 708 | * update syntax for reference base related |
no outgoing calls
no test coverage detected