[FFmpeg-devel] [PATCH] IFF demuxer and 8SVX decoder

Reimar Döffinger Reimar.Doeffinger
Wed Mar 26 10:21:58 CET 2008


On Wed, Mar 26, 2008 at 09:35:56AM +0100, Benoit Fouet wrote:
> > +int *table;
> >   
> 
> I don't think this one is needed (you could or use a variable in your
> context).
> and if it was really needed, it should also be static
> 
> > +static int fibonacci[16]   = { -34, -21, -13,  -8, -5, -3, -2, -1, 0, 1, 2, 3, 5,  8, 13, 21 };
> > +static int exponential[16] = {-128, -64, -32, -16, -8, -4, -2, -1, 0, 1, 2, 4, 8, 16, 32, 64 };
> > +
> >   
> 
> they fit in int16_t

Usually all global variables must be static const, only exception are
tables initialized at runtime but they are rare.
So those arrays should be made "const" as well, and in addition they fit
in int8_t as well.




More information about the ffmpeg-devel mailing list