[FFmpeg-devel] [RFC] remove table_4_3_value with CONFIG_SMALL

Michael Niedermayer michaelni
Tue Oct 13 13:18:02 CEST 2009


On Tue, Oct 13, 2009 at 01:11:39PM +0200, Reimar D?ffinger wrote:
> On Tue, Oct 13, 2009 at 12:54:29PM +0200, Michael Niedermayer wrote:
> > On Tue, Oct 13, 2009 at 12:24:58PM +0200, Reimar D?ffinger wrote:
> > > Hello,
> > > at over 128kB this is one of the largest variables in .bss
> > > Since it is in .bss I'm not 100% sure it is worth avoiding, though
> > > it might help compiling on IA64 which currently can't handle .bss > 4 MB
> > > with gcc at least.
> > > Attached patch instead uses pow etc. if CONFIG_SMALL is set.
> > > Which on the other hand might be really silly because the systems where
> > > you'd use CONFIG_SMALL are those that are least likely to have a fast
> > > pow implementation...
> > > I also admit that the pow for the exponent could probably be trivially
> > > replaced by shift and a 4-entry multiplication table for the lower bits.
> > 
> > [...]
> > > @@ -218,6 +220,9 @@
> > >  /* compute value^(4/3) * 2^(exponent/4). It normalized to FRAC_BITS */
> > >  static inline int l3_unscale(int value, int exponent)
> > >  {
> > > +#if CONFIG_SMALL
> > > +    return pow(value, 4.0 / 3.0) * pow(2, exponent*0.25) + 0.5;
> > 
> > value * cbrtf(value) * exp2f(exponent*0.25) + 0.5
> 
> Is exp2f going to be faster than
> (1 << (exponent >> 2)) * exptbl[exponent & 3]

i dont know at all


> (I think that might assume exponent to not be negative, but the current
> code already looks like it is).

> Either way, should the code that generates the tables be updated to use
> the same formula?

as you prefer ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- 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/20091013/4dcfa8a0/attachment.pgp>



More information about the ffmpeg-devel mailing list