]> Creatis software - gdcm.git/commitdiff
COMP: Fix warning on vs7
authormalaterre <malaterre>
Mon, 24 Oct 2005 17:33:03 +0000 (17:33 +0000)
committermalaterre <malaterre>
Mon, 24 Oct 2005 17:33:03 +0000 (17:33 +0000)
src/gdcmopenjpeg/libopenjpeg/t1.c
src/gdcmopenjpeg/libopenjpeg/tcd.c

index f0f52cae78dad5aaf5c9568850bbff46493d9bdd..e3d6cee428bccd08625a97d9f0f12d055e670cea 100644 (file)
@@ -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;
index eb1a5cf17f10d2b5036fc7125f2ff8612b25aec5..513627e2c8d2ca9113b29b4e570e08372a9f8a4a 100644 (file)
@@ -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) {