This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 51515b27e49f5e18656eb44e42c7555847824b1f Author: Niklas Haas <[email protected]> AuthorDate: Tue Sep 1 18:42:09 2026 +0200 Commit: Niklas Haas <[email protected]> CommitDate: Sun Nov 8 00:36:29 2026 +0000 swscale/filters: constrain SWS_FILTER_BICUBIC parameter range The filter is not really useful outside of these parameters, and clamping the domain lets us reason about the expected overshoot. In particular, B < 0 is completely broken, as is B >= 3 (already identified in the code). C is more relaxed, but outside [-1.5, 2.0] it would also overshoot by too much (relative to the upcoming change). There's a final constraint of 2B + C <= 3. Limiting both parameters to [0, 1] solves all problems at once and is the standard practice. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/filters.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libswscale/filters.c b/libswscale/filters.c index fb54d2bbd8..3073ed8cdc 100644 --- a/libswscale/filters.c +++ b/libswscale/filters.c @@ -148,7 +148,8 @@ static bool validate_params(const SwsFilterFunction *fun, SwsScaler scaler) case SWS_SCALE_LANCZOS: return fun->params[0] >= 1.0 && fun->params[0] <= RADIUS_MAX; /* radius */ case SWS_SCALE_BICUBIC: - return fun->params[0] < 3.0; /* B param (division by zero) */ + return fun->params[0] >= 0.0 && fun->params[0] <= 1.0 /* B */ && + fun->params[1] >= 0.0 && fun->params[1] <= 1.0 /* C */; default: return true; } -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
