[FFmpeg-devel] Review request - ra288.{c,h} ra144.{c,h}

Michael Niedermayer michaelni
Tue Sep 16 23:53:53 CEST 2008


On Wed, Sep 17, 2008 at 12:06:31AM +0300, Siarhei Siamashka wrote:
> On Tuesday 16 September 2008, Vitor Sessak wrote:
> > Siarhei Siamashka wrote:
[...]
> > > You can try experimenting with compression of a simple signal, something
> > > like sine and check if you can see similarities in the input and output
> > > files. And then change this signal to something more complicated until
> > > the differences start getting more visible.
> >
> > I'm not sure that it is worth the trouble just to decide on using
> > lrintf() or not...
> 
> I see. Anyway, I don't like lrintf, it's slow, not quite portable (depends on

Do you have some benchmark between lrintf() and a int cast that confirms this?
(with -O3 -fno-math-errno of course)
because last time i checked lrintf() was faster, but of course thats just x86


> global rounding settings) and it is only useful on very old x86 systems (for
> which 'ff_float_to_int16_c' exists). Also as far as I know, SIMD instructions
> at least from 3DNOW and ARM NEON only efficiently support conversion with
> rounding to zero (please correct me if I'm wrong). And conversion to int with

which compiler generates 3dnow or NEON instructions for an int cast?
If none then iam not sure how this could be an argument for prefering an int
cast.


> rounding to zero should be supported well on any hardware designed to be C
> language friendly.

Well it is not on pre SSE(2) x86 and on post it requires the compiler to
generate pure SSE/SSE2 code and not utilize the x87 unit, also binaries
compile with sse2 will not run on pre SSE2 (before P4) cpus.

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- 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/20080916/e7d475b5/attachment.pgp>



More information about the ffmpeg-devel mailing list