OPJ_UINT32len;/* Size of data related to this segment */
/* Number of passes decoded. Including those that we skip */
OPJ_UINT32numpasses;
/* Number of passes actually to be decoded. To be used for code-block decoding */
OPJ_UINT32real_num_passes;
/* Maximum number of passes for this segment */
OPJ_UINT32maxpasses;
/* Number of new passes for current packed. Transitory value */
OPJ_UINT32numnewpasses;
/* Codestream length for this segment for current packed. Transitory value */
OPJ_UINT32newlen;
}opj_tcd_seg_t;
/** Code-block for decoding */
typedefstructopj_tcd_cblk_dec{
opj_tcd_seg_t*segs;/* segments information */
opj_tcd_seg_data_chunk_t*chunks;/* Array of chunks */
/* position of the code-blocks : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
OPJ_UINT32numbps;
/* number of bits for len, for the current packet. Transitory value */
OPJ_UINT32numlenbits;
/* number of pass added to the code-blocks, for the current packet. Transitory value */
OPJ_UINT32numnewpasses;
/* number of segments, including those of packet we skip */
OPJ_UINT32numsegs;
/* number of segments, to be used for code block decoding */
OPJ_UINT32real_num_segs;
OPJ_UINT32m_current_max_segs;/* allocated number of segs[] items */
OPJ_UINT32numchunks;/* Number of valid chunks items */
OPJ_UINT32numchunksalloc;/* Number of chunks item allocated */
/* Decoded code-block. Only used for subtile decoding. Otherwise tilec->data is directly updated */
OPJ_INT32*decoded_data;
}opj_tcd_cblk_dec_t;
/** Precinct structure */
typedefstructopj_tcd_precinct{
/* dimension of the precinct : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
OPJ_UINT32cw,ch;/* number of code-blocks, in width and height */
union{/* code-blocks information */
opj_tcd_cblk_enc_t*enc;
opj_tcd_cblk_dec_t*dec;
void*blocks;
}cblks;
OPJ_UINT32block_size;/* size taken by cblks (in bytes) */
opj_tgt_tree_t*incltree;/* inclusion tree */
opj_tgt_tree_t*imsbtree;/* IMSB tree */
}opj_tcd_precinct_t;
/** Sub-band structure */
typedefstructopj_tcd_band{
/* dimension of the subband : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
/* band number: for lowest resolution level (0=LL), otherwise (1=HL, 2=LH, 3=HH) */
OPJ_UINT32bandno;
/* precinct information */
opj_tcd_precinct_t*precincts;
/* size of data taken by precincts */
OPJ_UINT32precincts_data_size;
OPJ_INT32numbps;
OPJ_FLOAT32stepsize;
}opj_tcd_band_t;
/** Tile-component resolution structure */
typedefstructopj_tcd_resolution{
/* dimension of the resolution level : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
/* number of precincts, in width and height, for this resolution level */
OPJ_UINT32pw,ph;
/* number of sub-bands for the resolution level (1 for lowest resolution level, 3 otherwise) */
OPJ_UINT32numbands;
/* subband information */
opj_tcd_band_tbands[3];
/* dimension of the resolution limited to window of interest. Only valid if tcd->whole_tile_decoding is set */
OPJ_UINT32win_x0;
OPJ_UINT32win_y0;
OPJ_UINT32win_x1;
OPJ_UINT32win_y1;
}opj_tcd_resolution_t;
/** Tile-component structure */
typedefstructopj_tcd_tilecomp{
/* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
/* component number */
OPJ_UINT32compno;
/* number of resolutions level */
OPJ_UINT32numresolutions;
/* number of resolutions level to decode (at max)*/
OPJ_UINT32minimum_num_resolutions;
/* resolutions information */
opj_tcd_resolution_t*resolutions;
/* size of data for resolutions (in bytes) */
OPJ_UINT32resolutions_size;
/* data of the component. For decoding, only valid if tcd->whole_tile_decoding is set (so exclusive of data_win member) */
OPJ_INT32*data;
/* if true, then need to free after usage, otherwise do not free */
OPJ_BOOLownsData;
/* we may either need to allocate this amount of data, or re-use image data and ignore this value */
size_tdata_size_needed;
/* size of the data of the component */
size_tdata_size;
/** data of the component limited to window of interest. Only valid for decoding and if tcd->whole_tile_decoding is NOT set (so exclusive of data member) */
OPJ_INT32*data_win;
/* dimension of the component limited to window of interest. Only valid for decoding and if tcd->whole_tile_decoding is NOT set */
OPJ_UINT32win_x0;
OPJ_UINT32win_y0;
OPJ_UINT32win_x1;
OPJ_UINT32win_y1;
/* add fixed_quality */
OPJ_INT32numpix;
}opj_tcd_tilecomp_t;
/**
FIXMEDOC
*/
typedefstructopj_tcd_tile{
/* dimension of the tile : left upper corner (x0, y0) right low corner (x1,y1) */
OPJ_INT32x0,y0,x1,y1;
OPJ_UINT32numcomps;/* number of components in tile */
opj_tcd_tilecomp_t*comps;/* Components information */