diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-12-08 02:23:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-12-08 02:23:22 +0000 |
commit | ecfc44e66e7d4477cae0e8113ba72c4814c3df12 (patch) | |
tree | ed08e2f58c3b4f4ebaf66c5f939dfb0369a1b204 /libavcodec/h263.c | |
parent | 01e8ff27b449ca8d7263165a29669a313a93e978 (diff) | |
download | ffmpeg-ecfc44e66e7d4477cae0e8113ba72c4814c3df12.tar.gz |
alternative inter vlc encoding fix
Originally committed as revision 2570 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h263.c')
-rw-r--r-- | libavcodec/h263.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h263.c b/libavcodec/h263.c index f058587ecb..1bae26a50c 100644 --- a/libavcodec/h263.c +++ b/libavcodec/h263.c @@ -1979,6 +1979,8 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) if (level) { run = i - last_non_zero - 1; last = (i == last_index); + + if(level<0) level= -level; code = get_rl_index(rl, last, run, level); aic_code = get_rl_index(&rl_intra_aic, last, run, level); @@ -1986,10 +1988,10 @@ static void h263_encode_block(MpegEncContext * s, DCTELEM * block, int n) aic_vlc_bits += rl_intra_aic.table_vlc[aic_code][1]+1; if (code == rl->n) { - inter_vlc_bits += 1+6+8; + inter_vlc_bits += 1+6+8-1; } if (aic_code == rl_intra_aic.n) { - aic_vlc_bits += 1+6+8; + aic_vlc_bits += 1+6+8-1; wrong_pos += run + 1; }else wrong_pos += wrong_run[aic_code]; |