diff options
author | Stefan Gehrer <stefan.gehrer@gmx.de> | 2006-07-14 19:15:08 +0000 |
---|---|---|
committer | Stefan Gehrer <stefan.gehrer@gmx.de> | 2006-07-14 19:15:08 +0000 |
commit | 50879935d1da8ae68ab862cd087ffd3139f5a13c (patch) | |
tree | e9ab3363cbcc70b5575d385e5718f5d114e30090 /libavcodec/cavs.c | |
parent | 8ea543b5805453853d8071c86ce15a70dfd097b1 (diff) | |
download | ffmpeg-50879935d1da8ae68ab862cd087ffd3139f5a13c.tar.gz |
replace run by run+1 in VLC tables
Originally committed as revision 5751 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/cavs.c')
-rw-r--r-- | libavcodec/cavs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c index 60826f717c..5f8f86e27f 100644 --- a/libavcodec/cavs.c +++ b/libavcodec/cavs.c @@ -655,7 +655,7 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb, for(i=0;i<65;i++) { level_code = get_ue_code(gb,r->golomb_order); if(level_code >= ESCAPE_CODE) { - run = (level_code - ESCAPE_CODE) >> 1; + run = ((level_code - ESCAPE_CODE) >> 1) + 1; esc_code = get_ue_code(gb,esc_golomb_order); level = esc_code + (run > r->max_run ? 1 : r->level_add[run]); while(level > r->inc_limit) @@ -663,8 +663,6 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb, mask = -(level_code & 1); level = (level^mask) - mask; } else { - if(level_code < 0) - return -1; level = r->rltab[level_code][0]; if(!level) //end of block signal break; @@ -676,7 +674,7 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb, } /* inverse scan and dequantization */ while(--i >= 0){ - pos += 1 + run_buf[i]; + pos += run_buf[i]; if(pos > 63) { av_log(h->s.avctx, AV_LOG_ERROR, "position out of block bounds at pic %d MB(%d,%d)\n", |