X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Ftexturedsp.c;h=90b1eb4f115d10b428103aee6318af6b22a1833a;hb=eb5049227033d946add93c0714bb8a28d94166f1;hp=5012245a26ea39c2d45c1bea7e826173fc94b9dd;hpb=373bfe4fcaff48e0546662e818bfce7812bf75e7;p=ffmpeg diff --git a/libavcodec/texturedsp.c b/libavcodec/texturedsp.c index 5012245a26e..90b1eb4f115 100644 --- a/libavcodec/texturedsp.c +++ b/libavcodec/texturedsp.c @@ -35,7 +35,7 @@ #define RGBA(r, g, b, a) (((uint8_t)(r) << 0) | \ ((uint8_t)(g) << 8) | \ ((uint8_t)(b) << 16) | \ - ((uint8_t)(a) << 24)) + ((unsigned)(uint8_t)(a) << 24)) static av_always_inline void extract_color(uint32_t colors[4], uint16_t color0, @@ -158,7 +158,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride, for (x = 0; x < 4; x++) { uint8_t alpha = alpha_values[x]; - uint32_t pixel = colors[code & 3] | (alpha << 24); + uint32_t pixel = colors[code & 3] | ((unsigned)alpha << 24); code >>= 2; AV_WL32(dst + x * 4, pixel); @@ -291,7 +291,7 @@ static inline void dxt5_block_internal(uint8_t *dst, ptrdiff_t stride, } } } - pixel = colors[code & 3] | (alpha << 24); + pixel = colors[code & 3] | ((unsigned)alpha << 24); code >>= 2; AV_WL32(dst + x * 4, pixel); }