diff options
| author | Antonin Descampe <antonin@gmail.com> | 2004-04-30 09:20:22 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2004-04-30 09:20:22 +0000 |
| commit | 32e7b1529bea8f4464a7f511ac86e7b30b0aa0c5 (patch) | |
| tree | 4c5f585c82c0375291fd9ff41aed73d812cd2eb1 /libopenjpeg | |
| parent | eb2f910daad141acd3258a86cc0d1f6ffe1a131d (diff) | |
Various corrections to avoid "signed/unsigned mismatch" warnings during compilation
Diffstat (limited to 'libopenjpeg')
| -rw-r--r-- | libopenjpeg/j2k.c | 2 | ||||
| -rw-r--r-- | libopenjpeg/tcd.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libopenjpeg/j2k.c b/libopenjpeg/j2k.c index 3c427df3..df14b173 100644 --- a/libopenjpeg/j2k.c +++ b/libopenjpeg/j2k.c @@ -1347,7 +1347,7 @@ int j2k_decode_jpt_stream(unsigned char *src, int len, j2k_image_t ** img, return 0; } /* data-bin read -> need to read a new header */ - if ((cio_tell() - position) == header.Msg_length) { + if ((unsigned int)(cio_tell() - position) == header.Msg_length) { jpt_read_Msg_Header(&header); position = cio_tell(); if (header.Class_Id != 4) { /* 4 : Tile data-bin message */ diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index fed44ecf..85b00038 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -130,9 +130,9 @@ void tcd_malloc_encode(j2k_image_t * img, j2k_cp_t * cp, int curtileno) /* Modification of the RATE >> */ for (j = 0; j < tcp->numlayers; j++) { tcp->rates[j] = - ceil(tile->numcomps * (tile->x1 - tile->x0) * + int_ceildiv(tile->numcomps * (tile->x1 - tile->x0) * (tile->y1 - - tile->y0) * img->comps[0].prec / (tcp->rates[j] * 8 * + tile->y0) * img->comps[0].prec , (tcp->rates[j] * 8 * img->comps[0].dx * img->comps[0].dy)); if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { @@ -389,9 +389,9 @@ void tcd_init_encode(j2k_image_t * img, j2k_cp_t * cp, int curtileno) /* Modification of the RATE >> */ for (j = 0; j < tcp->numlayers; j++) { tcp->rates[j] = - ceil(tile->numcomps * (tile->x1 - tile->x0) * + int_ceildiv(tile->numcomps * (tile->x1 - tile->x0) * (tile->y1 - - tile->y0) * img->comps[0].prec / (tcp->rates[j] * 8 * + tile->y0) * img->comps[0].prec , (tcp->rates[j] * 8 * img->comps[0].dx * img->comps[0].dy)); if (j && tcp->rates[j] < tcp->rates[j - 1] + 10) { @@ -580,8 +580,8 @@ void tcd_init_encode(j2k_image_t * img, j2k_cp_t * cp, int curtileno) void tcd_init(j2k_image_t * img, j2k_cp_t * cp) { - int tileno, compno, resno, bandno, precno, cblkno, i; - unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h, j, p, q; + int tileno, compno, resno, bandno, precno, cblkno, i, j; + unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h, p, q; tcd_img = img; tcd_cp = cp; tcd_image.tw = cp->tw; |
