[FFmpeg-devel] [PATCHv3 1/3] lavu/rand: add 64 bit random number generator

Michael Niedermayer michael at niedermayer.cc
Wed Mar 16 02:06:37 CET 2016


On Tue, Mar 15, 2016 at 11:37:30PM +0000, Derek Buitenhuis wrote:
> On 3/15/2016 10:26 PM, Ganesh Ajjanagadde wrote:
> > If one wants good Gaussian samples, then yes, I need a 64 bit rng.
> > Please also note that I can use av_lfg_get, it does not result in
> > slowdown, since speed benefits here come from the ziggurat algo.
> > Concretely, it is 82 cycles vs 81 cycles; too little to clearly
> > distinguish. I was just not too happy with av_lfg_get << 32 |
> > av_lfg_get as it resulted in some bad values in the Anderson Darling
> > tests.
> 
> "If one wants good Gaussian samples" doesn't explain at all how it is
> relevant to a set of multimedia libraries like FFmpeg. Why do we want
> those? That is the relevant information which should be mentioned
> in the commit message.
> 
> > I don't know if good quality Gaussian samples are needed, I welcome
> > comments from AAC coding people.
> 
> The impression I have from them (atomnuker in previous email) is that
> it is not that important, but I'm not an 'AAC' person.
> 
> > In particular, I have already mentioned in the patch notes that this
> > yields ~ 1-2% in aac encoding speed. If you do a profile run,
> > av_bmg_get does show up with nearly 2-3% time spent in it overall.
> 
> There is no mention of AAC in the patch notes for this patch, actually.
> 
> I'll defer to Rostislav (atomnuker) and other on whether adding yet another
> public API that Is Not Multimedia Related is worth 1-2% yield.

IMO 1-2% speedup is significant

i dont think a new API is needed, there already is a Gaussian RNG
API (av_bmg_get()) that can be deprecated after a new API is added
or replaced or whatever

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160316/65fa605b/attachment.sig>


More information about the ffmpeg-devel mailing list