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

Leo Izen leo.izen at gmail.com
Mon Apr 11 14:16:21 EEST 2022


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?

-Leo Izen (thebombzen)




More information about the ffmpeg-devel mailing list