diff mpc7.c @ 9153:4e91d96dd045 libavcodec

Make Musepack decoders use LFG pseudorandom generator
author kostya
date Sun, 08 Mar 2009 16:37:57 +0000
parents e9d9d946f213
children 54bc8a2727b0
line wrap: on
line diff
--- a/mpc7.c	Sat Mar 07 22:42:09 2009 +0000
+++ b/mpc7.c	Sun Mar 08 16:37:57 2009 +0000
@@ -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 @@
         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 @@
     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: