This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit da6007179cb35eafd71d5664cc082581b2876362 Author: Niklas Haas <[email protected]> AuthorDate: Tue Nov 3 17:17:17 2026 +0100 Commit: Niklas Haas <[email protected]> CommitDate: Sun Nov 8 01:48:12 2026 +0000 swscale/filters: allocate padding past end of weights Cheap to do and useful to avoid a memcpy in the C backend. Signed-off-by: Niklas Haas <[email protected]> --- libswscale/filters.c | 4 +++- libswscale/filters.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libswscale/filters.c b/libswscale/filters.c index 811c5729ec..f735c91639 100644 --- a/libswscale/filters.c +++ b/libswscale/filters.c @@ -282,7 +282,9 @@ int ff_sws_filter_generate(void *log, const SwsFilterParams *params, filter->name, filter->filter_size, radius); filter->num_weights = (size_t) params->dst_size * filter->filter_size; - filter->weights = av_refstruct_allocz(filter->num_weights * sizeof(*filter->weights)); + const size_t padded = filter->num_weights + + (size_t) filter->filter_size * SWS_FILTER_PAD_ROWS; + filter->weights = av_refstruct_allocz(padded * sizeof(*filter->weights)); if (!filter->weights) { av_refstruct_unref(&filter); return AVERROR(ENOMEM); diff --git a/libswscale/filters.h b/libswscale/filters.h index a10e6f3964..b38cd34777 100644 --- a/libswscale/filters.h +++ b/libswscale/filters.h @@ -39,6 +39,7 @@ enum { */ SWS_FILTER_SCALE = (1 << 14), SWS_FILTER_SIZE_MAX = 256, + SWS_FILTER_PAD_ROWS = 32, /* extra zero rows past `weights` */ }; /* Parameters for filter generation. */ -- 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]
