summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-11 00:14:27 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-11 00:14:42 +0100
commit7cd46acdd5f11e183c461962f12a78607866187e (patch)
treea17fe9bd06e95d45d365f9573ee70b192c047618 /libavcodec
parent23bc1351ad7db698da9348e23ee63ec7300a881d (diff)
parent26fc6ffec45c954cd8ca46342ac75cd90bcc7e02 (diff)
downloadffmpeg-streaming-7cd46acdd5f11e183c461962f12a78607866187e.zip
ffmpeg-streaming-7cd46acdd5f11e183c461962f12a78607866187e.tar.gz
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Cast signed libopenjpeg data values to unsigned before shifting. Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/libopenjpegdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index c0563e1..7a4be52 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -180,7 +180,7 @@ static inline void libopenjpeg_copy_to_packed16(AVFrame *picture, opj_image_t *i
img_ptr = (uint16_t*) (picture->data[0] + y*picture->linesize[0]);
for (x = 0; x < picture->width; x++, index++) {
for (c = 0; c < image->numcomps; c++) {
- *img_ptr++ = 0x8000 * image->comps[c].sgnd + (image->comps[c].data[index] << adjust[c]);
+ *img_ptr++ = 0x8000 * image->comps[c].sgnd + ((unsigned)image->comps[c].data[index] << adjust[c]);
}
}
}
@@ -217,7 +217,7 @@ static inline void libopenjpeg_copyto16(AVFrame *picture, opj_image_t *image) {
for (y = 0; y < image->comps[index].h; y++) {
img_ptr = (uint16_t*) (picture->data[index] + y * picture->linesize[index]);
for (x = 0; x < image->comps[index].w; x++) {
- *img_ptr = 0x8000 * image->comps[index].sgnd + (*comp_data << adjust[index]);
+ *img_ptr = 0x8000 * image->comps[index].sgnd + ((unsigned)*comp_data << adjust[index]);
img_ptr++;
comp_data++;
}
OpenPOWER on IntegriCloud