OpenJPEG  1.5.1
Data Structures | Typedefs
PI - Implementation of a packet iterator

Data Structures

struct  opj_pi_resolution
 FIXME: documentation. More...
 
struct  opj_pi_comp
 FIXME: documentation. More...
 
struct  opj_pi_iterator
 Packet iterator. More...
 

Typedefs

typedef struct opj_pi_resolution opj_pi_resolution_t
 FIXME: documentation. More...
 
typedef struct opj_pi_comp opj_pi_comp_t
 FIXME: documentation. More...
 
typedef struct opj_pi_iterator opj_pi_iterator_t
 Packet iterator. More...
 

Local static functions

static opj_bool pi_next_lrcp (opj_pi_iterator_t *pi)
 Get next packet in layer-resolution-component-precinct order. More...
 
static opj_bool pi_next_rlcp (opj_pi_iterator_t *pi)
 Get next packet in resolution-layer-component-precinct order. More...
 
static opj_bool pi_next_rpcl (opj_pi_iterator_t *pi)
 Get next packet in resolution-precinct-component-layer order. More...
 
static opj_bool pi_next_pcrl (opj_pi_iterator_t *pi)
 Get next packet in precinct-component-resolution-layer order. More...
 
static opj_bool pi_next_cprl (opj_pi_iterator_t *pi)
 Get next packet in component-precinct-resolution-layer order. More...
 

Exported functions

opj_pi_iterator_tpi_initialise_encode (opj_image_t *image, opj_cp_t *cp, int tileno, J2K_T2_MODE t2_mode)
 Create a packet iterator for Encoder. More...
 
opj_bool pi_create_encode (opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno, int pino, int tpnum, int tppos, J2K_T2_MODE t2_mode, int cur_totnum_tp)
 Modify the packet iterator for enabling tile part generation. More...
 
opj_pi_iterator_tpi_create_decode (opj_image_t *image, opj_cp_t *cp, int tileno)
 Create a packet iterator for Decoder. More...
 
void pi_destroy (opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno)
 Destroy a packet iterator. More...
 
opj_bool pi_next (opj_pi_iterator_t *pi)
 Modify the packet iterator to point to the next packet. More...
 

Detailed Description

Typedef Documentation

typedef struct opj_pi_comp opj_pi_comp_t

FIXME: documentation.

Packet iterator.

FIXME: documentation.

Function Documentation

opj_pi_iterator_t* pi_create_decode ( opj_image_t image,
opj_cp_t cp,
int  tileno 
)
opj_bool pi_create_encode ( opj_pi_iterator_t pi,
opj_cp_t cp,
int  tileno,
int  pino,
int  tpnum,
int  tppos,
J2K_T2_MODE  t2_mode,
int  cur_totnum_tp 
)

Modify the packet iterator for enabling tile part generation.

Parameters
piHandle to the packet iterator generated in pi_initialise_encode
cpCoding parameters
tilenoNumber that identifies the tile for which to list the packets
pinoIterator index for pi
tpnumTile part number of the current tile
tpposThe position of the tile part flag in the progression order
t2_modeIf == 0 In Threshold calculation ,If == 1 Final pass
cur_totnum_tpThe total number of tile parts in the current tile
Returns
Returns true if an error is detected

References opj_cp::cinema, opj_poc::comp_t, opj_poc::compE, opj_poc::compno0, opj_poc::compno1, opj_poc::compS, CPRL, opj_poc::dx, opj_poc::dy, FINAL_PASS, opj_pi_iterator::first, opj_poc::lay_t, opj_poc::layE, opj_poc::layno0, opj_poc::layno1, opj_poc::layS, LRCP, OPJ_FALSE, OPJ_TRUE, PCRL, opj_pi_iterator::poc, opj_tcp::pocs, opj_poc::prc_t, opj_poc::prcE, opj_poc::prcS, opj_poc::precno0, opj_poc::precno1, opj_poc::prg, PROG_UNKNOWN, opj_poc::res_t, opj_poc::resE, opj_poc::resno0, opj_poc::resno1, opj_poc::resS, RLCP, RPCL, opj_cp::tcps, opj_cp::tp_on, opj_poc::tx0, opj_poc::tx0_t, opj_poc::tx1, opj_poc::txE, opj_poc::txS, opj_poc::ty0, opj_poc::ty0_t, opj_poc::ty1, opj_poc::tyE, and opj_poc::tyS.

