MCPcopy Create free account
hub / github.com/cisco/openh264 / DecoderConfigParam

Function DecoderConfigParam

codec/decoder/core/src/decoder.cpp:648–676  ·  view source on GitHub ↗

! * \brief configure decoder parameters */

Source from the content-addressed store, hash-verified

646 * \brief configure decoder parameters
647 */
648int32_t DecoderConfigParam (PWelsDecoderContext pCtx, const SDecodingParam* kpParam) {
649 if (NULL == pCtx || NULL == kpParam)
650 return ERR_INFO_INVALID_PARAM;
651
652 memcpy (pCtx->pParam, kpParam, sizeof (SDecodingParam));
653 if ((pCtx->pParam->eEcActiveIdc > ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE)
654 || (pCtx->pParam->eEcActiveIdc < ERROR_CON_DISABLE)) {
655 WelsLog (& (pCtx->sLogCtx), WELS_LOG_WARNING,
656 "eErrorConMethod (%d) not in range: (%d - %d). Set as default value: (%d).", pCtx->pParam->eEcActiveIdc,
657 ERROR_CON_DISABLE, ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE,
658 ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE);
659 pCtx->pParam->eEcActiveIdc = ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE;
660 }
661
662 if (pCtx->pParam->bParseOnly) //parse only, disable EC method
663 pCtx->pParam->eEcActiveIdc = ERROR_CON_DISABLE;
664 InitErrorCon (pCtx);
665
666 if (VIDEO_BITSTREAM_SVC == pCtx->pParam->sVideoProperty.eVideoBsType ||
667 VIDEO_BITSTREAM_AVC == pCtx->pParam->sVideoProperty.eVideoBsType) {
668 pCtx->eVideoType = pCtx->pParam->sVideoProperty.eVideoBsType;
669 } else {
670 pCtx->eVideoType = VIDEO_BITSTREAM_DEFAULT;
671 }
672
673 WelsLog (& (pCtx->sLogCtx), WELS_LOG_INFO, "eVideoType: %d", pCtx->eVideoType);
674
675 return ERR_NONE;
676}
677
678/*!
679 *************************************************************************************

Callers 2

InitDecoderFunction · 0.85
InitDecoderCtxMethod · 0.85

Calls 2

WelsLogFunction · 0.85
InitErrorConFunction · 0.85

Tested by

no test coverage detected