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