mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
swscale/rgb2rgb_template: use unsigned for <<24
Found-by: jiale yao
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit dbe78ffdb8)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -406,11 +406,11 @@ static inline void yuvPlanartoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
|
||||
|
||||
for (i = 0; i < chromWidth; i++) {
|
||||
#if HAVE_BIGENDIAN
|
||||
*idst++ = (yc[0] << 24) + (uc[0] << 16) +
|
||||
*idst++ = ((unsigned)yc[0] << 24) + (uc[0] << 16) +
|
||||
(yc[1] << 8) + (vc[0] << 0);
|
||||
#else
|
||||
*idst++ = yc[0] + (uc[0] << 8) +
|
||||
(yc[1] << 16) + (vc[0] << 24);
|
||||
(yc[1] << 16) + ((unsigned)vc[0] << 24);
|
||||
#endif
|
||||
yc += 2;
|
||||
uc++;
|
||||
|
||||
Reference in New Issue
Block a user