OpenJPEG
1.5.1
|
Implementation of a packet iterator (PI) More...
Go to the source code of this file.
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... | |
Functions | |
Exported functions | |
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. 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_t * | pi_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... | |
Implementation of a packet iterator (PI)
The functions in PI.C have for goal to realize a packet iterator that permits to get the next packet following the progression order and change of it. The functions in PI.C are used by some function in T2.C.
typedef struct opj_pi_comp opj_pi_comp_t |
FIXME: documentation.
typedef struct opj_pi_iterator opj_pi_iterator_t |
Packet iterator.
typedef struct opj_pi_resolution opj_pi_resolution_t |
FIXME: documentation.
opj_pi_iterator_t* pi_create_decode | ( | opj_image_t * | image, |
opj_cp_t * | cp, | ||
int | tileno | ||
) |
Create a packet iterator for Decoder.
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 |
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_tcp::POC, opj_pi_iterator::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().
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.
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 |
pino | Iterator index for pi |
tpnum | Tile part number of the current tile |
tppos | The position of the tile part flag in the progression order |
t2_mode | If == 0 In Threshold calculation ,If == 1 Final pass |
cur_totnum_tp | The total number of tile parts in the current tile |
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.
pi | Previously created packet iterator |
cp | Coding parameters |
tileno | Number that identifies the tile for which the packets were listed |
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.
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 |
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_image_comp::dx, opj_pi_comp::dx, opj_pi_iterator::dx, opj_poc::dy, opj_image_comp::dy, opj_pi_comp::dy, opj_pi_iterator::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().
opj_bool pi_next | ( | opj_pi_iterator_t * | pi | ) |
Modify the packet iterator to point to the next packet.
pi | Packet iterator to modify |
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().