summaryrefslogtreecommitdiff
path: root/libavcodec/mpc7.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/mpc7.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/mpc7.c')
-rw-r--r--libavcodec/mpc7.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 7077c96fc2..7362a19192 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.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"
@@ -53,7 +53,7 @@ static av_cold int mpc7_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);
c->dsp.bswap_buf((uint32_t*)buf, (const uint32_t*)avctx->extradata, 4);
ff_mpc_init();
@@ -118,7 +118,7 @@ static inline void idx_to_quant(MPCContext *c, GetBitContext *gb, int idx, int *
switch(idx){
case -1:
for(i = 0; i < SAMPLES_PER_BAND; i++){
- *dst++ = (av_random(&c->rnd) & 0x3FC) - 510;
+ *dst++ = (av_lfg_get(&c->rnd) & 0x3FC) - 510;
}
break;
case 1: