History

modify decoder log

dong zhang committed 11 years ago

Commit d28970d1 parent 7c9597c6 files · +69 −11Browse files

Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 6 files). Show all

Unified · Split

codec/decoder/core/src/decoder_core.cpp+28−4
@@ -566,10 +566,18 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 565 unmodified lines
566566
567567 //add check PPS available here
568568 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+ }
570577 pCtx->iErrorCode |= dsNoParamSets;
571578 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_PPS_ID);
572579 }
580+ pCtx->iPPSLastInvalidId = -1;
573581
574582 pPps = &pCtx->sPpsBuffer[iPpsId];
575583
@@ -583,16 +591,32 @@ int32_t ParseSliceHeaderSyntaxs (PWelsDecoderContext pCtx, PBitStringAux pBs, co · 7 unmodified lines
583591 pSubsetSps = &pCtx->sSubsetSpsBuffer[pPps->iSpsId];
584592 pSps = &pSubsetSps->sSps;
585593 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+ }
587602 pCtx->iErrorCode |= dsNoParamSets;
588603 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
589604 }
605+ pCtx->iSubSPSLastInvalidId = -1;
590606 } else {
591607 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+ }
593616 pCtx->iErrorCode |= dsNoParamSets;
594617 return GENERATE_ERROR_NO (ERR_LEVEL_SLICE_HEADER, ERR_INFO_INVALID_SPS_ID);
595618 }
619+ pCtx->iSPSLastInvalidId = -1;
596620 pSps = &pCtx->sSpsBuffer[pPps->iSpsId];
597621 }
598622 pSliceHead->iPpsId = iPpsId;
@@ -2051,7 +2075,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1452 unmodified lines
20512075 pCtx->bRPLRError = true;
20522076 bAllRefComplete = false; // RPLR error, set ref pictures complete flag false
20532077 HandleReferenceLost (pCtx, pNalCur);
2054− WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
2078+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
20552079 "reference picture introduced by this frame is lost during transmission! uiTId: %d",
20562080 pNalCur->sNalHeaderExt.uiTemporalId);
20572081 if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t