diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2005-06-02 15:25:25 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2005-06-02 15:25:25 +0000 |
| commit | 7ae6a670fae0267ae7bb5c3bca144520d0cacdf9 (patch) | |
| tree | 92e43d73c736f71c8947456c663494d69d509b50 /libopenjpeg/tcd.c | |
| parent | cf4f8be5f030575af56240f810d17bbf6d216f9e (diff) | |
Conversions from int to unsigned int to ensure correct execution of int_min and int_max at lines 800 to 830
Diffstat (limited to 'libopenjpeg/tcd.c')
| -rw-r--r-- | libopenjpeg/tcd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index 58c660e1..017b638e 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -585,8 +585,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, j; - unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h, p, q; + int tileno, compno, resno, bandno, precno, cblkno, i, j, p, q; + unsigned int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w, h; tcd_img = img; tcd_cp = cp; tcd_image.tw = cp->tw; @@ -798,6 +798,7 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) for (j = 0; j < cp->tileno_size; j++) { tileno = cp->tileno[j]; x0 = j == 0 ? tcd_image.tiles[tileno].comps[i].x0 : int_min(x0, + (unsigned int) tcd_image. tiles [tileno]. @@ -805,6 +806,7 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) [i].x0); y0 = j == 0 ? tcd_image.tiles[tileno].comps[i].y0 : int_min(y0, + (unsigned int) tcd_image. tiles [tileno]. @@ -812,6 +814,7 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) y0); x1 = j == 0 ? tcd_image.tiles[tileno].comps[i].x1 : int_max(x1, + (unsigned int) tcd_image. tiles [tileno]. @@ -819,14 +822,13 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) x1); y1 = j == 0 ? tcd_image.tiles[tileno].comps[i].y1 : int_max(y1, + (unsigned int) tcd_image. tiles [tileno]. comps[i]. y1); } - //w = int_ceildiv(x1 - x0, img->comps[i].dx); - //h = int_ceildiv(y1 - y0, img->comps[i].dy); w = x1 - x0; |
