[FFmpeg-devel] [PATCH] avfilter/vf_tonemap: don't use NAN constant as an initializer

James Almer jamrial at gmail.com
Fri Sep 8 17:38:04 EEST 2017


On 9/8/2017 5:25 AM, Nicolas George wrote:
> Le primidi 21 fructidor, an CCXXV, James Almer a écrit :
>> What can we do, then? NAN and nan("") are sometimes compile-time
>> constants and sometimes not, apparently depending on build type and
>> target system.
>>
>> CCing Vittorio as he's the author of the filter.
> 
> "The macro NAN is defined if and only if the implementation supports
> quiet NaNs for the float type. It expands to a constant expression of
> type float representing a quiet NaN."
> 
> -> If the macro is defined, it must be a compile-time constant.
> Therefore, DJGPP is wrong.

Yes, both DJGPP and Netbsd are wrong. There's a ticket in the latter's
bug tracker since like 2010.

> 
> I say let the people who care about DJGPP fix it, and in the meantime
> use "--disable-filter=tonemap".

A configure check for NAN being a compile-time constant as a dependency
for this filter is IMO a cleaner solution.

> 
> Regards,
> 
> 
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 



More information about the ffmpeg-devel mailing list