avfilter/estdif: avoid signed overflow in slice boundary calculation
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 6 Jun 2026 19:02:16 +0000 (21:02 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 18 Jun 2026 18:31:03 +0000 (20:31 +0200)
commit6e316ecb8b72697705f4a6dc88280879eb14b0f1
treeb8ee1572123916893d351ba4771daf551fa9414d
parent2dd97b8d0b2c32e4abc8699ee807769c24e8e058
avfilter/estdif: avoid signed overflow in slice boundary calculation

deinterlace_slice() computed per-thread row boundaries with int
multiplication height * (jobnr + 1). With a tall frame and many filter
threads the product overflows signed int before the division by nb_jobs.

Use int64_t for the intermediate product before converting back to int
row indices.

Found-by: Kery (Qi Kery <qikeyu2001@outlook.com>)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 200e0cba677b0d478576081ecf12af92b7a4a2d2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_estdif.c