diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2016-04-12 22:14:26 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2016-04-19 19:00:41 +0200 |
commit | 6b2ad3ca48a6638cb0226ed5aab41d435d8c83a5 (patch) | |
tree | 80eaf77d7697d6518c299343683475380422450d /libavcodec | |
parent | eae2ebded3b801ed55d32746b98db88ffe196f4f (diff) | |
download | ffmpeg-6b2ad3ca48a6638cb0226ed5aab41d435d8c83a5.tar.gz |
indeo3: Avoid undefined behaviour
Avoid the clang warning
"warning: shifting a negative signed value is undefined"
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/indeo3data.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/indeo3data.h b/libavcodec/indeo3data.h index 28c9bb6061..1ca1c47785 100644 --- a/libavcodec/indeo3data.h +++ b/libavcodec/indeo3data.h @@ -238,9 +238,9 @@ * according with endianness of the host machine. */ #if HAVE_BIGENDIAN -#define PD(a,b) (((a) << 8) + (b)) +#define PD(a,b) (((a) * (1 << 8)) + (b)) #else -#define PD(a,b) (((b) << 8) + (a)) +#define PD(a,b) (((b) * (1 << 8)) + (a)) #endif /** @@ -285,9 +285,9 @@ static const int16_t delta_tab_3_5[79] = { TAB_3_5 }; * according with endianness of the host machine. */ #if HAVE_BIGENDIAN -#define PD(a,b) (((a) << 24) + ((a) << 16) + ((b) << 8) + (b)) +#define PD(a,b) (((a) * (1 << 24)) + ((a) * (1 << 16)) + ((b) * (1 << 8)) + (b)) #else -#define PD(a,b) (((b) << 24) + ((b) << 16) + ((a) << 8) + (a)) +#define PD(a,b) (((b) * (1 << 24)) + ((b) * (1 << 16)) + ((a) * (1 << 8)) + (a)) #endif /* |