dct-test: fix order of evaluation bug

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-09-08 23:57:37 +02:00
parent d40c0e4a67
commit dd081f98dd

View File

@ -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);