[trunk]remove warnings in pi.c through the update of poc struct types with new opj_types.

This commit is contained in:
Mickael Savinaud 2012-10-03 17:03:41 +00:00
parent f4a8f7165c
commit e798fe37e1
3 changed files with 39 additions and 35 deletions

View File

@ -269,23 +269,23 @@ typedef struct opj_poc {
/** Layer num end,Resolution num end, Component num end, given by POC */ /** Layer num end,Resolution num end, Component num end, given by POC */
OPJ_UINT32 layno1, resno1, compno1; OPJ_UINT32 layno1, resno1, compno1;
/** Layer num start,Precinct num start, Precinct num end */ /** Layer num start,Precinct num start, Precinct num end */
int layno0, precno0, precno1; OPJ_UINT32 layno0, precno0, precno1;
/** Progression order enum*/ /** Progression order enum*/
OPJ_PROG_ORDER prg1,prg; OPJ_PROG_ORDER prg1,prg;
/** Progression order string*/ /** Progression order string*/
char progorder[5]; OPJ_CHAR progorder[5];
/** Tile number */ /** Tile number */
int tile; OPJ_UINT32 tile;
/** Start and end values for Tile width and height*/ /** 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*/ /** 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 */ /** 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*/ /** 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 */ /** 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; } opj_poc_t;
/** /**

View 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++) { for (pi->compno = pi->poc.compno0; pi->compno < pi->poc.compno1; pi->compno++) {
int resno; OPJ_UINT32 resno;
comp = &pi->comps[pi->compno]; comp = &pi->comps[pi->compno];
pi->dx = 0; pi->dx = 0;
pi->dy = 0; pi->dy = 0;
for (resno = 0; resno < comp->numresolutions; resno++) { for (resno = 0; resno < comp->numresolutions; resno++) {
int dx, dy; OPJ_UINT32 dx, dy;
res = &comp->resolutions[resno]; res = &comp->resolutions[resno];
dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno)); dx = comp->dx * (1 << (res->pdx + comp->numresolutions - 1 - resno));
dy = comp->dy * (1 << (res->pdy + 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->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->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++) { for (pi->resno = pi->poc.resno0; pi->resno < uint_min(pi->poc.resno1, comp->numresolutions); pi->resno++) {
int levelno; OPJ_UINT32 levelno;
int trx0, try0; OPJ_INT32 trx0, try0;
int trx1, try1; OPJ_INT32 trx1, try1;
int rpx, rpy; OPJ_UINT32 rpx, rpy;
int prci, prcj; OPJ_INT32 prci, prcj;
res = &comp->resolutions[pi->resno]; res = &comp->resolutions[pi->resno];
levelno = comp->numresolutions - 1 - pi->resno; levelno = comp->numresolutions - 1 - pi->resno;
trx0 = int_ceildiv(pi->tx0, comp->dx << levelno); trx0 = int_ceildiv(pi->tx0, comp->dx << levelno);

View File

@ -47,17 +47,17 @@ by some function in T2.C.
FIXME DOC FIXME DOC
*/ */
typedef struct opj_pi_resolution { typedef struct opj_pi_resolution {
int pdx, pdy; OPJ_UINT32 pdx, pdy;
int pw, ph; OPJ_UINT32 pw, ph;
} opj_pi_resolution_t; } opj_pi_resolution_t;
/** /**
FIXME DOC FIXME DOC
*/ */
typedef struct opj_pi_comp { typedef struct opj_pi_comp {
int dx, dy; OPJ_UINT32 dx, dy;
/** number of resolution levels */ /** number of resolution levels */
int numresolutions; OPJ_UINT32 numresolutions;
opj_pi_resolution_t *resolutions; opj_pi_resolution_t *resolutions;
} opj_pi_comp_t; } opj_pi_comp_t;
@ -66,35 +66,39 @@ Packet iterator
*/ */
typedef struct opj_pi_iterator { typedef struct opj_pi_iterator {
/** Enabling Tile part generation*/ /** Enabling Tile part generation*/
char tp_on; OPJ_BYTE tp_on;
/** precise if the packet has been already used (usefull for progression order change) */ /** 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 */ /** 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 */ /** 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 */ /** 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 */ /** precinct step used to localize the packet in the include vector */
int step_p; OPJ_UINT32 step_p;
/** component that identify the packet */ /** component that identify the packet */
int compno; OPJ_UINT32 compno;
/** resolution that identify the packet */ /** resolution that identify the packet */
int resno; OPJ_UINT32 resno;
/** precinct that identify the packet */ /** precinct that identify the packet */
int precno; OPJ_UINT32 precno;
/** layer that identify the packet */ /** layer that identify the packet */
int layno; OPJ_UINT32 layno;
/** 0 if the first packet */ /** 0 if the first packet TODO MSD xhange to opj_bool*/
int first; int first;
/** progression order change information */ /** progression order change information */
opj_poc_t poc; opj_poc_t poc;
/** number of components in the image */ /** number of components in the image */
int numcomps; OPJ_UINT32 numcomps;
/** Components*/ /** Components*/
opj_pi_comp_t *comps; opj_pi_comp_t *comps;
int tx0, ty0, tx1, ty1; /** FIXME DOC*/
int x, y, dx, dy; OPJ_INT32 tx0, ty0, tx1, ty1;
/** FIXME DOC*/
OPJ_INT32 x, y;
/** FIXME DOC*/
OPJ_UINT32 dx, dy;
} opj_pi_iterator_t; } opj_pi_iterator_t;
/** @name Exported functions */ /** @name Exported functions */