# HG changeset patch # User ramiro # Date 1237396364 0 # Node ID 99f0c79aba0597ef9fe90410c6abea896a9f0de7 # Parent e538af2c69c1e6fb81eb04b1497912c9f2be40ce swscale-example: use LFG instead of random() diff -r e538af2c69c1 -r 99f0c79aba05 libswscale/swscale-example.c --- a/libswscale/swscale-example.c Wed Mar 18 17:07:30 2009 +0000 +++ b/libswscale/swscale-example.c Wed Mar 18 17:12:44 2009 +0000 @@ -26,6 +26,7 @@ #undef HAVE_AV_CONFIG_H #include "libavutil/avutil.h" +#include "libavutil/lfg.h" #include "swscale.h" #include "swscale_internal.h" @@ -194,12 +195,15 @@ int stride[3]={W, W, W}; int x, y; struct SwsContext *sws; + AVLFG rand; sws= sws_getContext(W/12, H/12, PIX_FMT_RGB32, W, H, PIX_FMT_YUV420P, 2, NULL, NULL, NULL); + av_lfg_init(&rand, 1); + for (y=0; y