[MPlayer-dev-eng] lround?

Felix Buenemann atmosfear at users.sourceforge.net
Sun Jun 16 01:15:24 CEST 2002


On Sunday 16 June 2002 01:42, Arpi wrote:
> Hi,
>
> > > > pl_eq.o(.text+0x311): undefined reference to `lround'
> > > > libao2/libao2.a(pl_eq.o): In function `bp2': pl_eq.o(.text+0x6c4):
> > > > undefined reference to `lround'
> > > > libao2/libao2.a(pl_eq.o)(.text+0x6e2): more undefined references to
> > > > `lround' follow gmake: *** [mplayer] Error
> >
> > 1
> >
> > > Just, checked various unix manapages and it seems this is linux-only.
> >
> > Seems a simple replacement of this is to just add .5 to the value and
> > assign to an integer, why a function for it?
>
> imho lround and +.5 behaves different with negative numbers
hmm hadn't thought about that, Anders can check the code and correct if 
neccessary.

> and probably c compilers have optimized inline code/macro for it...
> (afair there is such rounding&conversion instruction on x86, so it may be
> even faster than adding a constant and then converting to int)
#define FLOAT_TO_INT(in,out)  \
  __asm__ __volatile__("fistpl %0" : "=m" (out) : "t" (in) : "st");

But it's not worth as this func is only called on init.

> A'rpi / Astral & ESP-team

-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________



More information about the MPlayer-dev-eng mailing list