[FFmpeg-devel] regression - mpeg2 interlace/topfield flags not set anymore

Rich Felker dalias
Sun Jan 27 22:03:07 CET 2008


On Sun, Jan 27, 2008 at 09:18:02AM +0100, Reimar D?ffinger wrote:
> Hello,
> On Sat, Jan 26, 2008 at 07:16:31PM -0500, Rich Felker wrote:
> > Using isnan is rather pointless; it's only use is to test nan without
> > affecting floating point exception status. Just test if (d==d)
> > instead..
> 
> Actually IIRC isnan was specifically used because (d==d) did not work
> sometimes (with -ffast-math or so?)

isnan was added by the ISO C committee, who has no interest in
brain-damaged gcc optimizations that violate the standard. The purpose
of isnan is that evaluating d==d is allowed to affect the floating
point machine status (irrelevant unless it's in use) but isnan is
required to work without affecting the status.

The gcc folks may be doing broken optimizations of d==d when
-ffast-math is specified, but I would hope not. This is certainly
wrong and positively useless as an optimization; no one would ever
write d==d unless they mean to test for nan.

Rich




More information about the ffmpeg-devel mailing list