[Ffmpeg-devel] Fixed point arithmetic RealAudio G2 (cook) decoder

Roman Shaposhnik rvs
Tue Mar 13 04:11:55 CET 2007


On Mon, 2007-03-12 at 22:14 -0500, Rich Felker wrote:
> On Thu, Mar 08, 2007 at 10:28:18PM +0100, Michael Niedermayer wrote:
> > [...]
> > > +static const FIXPU sincos_lookup[2050] = {
> > > +    /* x_i = 2^16 sin(i 2pi/8192), 2^16 cos(i 2pi/8192); i=0..1024 */
> > 
> > i think such large tables should be generated instead of hardcoded
> 
> on the other hand, i'd kinda like it if _all_ the tables in lavc were
> hardcoded instead of generated. this would allow them to be in shared
> memory and would eliminate all the issues with global initialization,
> dynamic loading, and memory leaks vs crashes.

  That's been my exact perspective for quite some time now. Although,
I'd love to be contradicted on the usefulness/performance implications
of doing this.

Thanks,
Roman.

P.S. Or may be its just a compiler engineer in me expecting that
if you give your tables to the compiler in a const form it might
actually do most of the computations by folding lots of stuff so that
you end up with just one scalar not doing anything at runtime... ;-)





More information about the ffmpeg-devel mailing list