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

Derek Buitenhuis derek.buitenhuis at gmail.com
Wed Mar 16 00:37:30 CET 2016


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.

- Derek



More information about the ffmpeg-devel mailing list