diff options
| author | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-23 16:03:45 +0000 |
|---|---|---|
| committer | Matthieu Darbois <mayeut@users.noreply.github.com> | 2014-12-23 16:03:45 +0000 |
| commit | 33f52fb6117603cfef62eeb242ef9214f9d6f067 (patch) | |
| tree | 070c62f90c89312d0b53df2dbfd7d62ba5536baa /src | |
| parent | 81abe5b3bb652d99d6a0746f8b405feef4d1f7e6 (diff) | |
[trunk] removed warning from convert.c
Update issue 442
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/jp2/convert.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c index 4273141f..e6346ea9 100644 --- a/src/bin/jp2/convert.c +++ b/src/bin/jp2/convert.c @@ -108,15 +108,15 @@ static void scale_component_up(opj_image_comp_t* component, OPJ_UINT32 precision len = (OPJ_SIZE_T)component->w * (OPJ_SIZE_T)component->h; if (component->sgnd) { - OPJ_INT64 newMax = (1U << (precision - 1)); - OPJ_INT64 oldMax = (1U << (component->prec - 1)); + OPJ_INT64 newMax = (OPJ_INT64)(1U << (precision - 1)); + OPJ_INT64 oldMax = (OPJ_INT64)(1U << (component->prec - 1)); OPJ_INT32* l_data = component->data; for (i = 0; i < len; ++i) { l_data[i] = (OPJ_INT32)(((OPJ_INT64)l_data[i] * newMax) / oldMax); } } else { - OPJ_UINT64 newMax = (1U << precision) - 1U; - OPJ_UINT64 oldMax = (1U << component->prec) - 1U; + OPJ_UINT64 newMax = (OPJ_UINT64)((1U << precision) - 1U); + OPJ_UINT64 oldMax = (OPJ_UINT64)((1U << component->prec) - 1U); OPJ_UINT32* l_data = (OPJ_UINT32*)component->data; for (i = 0; i < len; ++i) { l_data[i] = (OPJ_UINT32)(((OPJ_UINT64)l_data[i] * newMax) / oldMax); |
