[MPlayer-cvslog] CVS: main/libmpcodecs vf_noise.c,1.17,1.18

Ivan Kalvachev ikalvachev at gmail.com
Tue Apr 4 13:56:28 CEST 2006

2006/4/4, Alex Beregszaszi <alex at fsn.hu>:
> Hi,
> > > > -static int nonTempRandShift[MAX_RES]= {-1};
> > > > +static int nonTempRandShift_init;
> > >
> > > For case of safety set this to zero. I know in theory everything is
> > > perfect...
> >
> > No. All uninitialized data is zero. This is guaranteed by C and true
> > on every single implementation. If you don't know C that's your
> > problem. Explicit initialization just adds 4 bytes to the data segment
> > for no reason.
> Rich, you are getting more crazy with every day. Do you think that 4
> bytes hurt? MPlayer is such a bloatware that even your size reduction
> patches cant help in that matter. Better design libavmunge instead
> trolling. </trolling>

Maybe I am blind but I think that Rich actually added 4 bytes (`int
foo_init` ) , not removed them.

afaik static arrays are filled at compiletime and are stored as they
are in the binnary. (not sure if any compiler optimizes them out).

So this commit may be useful if rand() have some hroonic misbehaviour
leading to numerous fillings of first array with -1, when MAX_SHIFT is
32 or something like that;

I would prefer dynamic allocation per filter. (no static arrays at all)

More information about the MPlayer-cvslog mailing list