diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-08 16:37:57 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2009-03-08 16:37:57 +0000 |
commit | 74e2a0784e7702d2a3e0d88c7ea4f900ea223edd (patch) | |
tree | 51091fce8d6c2a116dafb903677e05f5a1a5f865 /libavcodec/mpc8.c | |
parent | d2f532c8a0345d29e1abaded03168fc3a13bd25b (diff) | |
download | ffmpeg-74e2a0784e7702d2a3e0d88c7ea4f900ea223edd.tar.gz |
Make Musepack decoders use LFG pseudorandom generator
Originally committed as revision 17880 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpc8.c')
-rw-r--r-- | libavcodec/mpc8.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index d235edd861..ff7d5e5805 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -25,7 +25,7 @@ * divided into 32 subbands. */ -#include "libavutil/random.h" +#include "libavutil/lfg.h" #include "avcodec.h" #include "bitstream.h" #include "dsputil.h" @@ -100,7 +100,7 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx) return -1; } memset(c->oldDSCF, 0, sizeof(c->oldDSCF)); - av_random_init(&c->rnd, 0xDEADBEEF); + av_lfg_init(&c->rnd, 0xDEADBEEF); dsputil_init(&c->dsp, avctx); ff_mpc_init(); @@ -284,7 +284,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, switch(res){ case -1: for(j = 0; j < SAMPLES_PER_BAND; j++) - c->Q[ch][off + j] = (av_random(&c->rnd) & 0x3FC) - 510; + c->Q[ch][off + j] = (av_lfg_get(&c->rnd) & 0x3FC) - 510; break; case 0: break; |