[FFmpeg-devel] [RFC] remove lrintf fallback implementation
Måns Rullgård
mans
Sun Oct 21 00:33:00 CEST 2007
"V?ctor Paesa" <wzrlpy at arsystel.com> writes:
> Index: configure
> ===================================================================
> --- configure (revision 10822)
> +++ configure (working copy)
> @@ -701,6 +701,7 @@
> getrusage
> imlib2
> inet_aton
> + llrint
> lrintf
> machine_ioctl_bt848_h
> machine_ioctl_meteor_h
Alphabetical order OK.
> @@ -1501,6 +1502,7 @@
> check_func inet_aton
> check_func memalign
> check_func mkstemp
> +check_func2 math.h llrint
> check_func2 windows.h GetProcessTimes
Is it necessary to use check_func2?
> Index: libavutil/internal.h
> ===================================================================
> --- libavutil/internal.h (revision 10822)
> +++ libavutil/internal.h (working copy)
> @@ -278,4 +278,17 @@
> }
> #endif /* HAVE_LRINTF */
>
> +#ifndef HAVE_LLRINT
> +#if defined(ARCH_X86)
> +static av_always_inline long long int llrint(double x)
> +{
> + long long int llrintres;
> + asm
> + ("fistpll %0"
> + : "=m" (llrintres) : "t" (x) : "st");
The formatting of this asm() statement is incredibly ugly.
> + return llrintres;
> +}
> +#endif /* defined(ARCH_X86) */
> +#endif /* HAVE_LLRINT */
And what it's not ARCH_X86?
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list