Browse Source

avcodec/vc1: Fix undefined shifts

Found-by: Clang -fsanitize=shift
Reported-by: Thierry Foucu <tfoucu@google.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.7
Michael Niedermayer 11 years ago
parent
commit
3b63819dfb
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/vc1.c

+ 2
- 2
libavcodec/vc1.c View File

@@ -572,13 +572,13 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
int scale, shift, i; \
if (!lumscale) { \
scale = -64; \
shift = (255 - lumshift * 2) << 6; \
shift = (255 - lumshift * 2) * 64; \
if (lumshift > 31) \
shift += 128 << 6; \
} else { \
scale = lumscale + 32; \
if (lumshift > 31) \
shift = (lumshift - 64) << 6; \
shift = (lumshift - 64) * 64; \
else \
shift = lumshift << 6; \
} \


Loading…
Cancel
Save