[FFmpeg-devel] [RFC] simplify exp_table generation

Michael Niedermayer michaelni
Sat Nov 7 21:11:13 CET 2009


On Sat, Nov 07, 2009 at 04:58:36PM +0100, Reimar D?ffinger wrote:
> On Sat, Nov 07, 2009 at 02:32:30PM +0100, Michael Niedermayer wrote:
> > On Fri, Nov 06, 2009 at 08:55:20PM +0100, Reimar D?ffinger wrote:
> > > Hello,
> > > following patch IMO makes it more obvious that exp_table is just a
> > > partial copy of expval_table and avoids the duplicate llrintf.
> > 
> > if you want to split that code out, i would say it could be split
> > in 2 loops like
> > for(512)
> >     for(16)
> > 
> > this should be simpler than what you suggest
> 
> Alternative suggestion attached.

i commited something similar


> 
> > > I think I also asked whether it is probably ok to replace the llrintf(f)
> > > with f + 0.5, since llrintf is not available everywhere and the
> > > libavutil/mathematics.h workaround is difficult to use for the case of
> > > hardcoded tables + cross-compiling.
> > 
> > my gut feeling says no, it will cause float exceptions on some platforms
> > like the code that that we had prior to llrintf()
> 
> Ah, interesting, I thought that was only for speed reasons.
> Anyone remember details (grepping svnlog was no help)?

maybe it fp exceptioned because the value vas out of INT_MIN/MAX range
maybe casting to int64_t and back to 32 first would help, i dunno ...


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

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- 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/20091107/11bb1cd0/attachment.pgp>



More information about the ffmpeg-devel mailing list