History

decrease dec log size

huili2 committed 12 years ago

Commit 581f8fd1 parent 68973985 files · +36 −23Browse files

Showing the changes to codec/decoder/core/src (3 of 5 files). Show all

Unified · Split

3 files
  1. codec/decoder/core/src/au_parser.cpp +10 −14
  2. codec/decoder/core/src/decoder.cpp +4 −0
  3. codec/decoder/core/src/decoder_core.cpp +8 −4
codec/decoder/core/src/au_parser.cpp+10−14
@@ -141,32 +141,34 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 140 unmodified lines
141141 --iNalSize;
142142 ++ (*pConsumedBytes);
143143
144−#ifdef DEBUG_PARSE_INFO
145− WelsLog (pLogCtx, WELS_LOG_INFO, "nal type: %d \n", pNalUnitHeader->eNalUnitType);
146−#endif
147−
148144 if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_SPS_NAL (pNalUnitHeader->eNalUnitType)
149145 || pCtx->bSpsExistAheadFlag)) {
150− WelsLog (pLogCtx, WELS_LOG_WARNING,
146+ if (pCtx->bPrintFrameErrorTraceFlag) {
147+ WelsLog (pLogCtx, WELS_LOG_WARNING,
151148 "parse_nal(), no exist Sequence Parameter Sets ahead of sequence when try to decode NAL(type:%d).\n",
152149 pNalUnitHeader->eNalUnitType);
150+ }
153151 pCtx->iErrorCode = dsNoParamSets;
154152 return NULL;
155153 }
156154 if (! (IS_SEI_NAL (pNalUnitHeader->eNalUnitType) || IS_PARAM_SETS_NALS (pNalUnitHeader->eNalUnitType)
157155 || pCtx->bPpsExistAheadFlag)) {
158− WelsLog (pLogCtx, WELS_LOG_WARNING,
156+ if (pCtx->bPrintFrameErrorTraceFlag) {
157+ WelsLog (pLogCtx, WELS_LOG_WARNING,
159158 "parse_nal(), no exist Picture Parameter Sets ahead of sequence when try to decode NAL(type:%d).\n",
160159 pNalUnitHeader->eNalUnitType);
160+ }
161161 pCtx->iErrorCode = dsNoParamSets;
162162 return NULL;
163163 }
164164 if ((IS_VCL_NAL_AVC_BASE (pNalUnitHeader->eNalUnitType) && ! (pCtx->bSpsExistAheadFlag || pCtx->bPpsExistAheadFlag)) ||
165165 (IS_NEW_INTRODUCED_SVC_NAL (pNalUnitHeader->eNalUnitType) && ! (pCtx->bSpsExistAheadFlag || pCtx->bSubspsExistAheadFlag
166166 || pCtx->bPpsExistAheadFlag))) {
167− WelsLog (pLogCtx, WELS_LOG_WARNING,
167+ if (pCtx->bPrintFrameErrorTraceFlag) {
168+ WelsLog (pLogCtx, WELS_LOG_WARNING,
168169 "ParseNalHeader(), no exist Parameter Sets ahead of sequence when try to decode slice(type:%d).\n",
169170 pNalUnitHeader->eNalUnitType);
171+ }
170172 pCtx->iErrorCode |= dsNoParamSets;
171173 return NULL;
172174 }
@@ -244,7 +246,7 @@ uint8_t* ParseNalHeader (PWelsDecoderContext pCtx, SNalUnitHeader* pNalUnitHeade · 71 unmodified lines
244246 uint32_t uiAvailNalNum;
245247 pCurNal = MemGetNextNal (&pCtx->pAccessUnitList);
246248 if (NULL == pCurNal) {
247− WelsLog (pLogCtx, WELS_LOG_WARNING, "MemGetNextNal() fail due out of memory.\n");
249+ WelsLog (pLogCtx, WELS_LOG_ERROR, "MemGetNextNal() fail due out of memory.\n");
248250 pCtx->iErrorCode |= dsOutOfMemory;
249251 return NULL;
250252 }
@@ -502,9 +504,6 @@ int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t · 251 unmodified lines
502504 case NAL_UNIT_SUBSET_SPS:
503505 if (iBitSize > 0)
504506 InitBits (pBs, pRbsp, iBitSize);
505−#ifdef DEBUG_PARSE_INFO
506− WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "parsing nal: %d \n", eNalType);
507−#endif
508507 iErr = ParseSps (pCtx, pBs, &iPicWidth, &iPicHeight);
509508 if (ERR_NONE != iErr) { // modified for pSps/pSubsetSps invalid, 12/1/2009
510509 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE)
@@ -517,9 +516,6 @@ int32_t ParseNonVclNal (PWelsDecoderContext pCtx, uint8_t* pRbsp, const int32_t · 6 unmodified lines
517516 case NAL_UNIT_PPS:
518517 if (iBitSize > 0)
519518 InitBits (pBs, pRbsp, iBitSize);
520−#ifdef DEBUG_PARSE_INFO
521− WelsLog (&(pCtx->sLogCtx), WELS_LOG_INFO, "parsing nal: %d \n", eNalType);
522−#endif
523519 iErr = ParsePps (pCtx, &pCtx->sPpsBuffer[0], pBs);
524520 if (ERR_NONE != iErr) { // modified for pps invalid, 12/1/2009
525521 if (pCtx->iErrorConMethod == ERROR_CON_DISABLE)
codec/decoder/core/src/decoder.cpp+4−0
@@ -295,6 +295,8 @@ void WelsOpenDecoder (PWelsDecoderContext pCtx) { · 294 unmodified lines
295295 #endif //LONG_TERM_REF
296296 pCtx->bNewSeqBegin = true;
297297 pCtx->bDecErrorConedFlag = false; //default: decoder normal status
298+ pCtx->bPrintFrameErrorTraceFlag = true;
299+ pCtx->iIgnoredErrorInfoPacketCount = 0;
298300 }
299301
300302 /*!
@@ -312,6 +314,8 @@ void WelsCloseDecoder (PWelsDecoderContext pCtx) { · 11 unmodified lines
312314 #else
313315 pCtx->bReferenceLostAtT0Flag = false;
314316 #endif
317+ pCtx->bNewSeqBegin = false;
318+ pCtx->bPrintFrameErrorTraceFlag = false;
315319 }
316320
317321 /*!
codec/decoder/core/src/decoder_core.cpp+8−4
@@ -63,14 +63,18 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 62 unmodified lines
6363 #else
6464 pCtx->bReferenceLostAtT0Flag = false; // need initialize it due new seq, 6/4/2010
6565 #endif //LONG_TERM_REF
66− WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
67− "DecodeFrameConstruction()::::output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d.\n",
66+ if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) {
67+ pCtx->bPrintFrameErrorTraceFlag = true;
68+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO,
69+ "DecodeFrameConstruction()::::output first frame of new sequence, %d x %d, crop_left:%d, crop_right:%d, crop_top:%d, crop_bottom:%d, ignored error packet:%d.\n",
6870 kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,
69− pCtx->sFrameCrop.iBottomOffset);
71+ pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount);
72+ pCtx->iIgnoredErrorInfoPacketCount = 0;
73+ }
7074 }
7175
7276 if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {
73− WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
77+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
7478 "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d \n",
7579 pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
7680 bFrameCompleteFlag = false; //return later after output buffer is done

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