Mercurial > libavcodec.hg
comparison roqvideoenc.c @ 9154:aa459306ee59 libavcodec
Use FLG pseudo-random number generator in RoQ and ELBG
author | vitor |
---|---|
date | Sun, 08 Mar 2009 17:43:12 +0000 |
parents | e9d9d946f213 |
children | 12c8d0e11f39 |
comparison
equal
deleted
inserted
replaced
9153:4e91d96dd045 | 9154:aa459306ee59 |
---|---|
927 | 927 |
928 static int roq_encode_init(AVCodecContext *avctx) | 928 static int roq_encode_init(AVCodecContext *avctx) |
929 { | 929 { |
930 RoqContext *enc = avctx->priv_data; | 930 RoqContext *enc = avctx->priv_data; |
931 | 931 |
932 av_random_init(&enc->randctx, 1); | 932 av_lfg_init(&enc->randctx, 1); |
933 | 933 |
934 enc->framesSinceKeyframe = 0; | 934 enc->framesSinceKeyframe = 0; |
935 if ((avctx->width & 0xf) || (avctx->height & 0xf)) { | 935 if ((avctx->width & 0xf) || (avctx->height & 0xf)) { |
936 av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n"); | 936 av_log(avctx, AV_LOG_ERROR, "Dimensions must be divisible by 16\n"); |
937 return -1; | 937 return -1; |