diff options
| author | Antonin Descampe <antonin@gmail.com> | 2004-07-14 08:52:15 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2004-07-14 08:52:15 +0000 |
| commit | 55e5910d6bfd3eeedb8e6e281feac36a44d66a6f (patch) | |
| tree | 4dfd4f5d90ff1098aaa60ff85922fc8faa87da9d /libopenjpeg/tcd.c | |
| parent | de5a22aea053d3934536ee3ff5d2f7b2f706d045 (diff) | |
* PPM markers handling modified (comment keyword : ppmbug1)
* empty resolution level or subband handling (comment keyword : sizebug1)
* index_on field forwarded to j2k_cp_t structure
Diffstat (limited to 'libopenjpeg/tcd.c')
| -rw-r--r-- | libopenjpeg/tcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index 09e31ece..17d8455f 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -658,8 +658,8 @@ void tcd_init(j2k_image_t * img, j2k_cp_t * cp) tlprcystart = int_floordivpow2(res->y0, pdy) << pdy; brprcxend = int_ceildivpow2(res->x1, pdx) << pdx; brprcyend = int_ceildivpow2(res->y1, pdy) << pdy; - res->pw = (brprcxend - tlprcxstart) >> pdx; - res->ph = (brprcyend - tlprcystart) >> pdy; + res->pw = (res->x0==res->x1)?0:((brprcxend - tlprcxstart) >> pdx); // Mod Antonin : sizebug1 + res->ph = (res->y0==res->y1)?0:((brprcyend - tlprcystart) >> pdy); // Mod Antonin : sizebug1 if (resno == 0) { tlcbgxstart = tlprcxstart; |
