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/src (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
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 method545 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