History

Merge pull request #1558 from huili2/comment_outputlog

comment output info with FREEZE

sijchen committed 11 years ago

Commit e1262a92 parents fe7faf7 94dde141 file · +13 −7Browse files

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

Unified · Split

codec/decoder/core/src/decoder_core.cpp+13−7
@@ -66,7 +66,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 65 unmodified lines
6666 if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) {
6767 pCtx->bPrintFrameErrorTraceFlag = true;
6868 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.",
69+ "DecodeFrameConstruction(): will 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.",
7070 kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset,
7171 pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount);
7272 pCtx->iIgnoredErrorInfoPacketCount = 0;
@@ -75,7 +75,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 2 unmodified lines
7575
7676 if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) {
7777 WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG,
78− "DecodeFrameConstruction():::iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d ",
78+ "DecodeFrameConstruction(): iTotalNumMbRec:%d, total_num_mb_sps:%d, cur_layer_mb_width:%d, cur_layer_mb_height:%d ",
7979 pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight);
8080 bFrameCompleteFlag = false; //return later after output buffer is done
8181 if (pCtx->bInstantDecFlag) //no-delay decoding, wait for new slice
@@ -115,8 +115,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 33 unmodified lines
115115 pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag
116116 && pPic->bIsComplete); // When EC disable, ECed picture not output
117117 else if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE
118− || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
119− && pCtx->iErrorCode && bOutResChange)
118+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
119+ && pCtx->iErrorCode && bOutResChange)
120120 pCtx->bFreezeOutput = true;
121121
122122 if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) {
@@ -131,8 +131,12 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 8 unmodified lines
131131 pCtx->iErrorCode |= dsBitstreamError;
132132 return -1;
133133 }
134− if (pCtx->bFreezeOutput)
134+ if (pCtx->bFreezeOutput) {
135135 pDstInfo->iBufferStatus = 0;
136+ if (pCtx->bNewSeqBegin) {
137+ WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "DecodeFrameConstruction():New sequence detected, but freezed.");
138+ }
139+ }
136140
137141 return 0;
138142 }
@@ -2134,7 +2138,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1995 unmodified lines
21342138 pCtx->pDec->iLinesize,
21352139 pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture);
21362140 pCtx->pDec = NULL;
2137− } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
2141+ } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR
2142+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
21382143 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC
21392144 pCtx->pDec = NULL;
21402145 }
@@ -2167,7 +2172,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 26 unmodified lines
21672172 if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) {
21682173 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use
21692174 MarkECFrameAsRef (pCtx);
2170− } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
2175+ } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR
2176+ || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) {
21712177 pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use
21722178 }
21732179 } else {

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