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 | 66 | if (pCtx->iTotalNumMbRec == kiTotalNumMbInCurLayer) { |
| 67 | 67 | pCtx->bPrintFrameErrorTraceFlag = true; |
| 68 | 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 | 70 | kiWidth, kiHeight, pCtx->sFrameCrop.iLeftOffset, pCtx->sFrameCrop.iRightOffset, pCtx->sFrameCrop.iTopOffset, |
| 71 | 71 | pCtx->sFrameCrop.iBottomOffset, pCtx->iIgnoredErrorInfoPacketCount); |
| 72 | 72 | pCtx->iIgnoredErrorInfoPacketCount = 0; |
| @@ -75,7 +75,7 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 2 unmodified lines | ||
| 75 | 75 | |
| 76 | 76 | if (pCtx->iTotalNumMbRec != kiTotalNumMbInCurLayer) { |
| 77 | 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 | 79 | pCtx->iTotalNumMbRec, kiTotalNumMbInCurLayer, pCurDq->iMbWidth, pCurDq->iMbHeight); |
| 80 | 80 | bFrameCompleteFlag = false; //return later after output buffer is done |
| 81 | 81 | if (pCtx->bInstantDecFlag) //no-delay decoding, wait for new slice |
| @@ -114,8 +114,8 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 32 unmodified lines | ||
| 114 | 114 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag |
| 115 | 115 | && pPic->bIsComplete); // When EC disable, ECed picture not output |
| 116 | 116 | else if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE |
| 117 | − || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) | |
| 118 | − && pCtx->iErrorCode && bOutResChange) | |
| 117 | + || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) | |
| 118 | + && pCtx->iErrorCode && bOutResChange) | |
| 119 | 119 | pCtx->bFreezeOutput = true; |
| 120 | 120 | |
| 121 | 121 | if ((pDstInfo->iBufferStatus == 1) && (pCurDq->sLayerInfo.sNalHeaderExt.bIdrFlag)) { |
| @@ -130,8 +130,12 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 8 unmodified lines | ||
| 130 | 130 | pCtx->iErrorCode |= dsBitstreamError; |
| 131 | 131 | return -1; |
| 132 | 132 | } |
| 133 | − if (pCtx->bFreezeOutput) | |
| 133 | + if (pCtx->bFreezeOutput) { | |
| 134 | 134 | pDstInfo->iBufferStatus = 0; |
| 135 | + if (pCtx->bNewSeqBegin) { | |
| 136 | + WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "DecodeFrameConstruction():New sequence detected, but freezed."); | |
| 137 | + } | |
| 138 | + } | |
| 135 | 139 | |
| 136 | 140 | return 0; |
| 137 | 141 | } |
| @@ -2131,7 +2135,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1993 unmodified lines | ||
| 2131 | 2135 | pCtx->pDec->iLinesize, |
| 2132 | 2136 | pCtx->sExpandPicFunc.pfExpandLumaPicture, pCtx->sExpandPicFunc.pfExpandChromaPicture); |
| 2133 | 2137 | pCtx->pDec = NULL; |
| 2134 | − } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) { | |
| 2138 | + } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR | |
| 2139 | + || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) { | |
| 2135 | 2140 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //store latest decoded picture for MV Copy EC |
| 2136 | 2141 | pCtx->pDec = NULL; |
| 2137 | 2142 | } |
| @@ -2164,7 +2169,8 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 26 unmodified lines | ||
| 2164 | 2169 | if (pCtx->sLastNalHdrExt.sNalUnitHeader.uiNalRefIdc > 0) { |
| 2165 | 2170 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future use |
| 2166 | 2171 | MarkECFrameAsRef (pCtx); |
| 2167 | − } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) { | |
| 2172 | + } else if (pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR | |
| 2173 | + || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) { | |
| 2168 | 2174 | pCtx->pPreviousDecodedPictureInDpb = pCtx->pDec; //save ECed pic for future MV Copy use |
| 2169 | 2175 | } |
| 2170 | 2176 | } else { |