aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-16 22:46:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-16 23:28:32 +0200
commit293d5d7a8e12e38bf70b51f6aa70321e079ffa64 (patch)
treed5906bb476bd1db19c3816a3220f0ad2689d47de
parent389d45351e06a065df613f2151069aae47f68319 (diff)
downloadffmpeg-293d5d7a8e12e38bf70b51f6aa70321e079ffa64.tar.gz
swscale/input: fix harmless integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/input.c b/libswscale/input.c
index 3a2a12437a..6a39a3011d 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -324,8 +324,8 @@ static av_always_inline void rgb16_32ToUV_half_c_template(int16_t *dstU,
maskb |= maskb << 1;
maskg |= maskg << 1;
for (i = 0; i < width; i++) {
- int px0 = input_pixel(2 * i + 0) >> shp;
- int px1 = input_pixel(2 * i + 1) >> shp;
+ unsigned px0 = input_pixel(2 * i + 0) >> shp;
+ unsigned px1 = input_pixel(2 * i + 1) >> shp;
int b, r, g = (px0 & maskgx) + (px1 & maskgx);
int rb = px0 + px1 - g;