Mercurial > libavcodec.hg
comparison rangecoder.c @ 3184:68d7896a08e4 libavcodec
fixing out of array access (only cosmetic, this should never have had a end user vissible effect)
| author | michael |
|---|---|
| date | Fri, 10 Mar 2006 19:42:51 +0000 |
| parents | 0b546eab515d |
| children | c8c591fe26f8 |
comparison
equal
deleted
inserted
replaced
| 3183:8e00b10aeb0a | 3184:68d7896a08e4 |
|---|---|
| 108 if(p8 <= i) p8= i+1; | 108 if(p8 <= i) p8= i+1; |
| 109 if(p8 > max_p) p8= max_p; | 109 if(p8 > max_p) p8= max_p; |
| 110 c->one_state[ i]= p8; | 110 c->one_state[ i]= p8; |
| 111 } | 111 } |
| 112 | 112 |
| 113 for(i=0; i<256; i++) | 113 for(i=1; i<255; i++) |
| 114 c->zero_state[i]= 256-c->one_state[256-i]; | 114 c->zero_state[i]= 256-c->one_state[256-i]; |
| 115 #if 0 | 115 #if 0 |
| 116 for(i=0; i<256; i++) | 116 for(i=0; i<256; i++) |
| 117 av_log(NULL, AV_LOG_DEBUG, "%3d %3d\n", i, c->one_state[i]); | 117 av_log(NULL, AV_LOG_DEBUG, "%3d %3d\n", i, c->one_state[i]); |
| 118 #endif | 118 #endif |
