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/pi.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/pi.c')
| -rw-r--r-- | libopenjpeg/pi.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libopenjpeg/pi.c b/libopenjpeg/pi.c index 3a24eb14..042a25f5 100644 --- a/libopenjpeg/pi.c +++ b/libopenjpeg/pi.c @@ -97,8 +97,8 @@ pi_iterator_t *pi_create(j2k_image_t * img, j2k_cp_t * cp, int tileno) py0 = int_floordivpow2(ry0, res->pdy) << res->pdy; px1 = int_ceildivpow2(rx1, res->pdx) << res->pdx; py1 = int_ceildivpow2(ry1, res->pdy) << res->pdy; - res->pw = (px1 - px0) >> res->pdx; - res->ph = (py1 - py0) >> res->pdy; + res->pw = (rx0==rx1)?0:((px1 - px0) >> res->pdx); //Mod Antonin : sizebug1 + res->ph = (ry0==ry1)?0:((py1 - py0) >> res->pdy); //Mod Antonin : sizebug1 } } @@ -291,6 +291,11 @@ int pi_next_rpcl(pi_iterator_t * pi) || (pi->y == pi->ty0 && (try0 << levelno) % (1 << rpx)))) { continue; } + + //Add Antonin : sizebug1 + if ((res->pw==0)||(res->pw==0)) continue; + //ddA + prci = int_floordivpow2(int_ceildiv (pi->x, comp->dx << levelno), @@ -382,6 +387,11 @@ int pi_next_pcrl(pi_iterator_t * pi) || (pi->y == pi->ty0 && (try0 << levelno) % (1 << rpx)))) { continue; } + + //Add Antonin : sizebug1 + if ((res->pw==0)||(res->pw==0)) continue; + //ddA + prci = int_floordivpow2(int_ceildiv (pi->x, comp->dx << levelno), @@ -468,6 +478,11 @@ int pi_next_cprl(pi_iterator_t * pi) || (pi->y == pi->ty0 && (try0 << levelno) % (1 << rpx)))) { continue; } + + //Add Antonin : sizebug1 + if ((res->pw==0)||(res->pw==0)) continue; + //ddA + prci = int_floordivpow2(int_ceildiv (pi->x, comp->dx << levelno), |
