Revision ec0350c9

View differences:

libavcodec/ac3dec.c
33 33
#include <string.h>
34 34

  
35 35
#include "libavutil/crc.h"
36
#include "libavutil/random.h"
37 36
#include "avcodec.h"
38 37
#include "ac3_parser.h"
39 38
#include "bitstream.h"
......
198 197
    ff_mdct_init(&s->imdct_512, 9, 1);
199 198
    ff_kbd_window_init(s->window, 5.0, 256);
200 199
    dsputil_init(&s->dsp, avctx);
201
    av_init_random(0, &s->dith_state);
200
    av_lfg_init(&s->dith_state, 0);
202 201

  
203 202
    /* set bias values for float to int16 conversion */
204 203
    if(s->dsp.float_to_int16_interleave == ff_float_to_int16_interleave_c) {
......
450 449
        tbap = bap[i];
451 450
        switch (tbap) {
452 451
            case 0:
453
                coeffs[i] = (av_random(&s->dith_state) & 0x7FFFFF) - 0x400000;
452
                coeffs[i] = (av_lfg_get(&s->dith_state) & 0x7FFFFF) - 0x400000;
454 453
                break;
455 454

  
456 455
            case 1:
libavcodec/ac3dec.h
27 27
#ifndef FFMPEG_AC3DEC_H
28 28
#define FFMPEG_AC3DEC_H
29 29

  
30
#include "libavutil/random.h"
30
#include "libavutil/lfg.h"
31 31
#include "ac3tab.h"
32 32
#include "ac3.h"
33 33
#include "bitstream.h"
......
143 143
///@defgroup dithering zero-mantissa dithering
144 144
    int dither_all;                         ///< true if all channels are dithered
145 145
    int dither_flag[AC3_MAX_CHANNELS];      ///< dither flags                           (dithflg)
146
    AVRandomState dith_state;               ///< for dither generation
146
    AVLFG dith_state;                       ///< for dither generation
147 147
///@}
148 148

  
149 149
///@defgroup imdct IMDCT
libavutil/Makefile
9 9
       des.o \
10 10
       fifo.o \
11 11
       intfloat_readwrite.o \
12
       lfg.o \
12 13
       lls.o \
13 14
       log.o \
14 15
       lzo.o \

Also available in: Unified diff