History

Validate that iLoopFilterDisableIdc is set to a sensible value in ParamValidationExt

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.

Martin Storsjö committed 11 years ago

Commit 0bae0f81 parent 24cd9341 file · +6 −0Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+6−0
@@ -261,6 +261,12 @@ int32_t ParamValidationExt (SLogContext* pLogCtx, SWelsSvcCodingParam* pCodingPa · 260 unmodified lines
261 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);261 pCodingParam->uiIntraPeriod, pCodingParam->uiGopSize);
262 return ENC_RETURN_UNSUPPORTED_PARA;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 //about iMultipleThreadIdc, bDeblockingParallelFlag, iLoopFilterDisableIdc, & uiSliceMode272 //about iMultipleThreadIdc, bDeblockingParallelFlag, iLoopFilterDisableIdc, & uiSliceMode

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