}
for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) {
- OPJ_UINT32 resno;
+ int resno;
comp = &pi->comps[pi->compno];
pi->dx = 0;
pi->dy = 0;
for (resno = 0; resno < comp->numresolutions; resno++) {
- OPJ_UINT32 dx, dy;
+ int dx, dy;
res = &comp->resolutions[resno];
dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno));
dy = comp->dy * (1 << (res->pdy + comp->numresolutions - 1 - resno));
}
for (pi->y = pi->poc.ty0; pi->y < pi->poc.ty1; pi->y += pi->dy - (pi->y % pi->dy)) {
for (pi->x = pi->poc.tx0; pi->x < pi->poc.tx1; pi->x += pi->dx - (pi->x % pi->dx)) {
- for (pi->resno = pi->poc.resno0; pi->resno < uint_min(pi->poc.resno1, comp->numresolutions); pi->resno++) {
- OPJ_UINT32 levelno;
- OPJ_INT32 trx0, try0;
- OPJ_INT32 trx1, try1;
- OPJ_UINT32 rpx, rpy;
- OPJ_INT32 prci, prcj;
+ for (pi->resno = pi->poc.resno0; pi->resno < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) {
+ int levelno;
+ int trx0, try0;
+ int trx1, try1;
+ int rpx, rpy;
+ int prci, prcj;
res = &comp->resolutions[pi->resno];
levelno = comp->numresolutions - 1 - pi->resno;
trx0 = int_ceildiv(pi->tx0, comp->dx << levelno);
}
}
-opj_bool pi_next(opj_pi_iterator_t * pi) {
+opj_bool opj_pi_next(opj_pi_iterator_t * pi) {
switch (pi->poc.prg) {
case LRCP:
return opj_pi_next_lrcp(pi);
@param pi Packet iterator to modify
@return Returns false if pi pointed to the last packet or else returns true
*/
-opj_bool pi_next(opj_pi_iterator_t * pi);
+opj_bool opj_pi_next(opj_pi_iterator_t * pi);
/* ----------------------------------------------------------------------- */
/*@}*/
/* TODO MSD : check why this function cannot fail (cf. v1) */
pi_create_encode_v2(l_pi, l_cp,p_tile_no,poc,l_tp_num,p_tp_pos,p_t2_mode);
- while (pi_next(l_current_pi)) {
+ while (opj_pi_next(l_current_pi)) {
if (l_current_pi->layno < p_maxlayers) {
l_nb_bytes = 0;
l_current_pi = &l_pi[p_pino];
- while (pi_next(l_current_pi)) {
+ while (opj_pi_next(l_current_pi)) {
if (l_current_pi->layno < p_maxlayers) {
l_nb_bytes=0;
opj_bool* first_pass_failed = (opj_bool*)opj_malloc(l_image->numcomps * sizeof(opj_bool));
memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(opj_bool));
- while (pi_next(l_current_pi)) {
+ while (opj_pi_next(l_current_pi)) {
if (l_tcp->num_layers_to_decode > l_current_pi->layno