summaryrefslogtreecommitdiff
path: root/libopenjpeg/pi.c
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-04-08 18:43:03 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2010-04-08 18:43:03 +0000
commit203a264f96b585427f58f88d2d7af3dcd59c905d (patch)
tree2fafa2eafa0a5b763d72ebbdc61dd8604f1415fd /libopenjpeg/pi.c
parentb5ff4ffedcf5a944723631f7e680c8f5a45ae34f (diff)
[v1.4] Fixed pi.c bug (issue 15 on google code). Thanks to Anton Lionel for catching this.
Diffstat (limited to 'libopenjpeg/pi.c')
-rw-r--r--libopenjpeg/pi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libopenjpeg/pi.c b/libopenjpeg/pi.c
index ac7654c5..06e76af7 100644
--- a/libopenjpeg/pi.c
+++ b/libopenjpeg/pi.c
@@ -209,14 +209,14 @@ if (!pi->tp_on){
try1 = int_ceildiv(pi->ty1, comp->dy << levelno);
rpx = res->pdx + levelno;
rpy = res->pdy + levelno;
- if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){
+ if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue;
}
if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue;
}
- if ((res->pw==0)||(res->pw==0)) continue;
+ if ((res->pw==0)||(res->ph==0)) continue;
if ((trx0==trx1)||(try0==try1)) continue;
@@ -290,14 +290,14 @@ static bool pi_next_pcrl(opj_pi_iterator_t * pi) {
try1 = int_ceildiv(pi->ty1, comp->dy << levelno);
rpx = res->pdx + levelno;
rpy = res->pdy + levelno;
- if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){
+ if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue;
}
if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue;
}
- if ((res->pw==0)||(res->pw==0)) continue;
+ if ((res->pw==0)||(res->ph==0)) continue;
if ((trx0==trx1)||(try0==try1)) continue;
@@ -369,14 +369,14 @@ static bool pi_next_cprl(opj_pi_iterator_t * pi) {
try1 = int_ceildiv(pi->ty1, comp->dy << levelno);
rpx = res->pdx + levelno;
rpy = res->pdy + levelno;
- if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpx))))){
+ if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue;
}
if (!((pi->x % (comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue;
}
- if ((res->pw==0)||(res->pw==0)) continue;
+ if ((res->pw==0)||(res->ph==0)) continue;
if ((trx0==trx1)||(try0==try1)) continue;