Showing the changes to codec/decoder/core/src/decoder_core.cpp (1 of 10 files). Show all
Unified · Split
| @@ -199,11 +199,11 @@ static inline int32_t DecodeFrameConstruction (PWelsDecoderContext pCtx, uint8_t · 198 unmodified lines | |||
| 199 | || (pCtx->iLastImgHeightInPixel != pDstInfo->UsrData.sSystemBuffer.iHeight); | 199 | || (pCtx->iLastImgHeightInPixel != pDstInfo->UsrData.sSystemBuffer.iHeight); |
| 200 | pCtx->iLastImgWidthInPixel = pDstInfo->UsrData.sSystemBuffer.iWidth; | 200 | pCtx->iLastImgWidthInPixel = pDstInfo->UsrData.sSystemBuffer.iWidth; |
| 201 | pCtx->iLastImgHeightInPixel = pDstInfo->UsrData.sSystemBuffer.iHeight; | 201 | pCtx->iLastImgHeightInPixel = pDstInfo->UsrData.sSystemBuffer.iHeight; |
| 202 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) //no buffer output if EC is disabled and frame incomplete | 202 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) //no buffer output if EC is disabled and frame incomplete |
| 203 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag | 203 | pDstInfo->iBufferStatus = (int32_t) (bFrameCompleteFlag |
| 204 | && pPic->bIsComplete); // When EC disable, ECed picture not output | 204 | && pPic->bIsComplete); // When EC disable, ECed picture not output |
| 205 | else if ((pCtx->eErrorConMethod == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE | 205 | else if ((pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_COPY_CROSS_IDR_FREEZE_RES_CHANGE |
| 206 | || pCtx->eErrorConMethod == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) | 206 | || pCtx->pParam->eEcActiveIdc == ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) |
| 207 | && pCtx->iErrorCode && bOutResChange) | 207 | && pCtx->iErrorCode && bOutResChange) |
| 208 | pCtx->bFreezeOutput = true; | 208 | pCtx->bFreezeOutput = true; |
| 209 | 209 | ||
| @@ -1247,7 +1247,7 @@ int32_t UpdateAccessUnit (PWelsDecoderContext pCtx) { · 1037 unmodified lines | |||
| 1247 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, | 1247 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, |
| 1248 | "UpdateAccessUnit():::::Key frame lost.....CAN NOT find IDR from current AU."); | 1248 | "UpdateAccessUnit():::::Key frame lost.....CAN NOT find IDR from current AU."); |
| 1249 | pCtx->iErrorCode |= dsRefLost; | 1249 | pCtx->iErrorCode |= dsRefLost; |
| 1250 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | 1250 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { |
| 1251 | #ifdef LONG_TERM_REF | 1251 | #ifdef LONG_TERM_REF |
| 1252 | pCtx->iErrorCode |= dsNoParamSets; | 1252 | pCtx->iErrorCode |= dsNoParamSets; |
| 1253 | return dsNoParamSets; | 1253 | return dsNoParamSets; |
| @@ -2283,7 +2283,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 1029 unmodified lines | |||
| 2283 | 2283 | ||
| 2284 | bAllRefComplete = false; | 2284 | bAllRefComplete = false; |
| 2285 | pCtx->iErrorCode |= dsRefLost; | 2285 | pCtx->iErrorCode |= dsRefLost; |
| 2286 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | 2286 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { |
| 2287 | #ifdef LONG_TERM_REF | 2287 | #ifdef LONG_TERM_REF |
| 2288 | pCtx->bParamSetsLostFlag = true; | 2288 | pCtx->bParamSetsLostFlag = true; |
| 2289 | #else | 2289 | #else |
| @@ -2303,7 +2303,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 13 unmodified lines | |||
| 2303 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, | 2303 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_DEBUG, |
| 2304 | "reference picture introduced by this frame is lost during transmission! uiTId: %d", | 2304 | "reference picture introduced by this frame is lost during transmission! uiTId: %d", |
| 2305 | pNalCur->sNalHeaderExt.uiTemporalId); | 2305 | pNalCur->sNalHeaderExt.uiTemporalId); |
| 2306 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | 2306 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { |
| 2307 | if (pCtx->iTotalNumMbRec == 0) | 2307 | if (pCtx->iTotalNumMbRec == 0) |
| 2308 | pCtx->pDec = NULL; | 2308 | pCtx->pDec = NULL; |
| 2309 | return iRet; | 2309 | return iRet; |
| @@ -2320,7 +2320,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 10 unmodified lines | |||
| 2320 | iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ); | 2320 | iRet, pSh->iFrameNum, iCurrIdD, iCurrIdQ); |
| 2321 | bAllRefComplete = false; | 2321 | bAllRefComplete = false; |
| 2322 | HandleReferenceLostL0 (pCtx, pNalCur); | 2322 | HandleReferenceLostL0 (pCtx, pNalCur); |
| 2323 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | 2323 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { |
| 2324 | if (pCtx->iTotalNumMbRec == 0) | 2324 | if (pCtx->iTotalNumMbRec == 0) |
| 2325 | pCtx->pDec = NULL; | 2325 | pCtx->pDec = NULL; |
| 2326 | return iRet; | 2326 | return iRet; |
| @@ -2380,7 +2380,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 53 unmodified lines | |||
| 2380 | if (!pCtx->bInstantDecFlag) { | 2380 | if (!pCtx->bInstantDecFlag) { |
| 2381 | if (!pCtx->pParam->bParseOnly) { | 2381 | if (!pCtx->pParam->bParseOnly) { |
| 2382 | //Do error concealment here | 2382 | //Do error concealment here |
| 2383 | if ((NeedErrorCon (pCtx)) && (pCtx->eErrorConMethod != ERROR_CON_DISABLE)) { | 2383 | if ((NeedErrorCon (pCtx)) && (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE)) { |
| 2384 | ImplementErrorCon (pCtx); | 2384 | ImplementErrorCon (pCtx); |
| 2385 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | 2385 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; |
| 2386 | pCtx->pDec->iSpsId = pCtx->pSps->iSpsId; | 2386 | pCtx->pDec->iSpsId = pCtx->pSps->iSpsId; |
| @@ -2399,7 +2399,7 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, SBuf · 12 unmodified lines | |||
| 2399 | if (iRet != ERR_NONE) { | 2399 | if (iRet != ERR_NONE) { |
| 2400 | if (iRet == ERR_INFO_DUPLICATE_FRAME_NUM) | 2400 | if (iRet == ERR_INFO_DUPLICATE_FRAME_NUM) |
| 2401 | pCtx->iErrorCode |= dsBitstreamError; | 2401 | pCtx->iErrorCode |= dsBitstreamError; |
| 2402 | if (pCtx->eErrorConMethod == ERROR_CON_DISABLE) { | 2402 | if (pCtx->pParam->eEcActiveIdc == ERROR_CON_DISABLE) { |
| 2403 | pCtx->pDec = NULL; | 2403 | pCtx->pDec = NULL; |
| 2404 | return iRet; | 2404 | return iRet; |
| 2405 | } | 2405 | } |
| @@ -2449,7 +2449,7 @@ bool CheckAndFinishLastPic (PWelsDecoderContext pCtx, uint8_t** ppDst, SBufferIn · 43 unmodified lines | |||
| 2449 | 2449 | ||
| 2450 | //Do Error Concealment here | 2450 | //Do Error Concealment here |
| 2451 | if (bAuBoundaryFlag && (pCtx->iTotalNumMbRec != 0) && NeedErrorCon (pCtx)) { //AU ready but frame not completely reconed | 2451 | if (bAuBoundaryFlag && (pCtx->iTotalNumMbRec != 0) && NeedErrorCon (pCtx)) { //AU ready but frame not completely reconed |
| 2452 | if (pCtx->eErrorConMethod != ERROR_CON_DISABLE) { | 2452 | if (pCtx->pParam->eEcActiveIdc != ERROR_CON_DISABLE) { |
| 2453 | ImplementErrorCon (pCtx); | 2453 | ImplementErrorCon (pCtx); |
| 2454 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; | 2454 | pCtx->iTotalNumMbRec = pCtx->pSps->iMbWidth * pCtx->pSps->iMbHeight; |
| 2455 | pCtx->pDec->iSpsId = pCtx->pSps->iSpsId; | 2455 | pCtx->pDec->iSpsId = pCtx->pSps->iSpsId; |