History

Merge pull request #1745 from sijchen/fix_ut

[UT] fix a random failure of UT

ruil2 committed 11 years ago

Commit e7fff102 parents 1703019 5b10c1f3 files · +13 −4Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 3 files). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+7−3
@@ -491,7 +491,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 490 unmodified lines
491491 iMbHeight = (kiPicHeight + 15) >> 4;
492492 iMaxSliceNum = MAX_SLICES_NUM;
493493 if (iMbHeight > iMaxSliceNum) {
494− WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX!", iMbHeight);
494+ WelsLog (pLogCtx, WELS_LOG_ERROR, "ParamValidationExt(), invalid uiSliceNum (%d) settings more than MAX(%d)!", iMbHeight, MAX_SLICES_NUM);
495495 return ENC_RETURN_UNSUPPORTED_PARA;
496496 }
497497 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceNum = iMbHeight;
@@ -527,7 +527,7 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 29 unmodified lines
527527 if (pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint > (pCodingParam->uiMaxNalSize -
528528 NAL_HEADER_ADD_0X30BYTES)) {
529529 WelsLog (pLogCtx, WELS_LOG_WARNING,
530− "ParamValidationExt(), slice mode = SM_DYN_SLICE, uiSliceSizeConstraint = %d ,uiMaxNalsize = %d!",
530+ "ParamValidationExt(), slice mode = SM_DYN_SLICE, uiSliceSizeConstraint = %d ,uiMaxNalsize = %d, will take uiMaxNalsize!",
531531 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint, pCodingParam->uiMaxNalSize);
532532 pSpatialLayer->sSliceCfg.sSliceArgument.uiSliceSizeConstraint = pCodingParam->uiMaxNalSize - NAL_HEADER_ADD_0X30BYTES;
533533 }
@@ -4121,9 +4121,13 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa · 3587 unmodified lines
41214121 return iReturn;
41224122 }
41234123
4124−
41254124 pOldParam = (*ppCtx)->pSvcParam;
41264125
4126+ if (pOldParam->iUsageType != pNewParam->iUsageType) {
4127+ WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_ERROR, "WelsEncoderParamAdjust(), does not expect in-middle change of iUsgaeType from %d to %d", pOldParam->iUsageType, pNewParam->iUsageType);
4128+ return ENC_RETURN_UNSUPPORTED_PARA;
4129+ }
4130+
41274131 /* Decide whether need reset for IDR frame based on adjusting prarameters changed */
41284132 /* Temporal levels, spatial settings and/ or quality settings changed need update parameter sets related. */
41294133 bNeedReset = (pOldParam == NULL) ||

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