summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-10-03 17:03:41 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-10-03 17:03:41 +0000
commite798fe37e191c1ea8b3fa248662d7cc0b75674d5 (patch)
tree4adcf0320b54a573f1325cdf097623e97e129533 /src/lib
parentf4a8f7165c4758c553ed27ddc0497b793a95e9b8 (diff)
[trunk]remove warnings in pi.c through the update of poc struct types with new opj_types.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/openjp2/openjpeg.h16
-rw-r--r--src/lib/openjp2/pi.c16
-rw-r--r--src/lib/openjp2/pi.h42
3 files changed, 39 insertions, 35 deletions
diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h
index 402b2c91..6a6d0fcd 100644
--- a/src/lib/openjp2/openjpeg.h
+++ b/src/lib/openjp2/openjpeg.h
@@ -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;
/**
diff --git a/src/lib/openjp2/pi.c b/src/lib/openjp2/pi.c
index 953c274e..79a1f538 100644
--- a/src/lib/openjp2/pi.c
+++ b/src/lib/openjp2/pi.c
@@ -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);
diff --git a/src/lib/openjp2/pi.h b/src/lib/openjp2/pi.h
index c8f57661..fd7d681d 100644
--- a/src/lib/openjp2/pi.h
+++ b/src/lib/openjp2/pi.h
@@ -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 */