[FFmpeg-devel] remove libavutil/random.[ch]

Kostya kostya.shishkov
Sat Mar 21 16:46:19 CET 2009


On Sat, Mar 21, 2009 at 04:35:51PM +0100, Diego Biurrun wrote:
> On Sat, Mar 21, 2009 at 05:31:55PM +0200, Kostya wrote:
> > On Sat, Mar 21, 2009 at 04:10:36PM +0100, Diego Biurrun wrote:
> > > On Sat, Mar 21, 2009 at 03:43:09PM +0100, Luca Barbato wrote:
> > > > Diego Biurrun wrote:
> > > > >libavutil/random.[ch] are deprecated and no longer used anywhere within
> > > > >FFmpeg.  I propose deleting them, libavutil is currently in an unstable
> > > > >state anyway.
> > > > 
> > > > Is there something to replace it? rtsp and rtp rfcs have plenty 
> > > > references about random number and currently we are using 0 in a bunch 
> > > > of places that should use at least consecutive numbers...
> > > 
> > > Have a look at
> > > 
> > > libavutil/lfg.h
> > > libavutil/random_seed.h
> > 
> > Why drop it? The problem with it is that it was _default_ random generator.
> > Simply renaming it and its functions should be enough.
> 
> Why was it deprecated to begin with?

Looks like my works of MSVC encoder was the last straw.
The reason is that was used by default, but was slower than LFG and offered
no real benefits (see Michael's blog for testing pseudorandom generators).
Why do you think TAOCP Vol II starts with words of Nobert Wiener
"Everybody who thinks he can obtain random numbers by mathematical operations
is in a state of sin" ?
  
> > P.S. Now none of random generators are in exported headers, aren't they?
> 
> Nor were they previously.
> 
> Diego




More information about the ffmpeg-devel mailing list