summaryrefslogtreecommitdiff
path: root/libavcodec/mpc8.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-03-08 16:37:57 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-03-08 16:37:57 +0000
commit74e2a0784e7702d2a3e0d88c7ea4f900ea223edd (patch)
tree51091fce8d6c2a116dafb903677e05f5a1a5f865 /libavcodec/mpc8.c
parentd2f532c8a0345d29e1abaded03168fc3a13bd25b (diff)
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.c6
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;