[FFmpeg-devel] [PATCH v13 3/4] avcodec/libjxl: add Jpeg XL encoding via libjxl

Anton Khirnov anton at khirnov.net
Mon Apr 11 15:52:50 EEST 2022


Quoting Leo Izen (2022-04-11 13:16:21)
> 
> On 4/9/22 09:17, Anton Khirnov wrote:
> > Quoting Leo Izen (2022-04-05 18:55:03)
> >> +
> >> +    /* check for negative zero, our default */
> >> +    if (1.0f / ctx->distance == 1.0f / -0.0f) {
> > IIRC division by zero is UB. Why not make the default -1.0 and then just
> > check whether the number is negative?
> >
> The legal range is between 0 and 15, so if I set the default to -1, it 
> whines that the value is invalid. Should I just set the legal range to 
> -1 to 15 then and assume negative is unset?

Yes, that's what I would do.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list