[FFmpeg-devel] [PATCH] djgpp port

Michael Niedermayer michaelni
Wed Dec 26 04:38:29 CET 2007


On Tue, Dec 25, 2007 at 01:05:28AM +0300, Michael Kostylev wrote:
> 
> The last try. I hope.
> 
> Michael
> 
[configure stuff i dont maintain]

> diff -ur ffmpeg-export-2007-12-23/libavutil/internal.h ffmpeg-export-2007-12-23_djgpp/libavutil/internal.h
> --- ffmpeg-export-2007-12-23/libavutil/internal.h	2007-11-19 13:40:11.000000000 +0300
> +++ ffmpeg-export-2007-12-23_djgpp/libavutil/internal.h	2007-12-24 13:21:25.000000000 +0300
> @@ -280,4 +280,32 @@
>  }
>  #endif /* HAVE_LRINTF */
>  
> +#ifndef HAVE_LLRINT
> +static av_always_inline long long llrint(double x)
> +{
> +    return rint(x);
> +}
> +#endif /* HAVE_LLRINT */
> +
> +#ifndef HAVE_LRINT
> +static av_always_inline long int lrint(double x)
> +{
> +    return rint(x);
> +}
> +#endif /* HAVE_LRINT */
> +
> +#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 */
> +
> +#ifndef HAVE_ROUNDF
> +static av_always_inline float roundf(float x)
> +{
> +    return (x > 0) ? floor(x + 0.5) : ceil(x - 0.5);
> +}
> +#endif /* HAVE_ROUNDF */
> +
>  #endif /* FFMPEG_INTERNAL_H */

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 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071226/924cf3b3/attachment.pgp>



More information about the ffmpeg-devel mailing list