Showing the changes to codec/decoder/core/src/decoder.cpp (1 of 4 files). Show all
Unified · Split
| @@ -525,13 +525,6 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 524 unmodified lines | |||
| 525 | if (NULL == pCtx || NULL == kpParam) | 525 | if (NULL == pCtx || NULL == kpParam) |
| 526 | return 1; | 526 | return 1; |
| 527 | 527 | ||
| 528 | CMemoryAlign* pMa = pCtx->pMemAlign; | ||
| 529 | |||
| 530 | pCtx->pParam = (SDecodingParam*)pMa->WelsMallocz (sizeof (SDecodingParam), "SDecodingParam"); | ||
| 531 | |||
| 532 | if (NULL == pCtx->pParam) | ||
| 533 | return 1; | ||
| 534 | |||
| 535 | memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam)); | 528 | memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam)); |
| 536 | pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat; | 529 | pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat; |
| 537 | if (!pCtx->bParseOnly) { | 530 | if (!pCtx->bParseOnly) { |
| @@ -539,6 +532,14 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 1 unmodified line | |||
| 539 | if (iRet) | 532 | if (iRet) |
| 540 | return iRet; | 533 | return iRet; |
| 541 | } | 534 | } |
| 535 | if ((pCtx->pParam->eEcActiveIdc > ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE) | ||
| 536 | || (pCtx->pParam->eEcActiveIdc < ERROR_CON_DISABLE)) { | ||
| 537 | WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING, | ||
| 538 | "eErrorConMethod (%d) not in range: (%d - %d). Set as default value: (%d).", pCtx->pParam->eEcActiveIdc, | ||
| 539 | ERROR_CON_DISABLE, ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE, | ||
| 540 | ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE); | ||
| 541 | pCtx->pParam->eEcActiveIdc = ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE; | ||
| 542 | } | ||
| 542 | pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc; | 543 | pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc; |
| 543 | 544 | ||
| 544 | if (pCtx->bParseOnly) //parse only, disable EC method | 545 | if (pCtx->bParseOnly) //parse only, disable EC method |