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

Michael Niedermayer git at videolan.org
Wed Sep 21 21:08:32 CEST 2011


ffmpeg | branch: release/0.8 | Michael Niedermayer <michaelni at gmx.at> | Sat Sep 10 19:22:39 2011 +0200| [b2af83a9ed35f3a9d4f7c2a16f12fa3edd40ec5f] | 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>
(cherry picked from commit 1eb805ed70a0aac35523c7a308145b6b8d05441e)

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

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

diff --git a/libavcodec/cabac.c b/libavcodec/cabac.c
index e39ad2e..9acc2a0 100644
--- a/libavcodec/cabac.c
+++ b/libavcodec/cabac.c
@@ -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++){



More information about the ffmpeg-cvslog mailing list