[FFmpeg-devel] [RFC] "simplify" rdft sin table init

Reimar Döffinger Reimar.Doeffinger
Fri Nov 6 14:58:12 CET 2009


On Fri, Nov 06, 2009 at 02:42:15PM +0100, Michael Niedermayer wrote:
> On Thu, Nov 05, 2009 at 07:37:37PM +0100, Reimar D?ffinger wrote:
> > Hello,
> > this patch would make rdft init initialize the whole table for the bit
> > size selected, not just one half depending on transform.
> > It seems a bit simpler to me, though mostly due to the different but very
> > similar-looking conditions used, which could also be avoided by using an
> > extra variable for the condition.
> > Any opinions?
> 
> Initalizinh tables unneccesarily means more memory will be needed

In principle yes.
In this specific case at most ff_sin_512 is currently actually used,
which I think has a size of 512 bytes, so unless that by chance crosses
a page boundary it makes no difference in memory usage.
I sure don't intend to insist though, it is marked as [RFC] on purpose.
That is of course besides questions like if we should really have the
ff_sin tables 1024 to 64k if we don't use them etc.
I also wonder which codec needs the ff_cos_65536 table, most seem to
need at most ff_cos_1024...



More information about the ffmpeg-devel mailing list