summaryrefslogtreecommitdiffstats
path: root/libswscale/rgb2rgb_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-16 20:50:53 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-16 20:50:53 +0200
commita30972609ca39b791ce1e4e5cc6c3dd6cb9c9b12 (patch)
tree1714b0b6a284dff1cea142ae6b39e0bbbe88b1d1 /libswscale/rgb2rgb_template.c
parentcb65b32c97b06fc611b53c1ab77a2edbaadee84f (diff)
downloadffmpeg-streaming-a30972609ca39b791ce1e4e5cc6c3dd6cb9c9b12.zip
ffmpeg-streaming-a30972609ca39b791ce1e4e5cc6c3dd6cb9c9b12.tar.gz
yuvPlanartoyuy2_c: fix sign extension
Fixes CID732282 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/rgb2rgb_template.c')
-rw-r--r--libswscale/rgb2rgb_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index c05cdc8..680d65c 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -353,9 +353,9 @@ static inline void yuvPlanartoyuy2_c(const uint8_t *ysrc, const uint8_t *usrc,
const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc;
for (i = 0; i < chromWidth; i += 2) {
uint64_t k = yc[0] + (uc[0] << 8) +
- (yc[1] << 16) + (vc[0] << 24);
+ (yc[1] << 16) + (unsigned)(vc[0] << 24);
uint64_t l = yc[2] + (uc[1] << 8) +
- (yc[3] << 16) + (vc[1] << 24);
+ (yc[3] << 16) + (unsigned)(vc[1] << 24);
*ldst++ = k + (l << 32);
yc += 4;
uc += 2;
OpenPOWER on IntegriCloud