[FFmpeg-devel] [PATCH] djgpp port
Wed Dec 26 18:29:14 CET 2007
At Wed, Dec 26 2007 04:38:29 CET +0100,
Michael Niedermayer wrote:
>> +#ifndef HAVE_ROUND
>> +static av_always_inline double round(double x)
>> + return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
>> +#endif /* HAVE_ROUND */
> iam ok with this, though if i were picky i could complain that
> your round implementation fails for 0.49999999999999994449 amongth others
> but i guess its good enough. Fixing that would make it slower and
> uglier with no real advantage ...
IIRC the glibc round has the same behavior inside the __DBL_EPSILON__ neighborhood of x.5. In addition you could complain that my fake round uses uncommon rounding mode.
More information about the ffmpeg-devel