| 2376 | } |
| 2377 | |
| 2378 | static inline void InitDqLayerInfo (PDqLayer pDqLayer, PLayerInfo pLayerInfo, PNalUnit pNalUnit, PPicture pPicDec) { |
| 2379 | PNalUnitHeaderExt pNalHdrExt = &pNalUnit->sNalHeaderExt; |
| 2380 | PSliceHeaderExt pShExt = &pNalUnit->sNalData.sVclNal.sSliceHeaderExt; |
| 2381 | PSliceHeader pSh = &pShExt->sSliceHeader; |
| 2382 | const uint8_t kuiQualityId = pNalHdrExt->uiQualityId; |
| 2383 | |
| 2384 | memcpy (&pDqLayer->sLayerInfo, pLayerInfo, sizeof (SLayerInfo)); //confirmed_safe_unsafe_usage |
| 2385 | |
| 2386 | pDqLayer->pDec = pPicDec; |
| 2387 | pDqLayer->iMbWidth = pSh->iMbWidth; // MB width of this picture |
| 2388 | pDqLayer->iMbHeight = pSh->iMbHeight;// MB height of this picture |
| 2389 | |
| 2390 | pDqLayer->iSliceIdcBackup = (pSh->iFirstMbInSlice << 7) | (pNalHdrExt->uiDependencyId << 4) | (pNalHdrExt->uiQualityId); |
| 2391 | |
| 2392 | /* Common syntax elements across all slices of a DQLayer */ |
| 2393 | pDqLayer->uiPpsId = pLayerInfo->pPps->iPpsId; |
| 2394 | pDqLayer->uiDisableInterLayerDeblockingFilterIdc = pShExt->uiDisableInterLayerDeblockingFilterIdc; |
| 2395 | pDqLayer->iInterLayerSliceAlphaC0Offset = pShExt->iInterLayerSliceAlphaC0Offset; |
| 2396 | pDqLayer->iInterLayerSliceBetaOffset = pShExt->iInterLayerSliceBetaOffset; |
| 2397 | pDqLayer->iSliceGroupChangeCycle = pSh->iSliceGroupChangeCycle; |
| 2398 | pDqLayer->bStoreRefBasePicFlag = pShExt->bStoreRefBasePicFlag; |
| 2399 | pDqLayer->bTCoeffLevelPredFlag = pShExt->bTCoeffLevelPredFlag; |
| 2400 | pDqLayer->bConstrainedIntraResamplingFlag = pShExt->bConstrainedIntraResamplingFlag; |
| 2401 | pDqLayer->uiRefLayerDqId = pShExt->uiRefLayerDqId; |
| 2402 | pDqLayer->uiRefLayerChromaPhaseXPlus1Flag = pShExt->uiRefLayerChromaPhaseXPlus1Flag; |
| 2403 | pDqLayer->uiRefLayerChromaPhaseYPlus1 = pShExt->uiRefLayerChromaPhaseYPlus1; |
| 2404 | pDqLayer->bUseWeightPredictionFlag = false; |
| 2405 | pDqLayer->bUseWeightedBiPredIdc = false; |
| 2406 | //memcpy(&pDqLayer->sScaledRefLayer, &pShExt->sScaledRefLayer, sizeof(SPosOffset));//confirmed_safe_unsafe_usage |
| 2407 | |
| 2408 | if (kuiQualityId == BASE_QUALITY_ID) { |
| 2409 | pDqLayer->pRefPicListReordering = &pSh->pRefPicListReordering; |
| 2410 | pDqLayer->pRefPicMarking = &pSh->sRefMarking; |
| 2411 | |
| 2412 | pDqLayer->bUseWeightPredictionFlag = pSh->pPps->bWeightedPredFlag; |
| 2413 | pDqLayer->bUseWeightedBiPredIdc = pSh->pPps->uiWeightedBipredIdc != 0; |
| 2414 | if (pSh->pPps->bWeightedPredFlag || pSh->pPps->uiWeightedBipredIdc) { |
| 2415 | pDqLayer->pPredWeightTable = &pSh->sPredWeightTable; |
| 2416 | } |
| 2417 | pDqLayer->pRefPicBaseMarking = &pShExt->sRefBasePicMarking; |
| 2418 | } |
| 2419 | |
| 2420 | pDqLayer->uiLayerDqId = pNalHdrExt->uiLayerDqId; // dq_id of current layer |
| 2421 | pDqLayer->bUseRefBasePicFlag = pNalHdrExt->bUseRefBasePicFlag; |
| 2422 | } |
| 2423 | |
| 2424 | void WelsDqLayerDecodeStart (PWelsDecoderContext pCtx, PNalUnit pCurNal, PSps pSps, PPps pPps) { |
| 2425 | PSliceHeader pSh = &pCurNal->sNalData.sVclNal.sSliceHeaderExt.sSliceHeader; |
no outgoing calls
no test coverage detected