From: malaterre Date: Mon, 24 Oct 2005 17:33:03 +0000 (+0000) Subject: COMP: Fix warning on vs7 X-Git-Tag: OpenJPEG.Version1.2~201 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d9ab55d1d09ffea7d77dbeba363ab40c618080f0;p=gdcm.git COMP: Fix warning on vs7 --- diff --git a/src/gdcmopenjpeg/libopenjpeg/t1.c b/src/gdcmopenjpeg/libopenjpeg/t1.c index f0f52cae..e3d6cee4 100644 --- a/src/gdcmopenjpeg/libopenjpeg/t1.c +++ b/src/gdcmopenjpeg/libopenjpeg/t1.c @@ -903,7 +903,7 @@ void t1_decode_cblks(tcd_tile_t * tile, j2k_tcp_t * tcp) for (j = 0; j < cblk->y1 - cblk->y0; j++) { for (i = 0; i < cblk->x1 - cblk->x0; i++) { - float tmp=t1_data[j][i] * band->stepsize * 4096.0; + double tmp=t1_data[j][i] * band->stepsize * 4096.0; int tmp2; if (t1_data[j][i]>>1 == 0) { tilec->data[x + i + (y + j) * (tilec->x1 - tilec->x0)] = 0; diff --git a/src/gdcmopenjpeg/libopenjpeg/tcd.c b/src/gdcmopenjpeg/libopenjpeg/tcd.c index eb1a5cf1..513627e2 100644 --- a/src/gdcmopenjpeg/libopenjpeg/tcd.c +++ b/src/gdcmopenjpeg/libopenjpeg/tcd.c @@ -270,7 +270,7 @@ void tcd_malloc_encode(j2k_image_t * img, j2k_cp_t * cp, int curtileno) tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); numbps = img->comps[compno].prec + gain; - band->stepsize = (1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn); + band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ band->precincts = @@ -513,7 +513,7 @@ void tcd_init_encode(j2k_image_t * img, j2k_cp_t * cp, int curtileno) tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); numbps = img->comps[compno].prec + gain; - band->stepsize = (1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn); + band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ for (precno = 0; precno < res->pw * res->ph; precno++) { @@ -719,7 +719,7 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) tccp->qmfbid == 0 ? dwt_getgain_real(band->bandno) : dwt_getgain(band->bandno); numbps = img->comps[compno].prec + gain; - band->stepsize = (1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn); + band->stepsize = (float)((1.0 + ss->mant / 2048.0) * pow(2.0, numbps - ss->expn)); band->numbps = ss->expn + tccp->numgbits - 1; /* WHY -1 ? */ band->precincts = @@ -1562,7 +1562,7 @@ int tcd_decode_tile(unsigned char *src, int len, int tileno) for (i = res->x0; i < res->x1; i++) { int v; - float tmp = (tilec->data[i - res->x0 + (j - res->y0) * tw])/8192.0; + double tmp = (tilec->data[i - res->x0 + (j - res->y0) * tw])/8192.0; int tmp2; if (tcd_tcp->tccps[compno].qmfbid == 1) {