Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 2 files). Show all
Unified · Split
| @@ -185,7 +185,7 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 184 unmodified lines | ||
| 185 | 185 | if (pCfg->bEnableSceneChangeDetect == false) { |
| 186 | 186 | pCfg->bEnableSceneChangeDetect = true; |
| 187 | 187 | WelsLog (pLogCtx, WELS_LOG_WARNING, |
| 188 | − "ParamValidation(), screen change detection should be turned on,change bEnableSceneChangeDetect as true"); | |
| 188 | + "ParamValidation(), screen change detection should be turned on, change bEnableSceneChangeDetect as true"); | |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | } |
| @@ -196,12 +196,22 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 4 unmodified lines | ||
| 196 | 196 | SSpatialLayerConfig* fDlp = &pCfg->sSpatialLayers[i]; |
| 197 | 197 | if ((fDlp->iVideoWidth > iFinalWidth) || (fDlp->iVideoHeight > iFinalHeight)) { |
| 198 | 198 | WelsLog (pLogCtx, WELS_LOG_ERROR, |
| 199 | − "ParamValidation,Invalid resolution layer(%d) resolution(%d x %d) shoudl be less than the highest spatial layer resolution(%d x %d) ", | |
| 199 | + "ParamValidation,Invalid resolution layer(%d) resolution(%d x %d) should be less than the highest spatial layer resolution(%d x %d) ", | |
| 200 | 200 | i, fDlp->iVideoWidth, fDlp->iVideoHeight, iFinalWidth, iFinalHeight); |
| 201 | 201 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 202 | 202 | } |
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | + | |
| 206 | + if (!CheckInRangeCloseOpen (pCfg->iLoopFilterDisableIdc, DEBLOCKING_IDC_0, DEBLOCKING_IDC_2 + 1) || | |
| 207 | + !CheckInRangeCloseOpen (pCfg->iLoopFilterAlphaC0Offset, DEBLOCKING_OFFSET_MINUS, DEBLOCKING_OFFSET + 1) || | |
| 208 | + !CheckInRangeCloseOpen (pCfg->iLoopFilterBetaOffset, DEBLOCKING_OFFSET_MINUS, DEBLOCKING_OFFSET + 1)) { | |
| 209 | + WelsLog (pLogCtx, WELS_LOG_ERROR, | |
| 210 | + "ParamValidation, Invalid iLoopFilterDisableIdc(%d) or iLoopFilterAlphaC0Offset(%d) or iLoopFilterBetaOffset(%d)!", | |
| 211 | + pCfg->iLoopFilterDisableIdc, pCfg->iLoopFilterAlphaC0Offset, pCfg->iLoopFilterBetaOffset); | |
| 212 | + return ENC_RETURN_UNSUPPORTED_PARA; | |
| 213 | + } | |
| 214 | + | |
| 205 | 215 | for (i = 0; i < pCfg->iSpatialLayerNum; ++ i) { |
| 206 | 216 | SSpatialLayerInternal* fDlp = &pCfg->sDependencyLayers[i]; |
| 207 | 217 | SSpatialLayerConfig* pConfig = &pCfg->sSpatialLayers[i]; |
| @@ -314,12 +324,6 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 106 unmodified lines | ||
| 314 | 324 | pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize); |
| 315 | 325 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 316 | 326 | } |
| 317 | − if (pCodingParam->iLoopFilterDisableIdc < 0 || pCodingParam->iLoopFilterDisableIdc > 6) { | |
| 318 | − WelsLog (pLogCtx, WELS_LOG_ERROR, | |
| 319 | − "ParamValidationExt(), iLoopFilterDisableIdc(%d) must be between 0 and 6", | |
| 320 | − pCodingParam->iLoopFilterDisableIdc); | |
| 321 | − return ENC_RETURN_UNSUPPORTED_PARA; | |
| 322 | − } | |
| 323 | 327 | |
| 324 | 328 | //about iMultipleThreadIdc, bDeblockingParallelFlag, iLoopFilterDisableIdc, & uiSliceMode |
| 325 | 329 | // (1) Single Thread |