comment output info with FREEZE
Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 1 file). Show all
Unified · Split
| @@ -66,7 +66,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 65 unmodified lines | |||
| 66 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { | 66 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { |
| 67 | pCtx->bPrintFrameErrorTraceFlag = true; | 67 | pCtx->bPrintFrameErrorTraceFlag = true; |
| 68 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, | 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.", | 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.", |
| 70 | kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset, | 70 | kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset, |
| 71 | pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount); | 71 | pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount); |
| 72 | pCtx->iIgnoredErrorInfoPacketCount = 0; | 72 | pCtx->iIgnoredErrorInfoPacketCount = 0; |
| @@ -75,7 +75,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 2 unmodified lines | |||
| 75 | 75 | ||
| 76 | if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) { | 76 | if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) { |
| 77 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | 77 | 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 ", |
| 79 | pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); | 79 | pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); |
| 80 | bFrameCompleteFlag = false; //return later after output buffer is done | 80 | bFrameCompleteFlag = false; //return later after output buffer is done |
| 81 | if (pCtx->bInstantDecFlag) //no-delay decoding, wait for new slice | 81 | 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 | |||
| 115 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag | 115 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag |
| 116 | && pPic->bIsComplete); // When EC disable, ECed picture not output | 116 | && pPic->bIsComplete); // When EC disable, ECed picture not output |
| 117 | else if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE | 117 | 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) | 118 | || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) |
| 119 | && pCtx->iErrorCode && bOutResChange) | 119 | && pCtx->iErrorCode && bOutResChange) |
| 120 | pCtx->bFreezeOutput = true; | 120 | pCtx->bFreezeOutput = true; |
| 121 | 121 | ||
| 122 | if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) { | 122 | if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) { |
| @@ -131,8 +131,12 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 8 unmodified lines | |||
| 131 | pCtx->iErrorCode |= dsBitstreamError; | 131 | pCtx->iErrorCode |= dsBitstreamError; |
| 132 | return -1; | 132 | return -1; |
| 133 | } | 133 | } |
| 134 | if (pCtx->bFreezeOutput) | 134 | if (pCtx->bFreezeOutput) { |
| 135 | pDstInfo->iBufferStatus = 0; | 135 | pDstInfo->iBufferStatus = 0; |
| 136 | if (pCtx->bNewSeqBegin) { | ||
| 137 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "DecodeFrameConstruction():New sequence detected, but freezed."); | ||
| 138 | } | ||
| 139 | } | ||
| 136 | 140 | ||
| 137 | return 0; | 141 | return 0; |
| 138 | } | 142 | } |
| @@ -2134,7 +2138,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1995 unmodified lines | |||
| 2134 | pCtx->pDec->iLinesize, | 2138 | pCtx->pDec->iLinesize, |
| 2135 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); | 2139 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); |
| 2136 | pCtx->pDec = NULL; | 2140 | 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) { | ||
| 2138 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC | 2143 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC |
| 2139 | pCtx->pDec = NULL; | 2144 | pCtx->pDec = NULL; |
| 2140 | } | 2145 | } |
| @@ -2167,7 +2172,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 26 unmodified lines | |||
| 2167 | if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { | 2172 | if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { |
| 2168 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use | 2173 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use |
| 2169 | MarkECFrameAsRef (pCtx); | 2174 | 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) { | ||
| 2171 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use | 2177 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use |
| 2172 | } | 2178 | } |
| 2173 | } else { | 2179 | } else { |