On Thu, Jul 04, 2024 at 04:30:59PM +0200, Niklas Haas wrote:
> From: Niklas Haas <g...@haasn.dev>
> 
> When dealing with 4x subsampling ratios (log2 == 2), such as can arise
> with 4:1:1 or 4:1:0, a value range of 512 is not enough to cover the
> range of possible scenarios.
> 
> For example, bottom-sited chroma in 4:1:0 would require an offset of 768
> (three luma rows). Simply double the limit to 1024. I don't see any
> place in initFilter() that would experience overflow as a result of this
> change, especially since get_local_pos() right-shifts it by the
> subsampling ratio again.
> ---
>  libswscale/options.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

maybe limit it to the max value you know is needed instead of simply doubling.
it can be bumped up more later if we run in cases needing more

either way
LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to