Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 4 files). Show all
Unified · Split
| @@ -381,10 +381,13 @@ void CreateImplicitWeightTable (PWelsDecoderContext pCtx) { · 380 unmodified lines | ||
| 381 | 381 | if (pCurDqLayer->bUseWeightedBiPredIdc && pSliceHeader->pPps->uiWeightedBipredIdc == 2) { |
| 382 | 382 | int32_t iPoc = pSliceHeader->iPicOrderCntLsb; |
| 383 | 383 | |
| 384 | − if (pSliceHeader->uiRefCount[0] == 1 && pSliceHeader->uiRefCount[1] == 1 | |
| 385 | − && pCtx->sRefPic.pRefList[LIST_0][0]->iFramePoc + pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc == 2 * iPoc) { | |
| 386 | − pCurDqLayer->bUseWeightedBiPredIdc = false; | |
| 387 | − return; | |
| 384 | + //fix Bugzilla 1485229 check if pointers are NULL | |
| 385 | + if (pCtx->sRefPic.pRefList[LIST_0][0] && pCtx->sRefPic.pRefList[LIST_1][0]) { | |
| 386 | + if (pSliceHeader->uiRefCount[0] == 1 && pSliceHeader->uiRefCount[1] == 1 | |
| 387 | + && pCtx->sRefPic.pRefList[LIST_0][0]->iFramePoc + pCtx->sRefPic.pRefList[LIST_1][0]->iFramePoc == 2 * iPoc) { | |
| 388 | + pCurDqLayer->bUseWeightedBiPredIdc = false; | |
| 389 | + return; | |
| 390 | + } | |
| 388 | 391 | } |
| 389 | 392 | |
| 390 | 393 | pCurDqLayer->pPredWeightTable->uiLumaLog2WeightDenom = 5; |