[FFmpeg-devel] [PATCH v3 1/2] libavutil/common: clip nan value to amin

Anton Khirnov anton at khirnov.net
Tue Nov 16 14:57:42 EET 2021


Quoting mindmark at gmail.com (2021-11-15 07:22:20)
> From: Mark Reid <mindmark at gmail.com>
> 
> Changes av_clipf to return amin if a is nan.
> Before if a is nan av_clipf_c returned nan and
> av_clipf_sse would return amax. Now the both
> should behave the same.
> 
> This works because nan > amin is false.
> The max(nan, amin) will be amin.

This seems like it goes against the point of nan. I would expect any
float operation involving nan to return nan.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list