aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/texturedsp.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-11-23 17:02:19 -0500
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-11-24 09:24:48 -0500
commitfdd5c48ebdec489ec9e84eee547fefa50c3ad53c (patch)
treed52d1dc09d98965bc2c4befd2cdf5a22cd7682b7 /libavcodec/texturedsp.c
parenteef38316cab68aff080cf2b83c2427a734194e8d (diff)
downloadffmpeg-fdd5c48ebdec489ec9e84eee547fefa50c3ad53c.tar.gz
texturedsp: Explicitly cast RGBA parameters to unsigned
Silences warnings when using -Wshift-overflow (GCC 6+). Found-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/texturedsp.c')
-rw-r--r--libavcodec/texturedsp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c
index 78eb6fa0ce..58446b1e69 100644
--- a/libavcodec/texturedsp.c
+++ b/libavcodec/texturedsp.c
@@ -31,7 +31,10 @@
#include "texturedsp.h"
-#define RGBA(r, g, b, a) (r) | ((g) << 8) | ((b) << 16) | ((a) << 24)
+#define RGBA(r, g, b, a) ((uint8_t)(r) << 0) | \
+ ((uint8_t)(g) << 8) | \
+ ((uint8_t)(b) << 16) | \
+ ((uint8_t)(a) << 24)
static av_always_inline void extract_color(uint32_t colors[4],
uint16_t color0,