[FFmpeg-cvslog] cabac test: Change input to test, so a wider range of states is tested.

Michael Niedermayer git at videolan.org
Sat Sep 10 20:11:20 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 10 19:22:39 2011 +0200| [1eb805ed70a0aac35523c7a308145b6b8d05441e] | committer: Michael Niedermayer

cabac test: Change input to test, so a wider range of states is tested.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eb805ed70a0aac35523c7a308145b6b8d05441e
---

 libavcodec/cabac.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index 50c2ea6..e03043f 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -317,7 +317,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++){



More information about the ffmpeg-cvslog mailing list