[FFmpeg-devel] [PATCH] add small sizes to ff_sine_windows[] array

Reimar Döffinger Reimar.Doeffinger
Mon Sep 14 18:22:12 CEST 2009

On Mon, Sep 14, 2009 at 06:09:46PM +0200, Vitor Sessak wrote:
> Hi,
> This should fix issue 1384 with TwinVQ decoder. I could add just a 
> couple of sizes, but I think that adding all the seven are worth it to 
> completely avoid this kind of error in the future. It also IMHO improves 
> of clarity of the resulting code, for example:
> > -    ff_sine_window_init(ff_sine_windows[av_log2(mtab->size) - 7], mtab->size);
> > +    ff_sine_window_init(ff_sine_windows[av_log2(mtab->size)], mtab->size);

Personally, I'd be in favour of expanding ff_sine_windows to have space
for all, but set the unused parts to NULL.
That should have above advantage, save minimal amounts of space, clarify
which parts of it are actually used (make optimizations easier) and
should be trivial to debug and change if we really need the very small
sizes somewhen.

More information about the ffmpeg-devel mailing list