diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-08-26 20:10:41 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-08-26 20:10:41 +0400 |
commit | 4dd0e44f140c5570f893dabfac4bb3747e212f90 (patch) | |
tree | e1dd008964ad52880016fba418d9f6f19cd93f52 /libavcodec/mpeg12.c | |
parent | 405469cefd240d997ea764fe63480d5ce8f4c3d9 (diff) |
fixing some 64bit bugs
Originally committed as revision 867 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 8939bb6c2b..94915ae17f 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1049,7 +1049,7 @@ static int mpeg1_decode_block(MpegEncContext *s, /* escape */ run = get_bits(&s->gb, 6); level = get_bits(&s->gb, 8); - level = (level << 24) >> 24; + level= (level + ((-1)<<7)) ^ ((-1)<<7); //sign extension if (level == -128) { level = get_bits(&s->gb, 8) - 256; } else if (level == 0) { @@ -1128,7 +1128,7 @@ static int mpeg2_decode_block_non_intra(MpegEncContext *s, /* escape */ run = get_bits(&s->gb, 6); level = get_bits(&s->gb, 12); - level = (level << 20) >> 20; + level= (level + ((-1)<<11)) ^ ((-1)<<11); //sign extension } else { run = rl->table_run[code]; level = rl->table_level[code]; @@ -1211,7 +1211,7 @@ static int mpeg2_decode_block_intra(MpegEncContext *s, /* escape */ run = get_bits(&s->gb, 6); level = get_bits(&s->gb, 12); - level = (level << 20) >> 20; + level= (level + ((-1)<<11)) ^ ((-1)<<11); //sign extension } else { run = rl->table_run[code]; level = rl->table_level[code]; |