History

Merge pull request #2127 from huili2/repos_DecoderConfigParam

move DecoderConfigParam into InitDecoder

HaiboZhu committed 11 years ago

Commit f9f2bbf2 parents 6efeb0e ecab6834 files · +49 −43Browse files

Showing the changes to codec/decoder/core (1 of 4 files). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+8−7
@@ -525,13 +525,6 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 524 unmodified lines
525525 if (NULL == pCtx || NULL == kpParam)
526526 return 1;
527527
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−
535528 memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
536529 pCtx->eOutputColorFormat = pCtx->pParam->eOutputColorFormat;
537530 if (!pCtx->bParseOnly) {
@@ -539,6 +532,14 @@ int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpPa · 1 unmodified line
539532 if (iRet)
540533 return iRet;
541534 }
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+ }
542543 pCtx->eErrorConMethod = pCtx->pParam->eEcActiveIdc;
543544
544545 if (pCtx->bParseOnly) //parse only, disable EC method

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t