]> granicus.if.org Git - libvpx/commit
palette: Replace rand() call with custom LCG.
authorAlex Converse <aconverse@google.com>
Wed, 14 Oct 2015 18:03:14 +0000 (11:03 -0700)
committerAlex Converse <aconverse@google.com>
Sat, 24 Oct 2015 20:38:23 +0000 (13:38 -0700)
commit171fd8999fe8fdf04b5e836ff4eb0106ac6d7501
tree700ba6f690e476975f4e63d77c1079703965fba1
parentd162934bdca89b156194732226746993356344ef
palette: Replace rand() call with custom LCG.

The custom LCG is based on the POSIX recommend constants for a 16-bit
rand(). This implementation uses less computation than typical standard
library procedures which have been extended for 32-bit support, is
guaranteed to be reentrant, and identical everywhere.

Change-Id: I3140bbd566f44ab820d131c584a5d4ec6134c5a0
Ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/rand.html
vp10/encoder/palette.c