PR #24476 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24476 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/24476.patch
Fixes: division by zero Fixes: tiny_16x8.h264 Fixes: W9IyRhjCcQxd Found-by: zhang xingxing Signed-off-by: Michael Niedermayer <[email protected]> >From 71979c92336089ebc98ce3856a49e94c3db4f94a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer <[email protected]> Date: Mon, 14 Sep 2026 02:55:36 +0200 Subject: [PATCH] avfilter/vf_uspp: Fix qpcount Fixes: division by zero Fixes: tiny_16x8.h264 Fixes: W9IyRhjCcQxd Found-by: zhang xingxing Signed-off-by: Michael Niedermayer <[email protected]> --- libavfilter/vf_uspp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index c5efd44f92..94ced61d0f 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -314,7 +314,10 @@ static void filter(AVFilterContext *ctx, uint8_t *dst[3], uint8_t *src[3], p->quality = p->qp * FF_QP2LAMBDA; else { int qpsum=0; - int qpcount = (height>>4) * (height>>4); + int qpcount = (width>>4) * (height>>4); + + qpsum += !qpcount; + qpcount += !qpcount; for (y = 0; y < (height>>4); y++) { for (x = 0; x < (width>>4); x++) -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
