Showing the changes to codec/decoder/core/src/au_parser.cpp (1 of 4 files). Show all
Unified · Split
| @@ -1420,9 +1420,10 @@ int32_t ParsePps (PWelsDecoderContext pCtx, PPps pPpsList, PBitStringAux pBsAux, · 1419 unmodified lines | ||
| 1420 | 1420 | WELS_READ_VERIFY (ParseScalingList (&pCtx->sSpsBuffer[pPps->iSpsId], pBsAux, 1, pPps->bTransform8x8ModeFlag, |
| 1421 | 1421 | pPps->bPicScalingListPresentFlag, pPps->iScalingList4x4, pPps->iScalingList8x8)); |
| 1422 | 1422 | } else { |
| 1423 | − pCtx->bSpsLatePps = true; | |
| 1424 | − WELS_READ_VERIFY (ParseScalingList (NULL, pBsAux, 1, pPps->bTransform8x8ModeFlag, pPps->bPicScalingListPresentFlag, | |
| 1425 | − pPps->iScalingList4x4, pPps->iScalingList8x8)); | |
| 1423 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, | |
| 1424 | + "ParsePps(): sps_id (%d) does not exist for scaling_list. This PPS (%d) is marked as invalid.", pPps->iSpsId, | |
| 1425 | + pPps->iPpsId); | |
| 1426 | + return GENERATE_ERROR_NO (ERR_LEVEL_PARAM_SETS, ERR_INFO_INVALID_SPS_ID); | |
| 1426 | 1427 | } |
| 1427 | 1428 | } |
| 1428 | 1429 | WELS_READ_VERIFY (BsGetSe (pBsAux, &iCode)); //second_chroma_qp_index_offset |
| @@ -1665,13 +1666,10 @@ int32_t ParseScalingList (PSps pSps, PBitStringAux pBs, bool bPPS, const bool kb · 236 unmodified lines | ||
| 1665 | 1666 | const uint8_t* defaultScaling[4]; |
| 1666 | 1667 | |
| 1667 | 1668 | if (!bPPS) { //sps scaling_list |
| 1668 | − if (pSps != NULL) { | |
| 1669 | − uiScalingListNum = (pSps->uiChromaFormatIdc != 3) ? 8 : 12; | |
| 1670 | − bInit = bPPS && pSps->bSeqScalingMatrixPresentFlag; | |
| 1671 | − } else | |
| 1672 | − uiScalingListNum = 12; | |
| 1669 | + uiScalingListNum = (pSps->uiChromaFormatIdc != 3) ? 8 : 12; | |
| 1673 | 1670 | } else { //pps scaling_list |
| 1674 | 1671 | uiScalingListNum = 6 + (int32_t) kbTrans8x8ModeFlag * ((pSps->uiChromaFormatIdc != 3) ? 2 : 6); |
| 1672 | + bInit = pSps->bSeqScalingMatrixPresentFlag; | |
| 1675 | 1673 | } |
| 1676 | 1674 | |
| 1677 | 1675 | //Init default_scaling_list value for sps or pps |