[FFmpeg-cvslog] dct-test: fix order of evaluation bug
Michael Niedermayer
git at videolan.org
Sun Sep 9 00:02:41 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 8 23:57:37 2012 +0200| [dd081f98dded8e268a70468a43b25b077c8c3571] | committer: Michael Niedermayer
dct-test: fix order of evaluation bug
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dd081f98dded8e268a70468a43b25b077c8c3571
---
libavcodec/dct-test.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index b44b68b..a277817 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -215,8 +215,10 @@ static void init_block(DCTELEM block[64], int test, int is_idct, AVLFG *prng, in
break;
case 1:
j = av_lfg_get(prng) % 10 + 1;
- for (i = 0; i < j; i++)
- block[av_lfg_get(prng) % 64] = av_lfg_get(prng) % (2*vals) -vals;
+ for (i = 0; i < j; i++) {
+ int idx = av_lfg_get(prng) % 64;
+ block[idx] = av_lfg_get(prng) % (2*vals) -vals;
+ }
break;
case 2:
block[ 0] = av_lfg_get(prng) % (16*vals) - (8*vals);
More information about the ffmpeg-cvslog
mailing list