Referenced by t2_encode_packets().

void pi_destroy ( opj_pi_iterator_t pi,
opj_cp_t cp,
int  tileno 
)

Destroy a packet iterator.

Parameters
piPreviously created packet iterator
cpCoding parameters
tilenoNumber that identifies the tile for which the packets were listed
See Also
pi_create

References opj_pi_iterator::comps, opj_pi_iterator::include, opj_pi_iterator::numcomps, opj_tcp::numpocs, opj_free, opj_pi_comp::resolutions, and opj_cp::tcps.

Referenced by j2k_calculate_tp(), pi_create_decode(), pi_initialise_encode(), t2_decode_packets(), and t2_encode_packets().

opj_pi_iterator_t* pi_initialise_encode ( opj_image_t image,
opj_cp_t cp,
int  tileno,
J2K_T2_MODE  t2_mode 
)

Create a packet iterator for Encoder.

Parameters
imageRaw image for which the packets will be listed
cpCoding parameters
tilenoNumber that identifies the tile for which to list the packets
t2_modeIf == 0 In Threshold calculation ,If == 1 Final pass
Returns
Returns a packet iterator that points to the first packet of the tile
See Also
pi_destroy

References opj_cp::cinema, opj_poc::compE, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_poc::compS, opj_image::comps, opj_tccp::csty, opj_pi_comp::dx, opj_pi_iterator::dx, opj_poc::dx, opj_image_comp::dx, opj_pi_comp::dy, opj_pi_iterator::dy, opj_poc::dy, opj_image_comp::dy, FINAL_PASS, opj_pi_iterator::include, int_ceildiv(), int_ceildivpow2(), int_floordivpow2(), int_max(), int_min(), J2K_CCP_CSTY_PRT, opj_poc::layE, opj_poc::layno1, opj_poc::layS, opj_pi_iterator::numcomps, opj_image::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_pi_comp::numresolutions, opj_tccp::numresolutions, opj_calloc, opj_malloc, opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, pi_destroy(), opj_tcp::POC, opj_tcp::pocs, opj_poc::prcE, opj_tccp::prch, opj_poc::prcS, opj_tccp::prcw, opj_tcp::prg, opj_poc::prg, opj_poc::prg1, opj_pi_resolution::pw, opj_poc::resE, opj_poc::resno0, opj_poc::resno1, opj_pi_comp::resolutions, opj_poc::resS, opj_pi_iterator::step_c, opj_pi_iterator::step_l, opj_pi_iterator::step_p, opj_pi_iterator::step_r, opj_tcp::tccps, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_pi_iterator::tp_on, opj_cp::tp_on, opj_cp::tw, opj_pi_iterator::tx0, opj_cp::tx0, opj_pi_iterator::tx1, opj_poc::txE, opj_poc::txS, opj_pi_iterator::ty0, opj_cp::ty0, opj_pi_iterator::ty1, opj_poc::tyE, opj_poc::tyS, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by j2k_calculate_tp(), and t2_encode_packets().

opj_bool pi_next ( opj_pi_iterator_t pi)

Modify the packet iterator to point to the next packet.

Parameters
piPacket iterator to modify
Returns
Returns false if pi pointed to the last packet or else returns true

References CPRL, LRCP, OPJ_FALSE, PCRL, pi_next_cprl(), pi_next_lrcp(), pi_next_pcrl(), pi_next_rlcp(), pi_next_rpcl(), opj_pi_iterator::poc, opj_poc::prg, PROG_UNKNOWN, RLCP, and RPCL.

Referenced by t2_decode_packets(), and t2_encode_packets().

static opj_bool pi_next_cprl ( opj_pi_iterator_t pi)
static
static opj_bool pi_next_lrcp ( opj_pi_iterator_t pi)
static
static opj_bool pi_next_pcrl ( opj_pi_iterator_t pi)
static
static opj_bool pi_next_rlcp ( opj_pi_iterator_t pi)
static
static opj_bool pi_next_rpcl ( opj_pi_iterator_t pi)
static