mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-22 23:33:11 +00:00
avcodec/texturedspenc: Fix invalid shift
Left shifts of signed types are UB unless the results fit into the type. (Furthermore the value to be shifted need to be nonnegative.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
cf9e470d05
commit
e92e74b897
@ -181,9 +181,9 @@ static unsigned int match_colors(const uint8_t *block, ptrdiff_t stride,
|
|||||||
int x, y, k = 0;
|
int x, y, k = 0;
|
||||||
int c0_point, half_point, c3_point;
|
int c0_point, half_point, c3_point;
|
||||||
uint8_t color[16];
|
uint8_t color[16];
|
||||||
static const int indexMap[8] = {
|
static const uint32_t indexMap[8] = {
|
||||||
0 << 30, 2 << 30, 0 << 30, 2 << 30,
|
0U << 30, 2U << 30, 0U << 30, 2U << 30,
|
||||||
3 << 30, 3 << 30, 1 << 30, 1 << 30,
|
3U << 30, 3U << 30, 1U << 30, 1U << 30,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Fill color and compute direction for each component */
|
/* Fill color and compute direction for each component */
|
||||||
|
Loading…
Reference in New Issue
Block a user