Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 6 files). Show all
Unified · Split
| @@ -566,10 +566,18 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 565 unmodified lines | ||
| 566 | 566 | |
| 567 | 567 | //add check PPS available here |
| 568 | 568 | if (pCtx->bPpsAvailFlags[iPpsId] == false) { |
| 569 | − WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id is invalid!"); | |
| 569 | + pCtx->sDecoderStatistics.iPpsReportErrorNum++; | |
| 570 | + if (pCtx->iPPSLastInvalidId != iPpsId) { | |
| 571 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "PPS id (%d) is invalid, previous id (%d) error ignored (%d)!", iPpsId, pCtx->iPPSLastInvalidId, pCtx->iPPSInvalidNum); | |
| 572 | + pCtx->iPPSLastInvalidId = iPpsId; | |
| 573 | + pCtx->iPPSInvalidNum = 0; | |
| 574 | + } else { | |
| 575 | + pCtx->iPPSInvalidNum++; | |
| 576 | + } | |
| 570 | 577 | pCtx->iErrorCode |= dsNoParamSets; |
| 571 | 578 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID); |
| 572 | 579 | } |
| 580 | + pCtx->iPPSLastInvalidId = -1; | |
| 573 | 581 | |
| 574 | 582 | pPps = &pCtx->sPpsBuffer[iPpsId]; |
| 575 | 583 | |
| @@ -583,16 +591,32 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 7 unmodified lines | ||
| 583 | 591 | pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId]; |
| 584 | 592 | pSps = &pSubsetSps->sSps; |
| 585 | 593 | if (pCtx->bSubspsAvailFlags[pPps->iSpsId] == false) { |
| 586 | − WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!"); | |
| 594 | + pCtx->sDecoderStatistics.iSubSpsReportErrorNum++; | |
| 595 | + if (pCtx->iSubSPSLastInvalidId != pPps->iSpsId) { | |
| 596 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "Sub SPS id (%d) is invalid, previous id (%d) error ignored (%d)!", pPps->iSpsId, pCtx->iSubSPSLastInvalidId, pCtx->iSubSPSInvalidNum); | |
| 597 | + pCtx->iSubSPSLastInvalidId = pPps->iSpsId; | |
| 598 | + pCtx->iSubSPSInvalidNum = 0; | |
| 599 | + } else { | |
| 600 | + pCtx->iSubSPSInvalidNum++; | |
| 601 | + } | |
| 587 | 602 | pCtx->iErrorCode |= dsNoParamSets; |
| 588 | 603 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID); |
| 589 | 604 | } |
| 605 | + pCtx->iSubSPSLastInvalidId = -1; | |
| 590 | 606 | } else { |
| 591 | 607 | if (pCtx->bSpsAvailFlags[pPps->iSpsId] == false) { |
| 592 | − WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id is invalid!"); | |
| 608 | + pCtx->sDecoderStatistics.iSpsReportErrorNum++; | |
| 609 | + if (pCtx->iSPSLastInvalidId != pPps->iSpsId) { | |
| 610 | + WelsLog (pLogCtx, WELS_LOG_ERROR, "SPS id (%d) is invalid, previous id (%d) error ignored (%d)!", pPps->iSpsId, pCtx->iSPSLastInvalidId, pCtx->iSPSInvalidNum); | |
| 611 | + pCtx->iSPSLastInvalidId = pPps->iSpsId; | |
| 612 | + pCtx->iSPSInvalidNum = 0; | |
| 613 | + } else { | |
| 614 | + pCtx->iSPSInvalidNum++; | |
| 615 | + } | |
| 593 | 616 | pCtx->iErrorCode |= dsNoParamSets; |
| 594 | 617 | return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID); |
| 595 | 618 | } |
| 619 | + pCtx->iSPSLastInvalidId = -1; | |
| 596 | 620 | pSps = &pCtx->sSpsBuffer[pPps->iSpsId]; |
| 597 | 621 | } |
| 598 | 622 | pSliceHead->iPpsId = iPpsId; |
| @@ -2051,7 +2075,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1452 unmodified lines | ||
| 2051 | 2075 | pCtx->bRPLRError = true; |
| 2052 | 2076 | bAllRefComplete = false; // RPLR error, set ref pictures complete flag false |
| 2053 | 2077 | HandleReferenceLost (pCtx, pNalCur); |
| 2054 | − WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, | |
| 2078 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | |
| 2055 | 2079 | "reference picture introduced by this frame is lost during transmission! uiTId: %d", |
| 2056 | 2080 | pNalCur->sNalHeaderExt.uiTemporalId); |
| 2057 | 2081 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { |