[trunk] replace pi_next by opj_pi_next

This commit is contained in:
Mickael Savinaud 2012-10-03 12:43:15 +00:00
parent bd74db932e
commit bd2c6cfa55
3 changed files with 13 additions and 13 deletions

View File

@ -412,12 +412,12 @@ opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi) {
}
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));
@ -432,12 +432,12 @@ opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi) {
}
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);
@ -1170,7 +1170,7 @@ void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno) {
}
}
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);

View File

@ -207,7 +207,7 @@ Modify the packet iterator to point to the next packet
@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);
/* ----------------------------------------------------------------------- */
/*@}*/

View File

@ -235,7 +235,7 @@ opj_bool opj_t2_encode_packets( opj_t2_v2_t* p_t2,
/* 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;
@ -268,7 +268,7 @@ opj_bool opj_t2_encode_packets( opj_t2_v2_t* p_t2,
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;
@ -358,7 +358,7 @@ opj_bool opj_t2_decode_packets( opj_t2_v2_t *p_t2,
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