trylab 2016-09-21 14:25:01 +08:00
parent da94042481
commit 6c8dd7db78
1 changed files with 18 additions and 0 deletions

View File

@ -360,9 +360,15 @@ if (!pi->tp_on){
try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno));
rpx = res->pdx + levelno; rpx = res->pdx + levelno;
rpy = res->pdy + levelno; rpy = res->pdy + levelno;
if ((OPJ_INT32)(comp->dy << rpy) == 0 || (1 << rpy) == 0) {
continue;
}
if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue; continue;
} }
if ((OPJ_INT32)(comp->dx << rpx) == 0 || (1 << rpx) == 0) {
continue;
}
if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue; continue;
} }
@ -441,9 +447,15 @@ static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) {
try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno));
rpx = res->pdx + levelno; rpx = res->pdx + levelno;
rpy = res->pdy + levelno; rpy = res->pdy + levelno;
if ((OPJ_INT32)(comp->dy << rpy) == 0 || (1 << rpy) == 0) {
continue;
}
if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue; continue;
} }
if ((OPJ_INT32)(comp->dx << rpx) == 0 || (1 << rpx) == 0) {
continue;
}
if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue; continue;
} }
@ -520,9 +532,15 @@ static OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi) {
try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno)); try1 = opj_int_ceildiv(pi->ty1, (OPJ_INT32)(comp->dy << levelno));
rpx = res->pdx + levelno; rpx = res->pdx + levelno;
rpy = res->pdy + levelno; rpy = res->pdy + levelno;
if ((OPJ_INT32)(comp->dy << rpy) == 0 || (1 << rpy) == 0) {
continue;
}
if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){ if (!((pi->y % (OPJ_INT32)(comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << levelno) % (1 << rpy))))){
continue; continue;
} }
if ((OPJ_INT32)(comp->dx << rpx) == 0 || (1 << rpx) == 0) {
continue;
}
if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){ if (!((pi->x % (OPJ_INT32)(comp->dx << rpx) == 0) || ((pi->x == pi->tx0) && ((trx0 << levelno) % (1 << rpx))))){
continue; continue;
} }