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.
typedef struct opj_pi_comp opj_pi_comp_t
 FIXME: documentation.
typedef struct opj_pi_iterator opj_pi_iterator_t
 Packet iterator.

Local static functions

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

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.
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.
opj_pi_iterator_tpi_create_decode (opj_image_t *image, opj_cp_t *cp, int tileno)
 Create a packet iterator for Decoder.
void pi_destroy (opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno)
 Destroy a packet iterator.
bool pi_next (opj_pi_iterator_t *pi)
 Modify the packet iterator to point to the next packet.

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 
)

Create a packet iterator for Decoder.

Parameters:
image Raw image for which the packets will be listed
cp Coding parameters
tileno Number that identifies the tile for which to list the packets
Returns:
Returns a packet iterator that points to the first packet of the tile
See also:
pi_destroy

References opj_poc::compno0, opj_poc::compno1, opj_image::comps, opj_pi_iterator::comps, opj_tccp::csty, opj_image_comp::dx, opj_pi_comp::dx, opj_image_comp::dy, opj_pi_comp::dy, opj_pi_iterator::first, opj_pi_iterator::include, int_ceildiv(), int_ceildivpow2(), int_floordivpow2(), int_max(), int_min(), J2K_CCP_CSTY_PRT, opj_poc::layno0, opj_poc::layno1, opj_image::numcomps, opj_pi_iterator::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_tccp::numresolutions, opj_pi_comp::numresolutions, opj_calloc, opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, pi_destroy(), opj_pi_iterator::poc, opj_tcp::POC, opj_tcp::pocs, opj_tccp::prch, opj_tccp::prcw, opj_poc::precno0, opj_poc::precno1, opj_tcp::prg, opj_poc::prg, opj_pi_resolution::pw, opj_poc::resno0, opj_poc::resno1, opj_pi_comp::resolutions, 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_cp::tw, opj_cp::tx0, opj_pi_iterator::tx0, opj_pi_iterator::tx1, opj_cp::ty0, opj_pi_iterator::ty0, opj_pi_iterator::ty1, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by t2_decode_packets().

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:
pi Handle to the packet iterator generated in pi_initialise_encode
cp Coding parameters
tileno Number that identifies the tile for which to list the packets
tpnum Tile part number of the current tile
tppos The position of the tile part flag in the progression order
cur_totnum_tp The 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, 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:
pi Previously created packet iterator
cp Coding parameters
tileno Number 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:
image Raw image for which the packets will be listed
cp Coding parameters
tileno Number that identifies the tile for which to list the packets
t2_mode If == 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_poc::compS, opj_image::comps, opj_pi_iterator::comps, opj_tccp::csty, opj_poc::dx, opj_pi_iterator::dx, opj_image_comp::dx, opj_pi_comp::dx, opj_poc::dy, opj_pi_iterator::dy, opj_image_comp::dy, opj_pi_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_image::numcomps, opj_pi_iterator::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_tccp::numresolutions, opj_pi_comp::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_cp::tp_on, opj_pi_iterator::tp_on, opj_cp::tw, opj_cp::tx0, opj_pi_iterator::tx0, opj_pi_iterator::tx1, opj_poc::txE, opj_poc::txS, opj_cp::ty0, opj_pi_iterator::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().

bool pi_next ( opj_pi_iterator_t pi  ) 

Modify the packet iterator to point to the next packet.

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

References CPRL, LRCP, 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 bool pi_next_cprl ( opj_pi_iterator_t pi  )  [static]

static bool pi_next_lrcp ( opj_pi_iterator_t pi  )  [static]

static bool pi_next_pcrl ( opj_pi_iterator_t pi  )  [static]

static bool pi_next_rlcp ( opj_pi_iterator_t pi  )  [static]

static bool pi_next_rpcl ( opj_pi_iterator_t pi  )  [static]


doxygen