In WelsEncoderParamAdjust it is already clipped in the same way, but here we should probably rather error out than to silently clip it to the right range.
Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -261,6 +261,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 260 unmodified lines | ||
| 261 | 261 | pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize); |
| 262 | 262 | return ENC_RETURN_UNSUPPORTED_PARA; |
| 263 | 263 | } |
| 264 | + if (pCodingParam->iLoopFilterDisableIdc < 0 || pCodingParam->iLoopFilterDisableIdc > 6) { | |
| 265 | + WelsLog (pLogCtx, WELS_LOG_ERROR, | |
| 266 | + "ParamValidationExt(), iLoopFilterDisableIdc(%d) must be between 0 and 6", | |
| 267 | + pCodingParam->iLoopFilterDisableIdc); | |
| 268 | + return ENC_RETURN_UNSUPPORTED_PARA; | |
| 269 | + } | |
| 264 | 270 | |
| 265 | 271 | |
| 266 | 272 | //about iMultipleThreadIdc, bDeblockingParallelFlag, iLoopFilterDisableIdc, & uiSliceMode |