Revision 9a034dde

View differences:

libswscale/swscale-example.c
26 26

  
27 27
#undef HAVE_AV_CONFIG_H
28 28
#include "libavutil/avutil.h"
29
#include "libavutil/lfg.h"
29 30
#include "swscale.h"
30 31
#include "swscale_internal.h"
31 32

  
......
194 195
    int stride[3]={W, W, W};
195 196
    int x, y;
196 197
    struct SwsContext *sws;
198
    AVLFG rand;
197 199

  
198 200
    sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUV420P, 2, NULL, NULL, NULL);
199 201

  
202
    av_lfg_init(&rand, 1);
203

  
200 204
    for (y=0; y<H; y++){
201 205
        for (x=0; x<W*4; x++){
202
            rgb_data[ x + y*4*W]= random();
206
            rgb_data[ x + y*4*W]= av_lfg_get(&rand);
203 207
        }
204 208
    }
205 209
    sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride);

Also available in: Unified diff