]> granicus.if.org Git - openjpeg/commitdiff
[trunk]remove warnings in pi.c through the update of poc struct types with new opj_types.
authorMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 3 Oct 2012 17:03:41 +0000 (17:03 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 3 Oct 2012 17:03:41 +0000 (17:03 +0000)
src/lib/openjp2/openjpeg.h
src/lib/openjp2/pi.c
src/lib/openjp2/pi.h

index 402b2c912bfa944d9f5925c94e30bb48a497bc4c..6a6d0fcd56b26b969244226e2cf7dc255c0d0cfb 100644 (file)
@@ -269,23 +269,23 @@ typedef struct opj_poc {
        /** Layer num end,Resolution num end, Component num end, given by POC */
        OPJ_UINT32 layno1, resno1, compno1;
        /** Layer num start,Precinct num start, Precinct num end */
-       int layno0, precno0, precno1;
+       OPJ_UINT32 layno0, precno0, precno1;
        /** Progression order enum*/
        OPJ_PROG_ORDER prg1,prg;
        /** Progression order string*/
-       char progorder[5];
+       OPJ_CHAR progorder[5];
        /** Tile number */
-       int tile;
+       OPJ_UINT32 tile;
        /** Start and end values for Tile width and height*/
-       int tx0,tx1,ty0,ty1;
+       OPJ_INT32 tx0,tx1,ty0,ty1;
        /** Start value, initialised in pi_initialise_encode*/
-       int layS, resS, compS, prcS;
+       OPJ_UINT32 layS, resS, compS, prcS;
        /** End value, initialised in pi_initialise_encode */
-       int layE, resE, compE, prcE;
+       OPJ_UINT32 layE, resE, compE, prcE;
        /** Start and end values of Tile width and height, initialised in pi_initialise_encode*/
-       int txS,txE,tyS,tyE,dx,dy;
+       OPJ_UINT32 txS,txE,tyS,tyE,dx,dy;
        /** Temporary values for Tile parts, initialised in pi_create_encode */
-       int lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t;
+       OPJ_UINT32 lay_t, res_t, comp_t, prc_t,tx0_t,ty0_t;
 } opj_poc_t;
 
 /**
index 953c274e8f3748f8c5c2aeb1569e9b2fb02a7c01..79a1f538c21703abc5934bf6e6adf873deb8638e 100644 (file)
@@ -479,12 +479,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++) {
-               int resno;
+               OPJ_UINT32 resno;
                comp = &pi->comps[pi->compno];
                pi->dx = 0;
                pi->dy = 0;
                for (resno = 0; resno < comp->numresolutions; resno++) {
-                       int dx, dy;
+                       OPJ_UINT32 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));
@@ -499,12 +499,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 < int_min(pi->poc.resno1, comp->numresolutions); pi->resno++) {
-                                       int levelno;
-                                       int trx0, try0;
-                                       int trx1, try1;
-                                       int rpx, rpy;
-                                       int prci, prcj;
+                               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;
                                        res = &comp->resolutions[pi->resno];
                                        levelno = comp->numresolutions - 1 - pi->resno;
                                        trx0 = int_ceildiv(pi->tx0, comp->dx << levelno);
index c8f576614c83f7f970bd4c45a9fb41af8ecfff72..fd7d681ddcb76021ba5be6c23733a03c301ef4e6 100644 (file)
@@ -47,17 +47,17 @@ by some function in T2.C.
 FIXME DOC
 */
 typedef struct opj_pi_resolution {
-  int pdx, pdy;
-  int pw, ph;
+  OPJ_UINT32 pdx, pdy;
+  OPJ_UINT32 pw, ph;
 } opj_pi_resolution_t;
 
 /**
 FIXME DOC
 */
 typedef struct opj_pi_comp {
-  int dx, dy;
+  OPJ_UINT32 dx, dy;
   /** number of resolution levels */
-  int numresolutions;
+  OPJ_UINT32 numresolutions;
   opj_pi_resolution_t *resolutions;
 } opj_pi_comp_t;
 
@@ -66,35 +66,39 @@ Packet iterator
 */
 typedef struct opj_pi_iterator {
        /** Enabling Tile part generation*/
-       char tp_on;
+       OPJ_BYTE tp_on;
        /** precise if the packet has been already used (usefull for progression order change) */
-       short int *include;
+       OPJ_INT16 *include;
        /** layer step used to localize the packet in the include vector */
-       int step_l;
+       OPJ_UINT32 step_l;
        /** resolution step used to localize the packet in the include vector */
-       int step_r;     
+       OPJ_UINT32 step_r;      
        /** component step used to localize the packet in the include vector */
-       int step_c;     
+       OPJ_UINT32 step_c;      
        /** precinct step used to localize the packet in the include vector */
-       int step_p;     
+       OPJ_UINT32 step_p;      
        /** component that identify the packet */
-       int compno;
+       OPJ_UINT32 compno;
        /** resolution that identify the packet */
-       int resno;
+       OPJ_UINT32 resno;
        /** precinct that identify the packet */
-       int precno;
+       OPJ_UINT32 precno;
        /** layer that identify the packet */
-       int layno;
-       /** 0 if the first packet */
-       int first;
+       OPJ_UINT32 layno;
+       /** 0 if the first packet TODO MSD xhange to opj_bool*/
+       int first; 
        /** progression order change information */
        opj_poc_t poc;
        /** number of components in the image */
-       int numcomps;
+       OPJ_UINT32 numcomps;
        /** Components*/
        opj_pi_comp_t *comps;
-       int tx0, ty0, tx1, ty1;
-       int x, y, dx, dy;
+    /** FIXME DOC*/
+       OPJ_INT32 tx0, ty0, tx1, ty1;
+    /** FIXME DOC*/
+       OPJ_INT32 x, y;
+    /** FIXME DOC*/
+    OPJ_UINT32 dx, dy;
 } opj_pi_iterator_t;
 
 /** @name Exported functions */