[FFmpeg-devel] check_func() from configure & "math.h"

ami_stuff ami_stuff
Wed Aug 19 04:01:16 CEST 2009


> > I have defined functions like lrint/lrintf/log2/round/roundf in the
> > "math.h" include.  When I run "configure", it can't find them, so I
> > must always define them manually to 1 in the "config.h" file.
> >
> > Maybe it would be possible to also add check for functions in the
> > "math.h", not only in the linkable libs?
> 
> The standard requires those functions in the library.  Redo your homework.

But functions in library probably would be slower.

static inline long lrintf(float x)
{
	long value;
__asm ("        fmove%.l %1,     %0\n\t"
		 : "=d" (value)
		 : "f" (x));
	  return value;

}

static inline long lrint(double x)
{
	long value;
__asm ("        fmove%.l %1,     %0\n\t"
		 : "=d" (value)
		 : "f" (x));
	  return value;

}



More information about the ffmpeg-devel mailing list