[FFmpeg-devel] [PATCH 1/2] aacenc: use the decoder's lcg PRNG

Claudio Freire klaussfreire at gmail.com
Tue Oct 11 19:46:44 EEST 2016


LGTM.

However,

On Sat, Oct 8, 2016 at 12:20 PM, Rostislav Pehlivanov
<atomnuker at gmail.com> wrote:
> +/**
> + * linear congruential pseudorandom number generator
> + *
> + * @param   previous_val    pointer to the current state of the generator
> + *
> + * @return  Returns a 32-bit pseudorandom integer
> + */
> +static av_always_inline int lcg_random(unsigned previous_val)
> +{
> +    union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
> +    return v.s;
> +}

This could use a comment on where the parameters come from.


More information about the ffmpeg-devel mailing list