projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
60c4660
)
swscale: fix some undefined signed left shifts
author
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 5 Apr 2014 18:46:22 +0000
(14:46 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Sat, 12 Apr 2014 17:24:47 +0000
(13:24 -0400)
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
libswscale/swscale_unscaled.c
patch
|
blob
|
history
diff --git
a/libswscale/swscale_unscaled.c
b/libswscale/swscale_unscaled.c
index
daa6f5f
..
9e50d48
100644
(file)
--- a/
libswscale/swscale_unscaled.c
+++ b/
libswscale/swscale_unscaled.c
@@
-1230,13
+1230,13
@@
int attribute_align_arg sws_scale(struct SwsContext *c,
#if HAVE_BIGENDIAN
case AV_PIX_FMT_BGR24:
#endif
- c->pal_rgb[i] = (r
+ (g << 8) + (b << 16)) << 8
;
+ c->pal_rgb[i] = (r
<< 8) + (g << 16) + ((unsigned)b << 24)
;
break;
case AV_PIX_FMT_RGB32_1:
#if HAVE_BIGENDIAN
case AV_PIX_FMT_RGB24:
#endif
- c->pal_rgb[i] = (b
+ (g << 8) + (r << 16)) << 8
;
+ c->pal_rgb[i] = (b
<< 8) + (g << 16) + ((unsigned)r << 24)
;
break;
case AV_PIX_FMT_RGB32:
#if !HAVE_BIGENDIAN