[Ffmpeg-devel] [RFC] av_random...

Ryan Martell rdm4
Wed Jan 10 00:03:20 CET 2007


On Jan 9, 2007, at 4:47 PM, Michael Niedermayer wrote:

> Hi
>
> On Tue, Jan 09, 2007 at 04:03:21PM -0600, Ryan Martell wrote:
> [...]
>> For the record, the timing units I sent before were only timing the
>> generate_untempered function, since it's only called every
>> AV_RANDOM_N times av_random is called.
>>
>> Final question: typically, I use time(NULL) to initialize the seeds
>> of a random number generator.  Since ffmpeg says don't use time
>> (NULL), what's the best pseodo-random seed generator to use?
>
> 0 should do

Not really; then it won't be even random- the GUID of everyone (in  
asf.c for my mms stuff, that started this all), will always be the  
same for every user out there.  The seed must be initialized with  
something that's at least pseudo random.

> and the code looks ok (except the missing Makefile patch)
>
> [...]

Makefile patch and code (unchanged from before, just all in one place).

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: random_makefile.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070109/e9dca37a/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: random.c
Type: application/octet-stream
Size: 3516 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070109/e9dca37a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: random.h
Type: application/octet-stream
Size: 2408 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070109/e9dca37a/attachment-0001.obj>



More information about the ffmpeg-devel mailing list