aacenc: switch to using the RNG from libavutil

PSNR doesn't change as expected. The AAC spec doesn't really say
anything about how exactly to generate noise.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
Rostislav Pehlivanov 2015-12-14 18:53:09 +00:00
parent 932cbc846f
commit ade31b9424
4 changed files with 9 additions and 13 deletions

View file

@ -182,16 +182,6 @@ static av_always_inline float bval2bmax(float b)
return 0.001f + 0.0035f * (b*b*b) / (15.5f*15.5f*15.5f);
}
/*
* linear congruential pseudorandom number generator, copied from the decoder
*/
static inline int lcg_random(unsigned previous_val)
{
union { unsigned u; int s; } v = { previous_val * 1664525u + 1013904223 };
return v.s;
}
/*
* Compute a nextband map to be used with SF delta constraint utilities.
* The nextband array should contain 128 elements, and positions that don't