]> granicus.if.org Git - openjpeg/commitdiff
[trunk] replace pi_next by opj_pi_next
authorMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 3 Oct 2012 12:43:15 +0000 (12:43 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 3 Oct 2012 12:43:15 +0000 (12:43 +0000)
src/lib/openjp2/pi.c
src/lib/openjp2/pi.h
src/lib/openjp2/t2.c

index b0de53dc68e508bf0b41ce46e789af4636e822b0..e59571b63792d9877917b124ae6ffcfc05c6892a 100644 (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);
index cae0f88a90b2d0eca29d55605123903a847b38b5..061e3e2022e5f68e2a41e26b7fc72dca2f0c4b3a 100644 (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);
 /* ----------------------------------------------------------------------- */
 /*@}*/
 
index 926007c658434b9b15791e47d8a473a24e94058e..8dbb22baeedb535adaf70900d1f9a62f122cce4b 100644 (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