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

Michael Niedermayer michaelni
Tue Oct 13 12:54:29 CEST 2009

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)
>  {
> +    return pow(value, 4.0 / 3.0) * pow(2, exponent*0.25) + 0.5;

value * cbrtf(value) * exp2f(exponent*0.25) + 0.5

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/830572da/attachment.pgp>

More information about the ffmpeg-devel mailing list