cabac test: Change input to test, so a wider range of states is tested.
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 10 Sep 2011 17:22:39 +0000 (19:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 21 Sep 2011 16:00:40 +0000 (18:00 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1eb805ed70a0aac35523c7a308145b6b8d05441e)

libavcodec/cabac.c

index e39ad2e..9acc2a0 100644 (file)
@@ -194,7 +194,8 @@ int main(void){
     ff_init_cabac_states(&c);
 
     for(i=0; i<SIZE; i++){
-        r[i] = av_lfg_get(&prng) % 7;
+        if(2*i<SIZE) r[i] = av_lfg_get(&prng) % 7;
+        else         r[i] = (i>>8)&1;
     }
 
     for(i=0; i<SIZE; i++){