[FFmpeg-devel] [PATCH v3 1/2] libavutil/common: clip nan value to amin
Paul B Mahol
onemda at gmail.com
Tue Nov 16 16:41:12 EET 2021
On Tue, Nov 16, 2021 at 1:57 PM Anton Khirnov <anton at khirnov.net> wrote:
> 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.
>
fmaxf,fminf does not return nan, unless both values are nan.
So to me patch is fine.
>
> --
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list