OpenJPEG: PI - Implementation of a packet iterator

OpenJPEG 2.1.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Data Structures | Typedefs
PI - Implementation of a packet iterator

## Data Structures
struct | opj_pi_resolution
| FIXME DOC. More...
struct | opj_pi_comp
| FIXME DOC. More...
struct | opj_pi_iterator
| Packet iterator. More...

## Typedefs
typedef struct opj_pi_resolution | opj_pi_resolution_t
| FIXME DOC. More...
typedef struct opj_pi_comp | opj_pi_comp_t
| FIXME DOC. More...
typedef struct opj_pi_iterator | opj_pi_iterator_t
| Packet iterator. More...

## Local static functions
static OPJ_BOOL | opj_pi_next_lrcp (opj_pi_iterator_t *pi)
| Get next packet in layer-resolution-component-precinct order. More...
static OPJ_BOOL | opj_pi_next_rlcp (opj_pi_iterator_t *pi)
| Get next packet in resolution-layer-component-precinct order. More...
static OPJ_BOOL | opj_pi_next_rpcl (opj_pi_iterator_t *pi)
| Get next packet in resolution-precinct-component-layer order. More...
static OPJ_BOOL | opj_pi_next_pcrl (opj_pi_iterator_t *pi)
| Get next packet in precinct-component-resolution-layer order. More...
static OPJ_BOOL | opj_pi_next_cprl (opj_pi_iterator_t *pi)
| Get next packet in component-precinct-resolution-layer order. More...
static void | opj_pi_update_encode_poc_and_final (opj_cp_t *p_cp, OPJ_UINT32 p_tileno, OPJ_INT32 p_tx0, OPJ_INT32 p_tx1, OPJ_INT32 p_ty0, OPJ_INT32 p_ty1, OPJ_UINT32 p_max_prec, OPJ_UINT32 p_max_res, OPJ_UINT32 p_dx_min, OPJ_UINT32 p_dy_min)
| Updates the coding parameters if the encoding is used with Progression order changes and final (or cinema parameters are used). More...
static void | opj_pi_update_encode_not_poc (opj_cp_t *p_cp, OPJ_UINT32 p_num_comps, OPJ_UINT32 p_tileno, OPJ_INT32 p_tx0, OPJ_INT32 p_tx1, OPJ_INT32 p_ty0, OPJ_INT32 p_ty1, OPJ_UINT32 p_max_prec, OPJ_UINT32 p_max_res, OPJ_UINT32 p_dx_min, OPJ_UINT32 p_dy_min)
| Updates the coding parameters if the encoding is not used with Progression order changes and final (and cinema parameters are used). More...
static void | opj_get_encoding_parameters (const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, OPJ_INT32 *p_tx0, OPJ_INT32 *p_tx1, OPJ_INT32 *p_ty0, OPJ_INT32 *p_ty1, OPJ_UINT32 *p_dx_min, OPJ_UINT32 *p_dy_min, OPJ_UINT32 *p_max_prec, OPJ_UINT32 *p_max_res)
| Gets the encoding parameters needed to update the coding parameters and all the pocs. More...
static void | opj_get_all_encoding_parameters (const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, OPJ_INT32 *p_tx0, OPJ_INT32 *p_tx1, OPJ_INT32 *p_ty0, OPJ_INT32 *p_ty1, OPJ_UINT32 *p_dx_min, OPJ_UINT32 *p_dy_min, OPJ_UINT32 *p_max_prec, OPJ_UINT32 *p_max_res, OPJ_UINT32 **p_resolutions)
| Gets the encoding parameters needed to update the coding parameters and all the pocs. More...
static opj_pi_iterator_t * | opj_pi_create (const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno)
| Allocates memory for a packet iterator. More...
static void | opj_pi_update_decode_not_poc (opj_pi_iterator_t *p_pi, opj_tcp_t *p_tcp, OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_res)
| FIXME DOC. More...
static void | opj_pi_update_decode_poc (opj_pi_iterator_t *p_pi, opj_tcp_t *p_tcp, OPJ_UINT32 p_max_precision, OPJ_UINT32 p_max_res)
| FIXME DOC. More...
OPJ_BOOL | opj_pi_check_next_level (OPJ_INT32 pos, opj_cp_t *cp, OPJ_UINT32 tileno, OPJ_UINT32 pino, const OPJ_CHAR *prog)
| FIXME DOC. More...

## Exported functions
opj_pi_iterator_t * | opj_pi_initialise_encode (const opj_image_t *image, opj_cp_t *cp, OPJ_UINT32 tileno, J2K_T2_MODE t2_mode)
| Creates a packet iterator for encoding. More...
void | opj_pi_update_encoding_parameters (const opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no)
| Updates the encoding parameters of the codec. More...
void | opj_pi_create_encode (opj_pi_iterator_t *pi, opj_cp_t *cp, OPJ_UINT32 tileno, OPJ_UINT32 pino, OPJ_UINT32 tpnum, OPJ_INT32 tppos, J2K_T2_MODE t2_mode)
| Modify the packet iterator for enabling tile part generation. More...
opj_pi_iterator_t * | opj_pi_create_decode (opj_image_t *image, opj_cp_t *cp, OPJ_UINT32 tileno)
| Create a packet iterator for Decoder. More...
void | opj_pi_destroy (opj_pi_iterator_t *p_pi, OPJ_UINT32 p_nb_elements)
| Destroys a packet iterator array. More...
OPJ_BOOL | opj_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 DOC.

typedef struct opj_pi_iterator opj_pi_iterator_t

Packet iterator.

typedef struct opj_pi_resolution opj_pi_resolution_t

FIXME DOC.

## Function Documentation

void opj_get_all_encoding_parameters | ( | const opj_image_t * | p_image,
|  | const opj_cp_t * | p_cp,
|  | OPJ_UINT32 | tileno,
|  | OPJ_INT32 * | p_tx0,
|  | OPJ_INT32 * | p_tx1,
|  | OPJ_INT32 * | p_ty0,
|  | OPJ_INT32 * | p_ty1,
|  | OPJ_UINT32 * | p_dx_min,
|  | OPJ_UINT32 * | p_dy_min,
|  | OPJ_UINT32 * | p_max_prec,
|  | OPJ_UINT32 * | p_max_res,
|  | OPJ_UINT32 ** | p_resolutions
| ) |  |
| static

Gets the encoding parameters needed to update the coding parameters and all the pocs.

The precinct widths, heights, dx and dy for each component at each resolution will be stored as well. the last parameter of the function should be an array of pointers of size nb components, each pointer leading to an area of size 4 * max_res. The data is stored inside this area with the following pattern : dx_compi_res0 , dy_compi_res0 , w_compi_res0, h_compi_res0 , dx_compi_res1 , dy_compi_res1 , w_compi_res1, h_compi_res1 , ...

Parameters

  p_image | the image being encoded.
  p_cp | the coding parameters.
  tileno | the tile index of the tile being encoded.
  p_tx0 | pointer that will hold the X0 parameter for the tile
  p_tx1 | pointer that will hold the X1 parameter for the tile
  p_ty0 | pointer that will hold the Y0 parameter for the tile
  p_ty1 | pointer that will hold the Y1 parameter for the tile
  p_max_prec | pointer that will hold the the maximum precision for all the bands of the tile
  p_max_res | pointer that will hold the the maximum number of resolutions for all the poc inside the tile.
  p_dx_min | pointer that will hold the the minimum dx of all the components of all the resolutions for the tile.
  p_dy_min | pointer that will hold the the minimum dy of all the components of all the resolutions for the tile.
  p_resolutions | pointer to an area corresponding to the one described above.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, opj_image::numcomps, opj_tccp::numresolutions, opj_int_ceildiv(), opj_int_ceildivpow2(), opj_int_floordivpow2(), opj_int_max(), opj_int_min(), opj_tccp::prch, opj_tccp::prcw, opj_tcp::tccps, tcp, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_pi_create_decode(), and opj_pi_initialise_encode().

void opj_get_encoding_parameters | ( | const opj_image_t * | p_image,
|  | const opj_cp_t * | p_cp,
|  | OPJ_UINT32 | tileno,
|  | OPJ_INT32 * | p_tx0,
|  | OPJ_INT32 * | p_tx1,
|  | OPJ_INT32 * | p_ty0,
|  | OPJ_INT32 * | p_ty1,
|  | OPJ_UINT32 * | p_dx_min,
|  | OPJ_UINT32 * | p_dy_min,
|  | OPJ_UINT32 * | p_max_prec,
|  | OPJ_UINT32 * | p_max_res
| ) |  |
| static

Gets the encoding parameters needed to update the coding parameters and all the pocs.

Parameters

  p_image | the image being encoded.
  p_cp | the coding parameters.
  tileno | the tile index of the tile being encoded.
  p_tx0 | pointer that will hold the X0 parameter for the tile
  p_tx1 | pointer that will hold the X1 parameter for the tile
  p_ty0 | pointer that will hold the Y0 parameter for the tile
  p_ty1 | pointer that will hold the Y1 parameter for the tile
  p_max_prec | pointer that will hold the the maximum precision for all the bands of the tile
  p_max_res | pointer that will hold the the maximum number of resolutions for all the poc inside the tile.
  p_dx_min | pointer that will hold the the minimum dx of all the components of all the resolutions for the tile.
  p_dy_min | pointer that will hold the the minimum dy of all the components of all the resolutions for the tile.

References opj_image::comps, opj_image_comp::dx, opj_image_comp::dy, opj_image::numcomps, opj_tccp::numresolutions, opj_int_ceildiv(), opj_int_ceildivpow2(), opj_int_floordivpow2(), opj_int_max(), opj_int_min(), opj_uint_min(), opj_tccp::prch, opj_tccp::prcw, opj_tcp::tccps, opj_cp::tcps, opj_cp::tdx, opj_cp::tdy, opj_cp::th, opj_cp::tw, opj_cp::tx0, opj_cp::ty0, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.

Referenced by opj_pi_update_encoding_parameters().

OPJ_BOOL opj_pi_check_next_level | ( | OPJ_INT32 | pos,
|  | opj_cp_t * | cp,
|  | OPJ_UINT32 | tileno,
|  | OPJ_UINT32 | pino,
|  | const OPJ_CHAR * | prog
| ) |  |

FIXME DOC.

References opj_poc::comp_t, opj_poc::compE, opj_poc::lay_t, opj_poc::layE, OPJ_FALSE, OPJ_LRCP, OPJ_RLCP, OPJ_TRUE, opj_tcp::pocs, opj_poc::prc_t, opj_poc::prcE, opj_poc::prg, opj_poc::res_t, opj_poc::resE, tcp, opj_cp::tcps, opj_poc::tx0_t, opj_poc::txE, opj_poc::ty0_t, and opj_poc::tyE.

Referenced by opj_pi_create_encode().

opj_pi_iterator_t * opj_pi_create | ( | const opj_image_t * | p_image,
|  | const opj_cp_t * | p_cp,
|  | OPJ_UINT32 | tileno
| ) |  |
| static

Allocates memory for a packet iterator.

Data and data sizes are set by this operation. No other data is set. The include section of the packet iterator is not allocated.

Parameters

  p_image | the image used to initialize the packet iterator (in fact only the number of components is relevant.
  p_cp | the coding parameters.
  tileno | the index of the tile from which creating the packet iterator.

References opj_pi_iterator::comps, opj_pi_iterator::numcomps, opj_image::numcomps, opj_tcp::numpocs, opj_pi_comp::numresolutions, opj_tccp::numresolutions, opj_calloc, opj_malloc, opj_pi_destroy(), opj_pi_comp::resolutions, opj_tcp::tccps, tcp, opj_cp::tcps, and opj_cp::th.

Referenced by opj_pi_create_decode(), and opj_pi_initialise_encode().

opj_pi_iterator_t* opj_pi_create_decode | ( | opj_image_t * | image,
|  | opj_cp_t * | cp,
|  | OPJ_UINT32 | 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
  opj_pi_destroy

References opj_pi_iterator::comps, opj_image::comps, opj_pi_comp::dx, opj_image_comp::dx, opj_pi_comp::dy, opj_image_comp::dy, opj_pi_iterator::include, opj_pi_iterator::numcomps, opj_image::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_pi_comp::numresolutions, opj_calloc, opj_free, opj_get_all_encoding_parameters(), OPJ_J2K_MAXRLVLS, opj_malloc, opj_pi_create(), opj_pi_destroy(), opj_pi_update_decode_not_poc(), opj_pi_update_decode_poc(), opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, opj_tcp::POC, opj_pi_resolution::pw, 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::th, opj_pi_iterator::tx0, opj_pi_iterator::tx1, opj_pi_iterator::ty0, and opj_pi_iterator::ty1.

Referenced by opj_t2_decode_packets().

void opj_pi_create_encode | ( | opj_pi_iterator_t * | pi,
|  | opj_cp_t * | cp,
|  | OPJ_UINT32 | tileno,
|  | OPJ_UINT32 | pino,
|  | OPJ_UINT32 | tpnum,
|  | OPJ_INT32 | tppos,
|  | J2K_T2_MODE | t2_mode
| ) |  |

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
  pino | FIXME DOC
  tpnum | Tile part number of the current tile
  tppos | The position of the tile part flag in the progression order
  t2_mode | FIXME DOC

References opj_poc::comp_t, opj_poc::compE, opj_poc::compno0, opj_poc::compno1, opj_poc::compS, 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, opj_cp::m_enc, opj_cp::m_specific_param, opj_encoding_param::m_tp_on, OPJ_IS_CINEMA, opj_j2k_convert_progression_order(), OPJ_LRCP, opj_pi_check_next_level(), OPJ_RLCP, 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, opj_poc::res_t, opj_poc::resE, opj_poc::resno0, opj_poc::resno1, opj_poc::resS, opj_cp::rsiz, tcp, opj_cp::tcps, opj_poc::tx0, opj_poc::tx0_t, opj_pi_iterator::tx1, opj_poc::tx1, opj_poc::txE, opj_poc::txS, opj_poc::ty0, opj_poc::ty0_t, opj_pi_iterator::ty1, opj_poc::ty1, opj_poc::tyE, and opj_poc::tyS.

Referenced by opj_t2_encode_packets().

void opj_pi_destroy | ( | opj_pi_iterator_t * | p_pi,
|  | OPJ_UINT32 | p_nb_elements
| ) |  |

Destroys a packet iterator array.

Parameters

  p_pi | the packet iterator array to destroy.
  p_nb_elements | the number of elements in the array.

References opj_pi_iterator::comps, opj_pi_iterator::include, opj_pi_iterator::numcomps, opj_free, and opj_pi_comp::resolutions.

Referenced by opj_pi_create(), opj_pi_create_decode(), opj_pi_initialise_encode(), opj_t2_decode_packets(), and opj_t2_encode_packets().

opj_pi_iterator_t* opj_pi_initialise_encode | ( | const opj_image_t * | image,
|  | opj_cp_t * | cp,
|  | OPJ_UINT32 | tileno,
|  | J2K_T2_MODE | t2_mode
| ) |  |

Creates a packet iterator for encoding.

Parameters

  image | the image being encoded.
  cp | the coding parameters.
  tileno | index of the tile being encoded.
  t2_mode | the type of pass for generating the packet iterator

Returns
  a list of packet iterator that points to the first packet of the tile (not true).

References opj_pi_iterator::comps, opj_image::comps, opj_pi_comp::dx, opj_pi_iterator::dx, opj_image_comp::dx, opj_pi_comp::dy, opj_pi_iterator::dy, opj_image_comp::dy, FINAL_PASS, opj_pi_iterator::include, opj_cp::m_enc, opj_cp::m_specific_param, opj_encoding_param::m_tp_on, opj_pi_iterator::numcomps, opj_image::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_pi_comp::numresolutions, opj_calloc, opj_free, opj_get_all_encoding_parameters(), OPJ_IS_CINEMA, OPJ_J2K_MAXRLVLS, opj_malloc, opj_pi_create(), opj_pi_destroy(), opj_pi_update_encode_not_poc(), opj_pi_update_encode_poc_and_final(), opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, opj_tcp::POC, opj_pi_resolution::pw, opj_pi_comp::resolutions, opj_cp::rsiz, 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::th, opj_pi_iterator::tp_on, opj_pi_iterator::tx0, opj_pi_iterator::tx1, opj_pi_iterator::ty0, and opj_pi_iterator::ty1.

Referenced by opj_t2_encode_packets().

OPJ_BOOL opj_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 OPJ_CPRL, OPJ_FALSE, OPJ_LRCP, OPJ_PCRL, opj_pi_next_cprl(), opj_pi_next_lrcp(), opj_pi_next_pcrl(), opj_pi_next_rlcp(), opj_pi_next_rpcl(), OPJ_PROG_UNKNOWN, OPJ_RLCP, OPJ_RPCL, opj_pi_iterator::poc, and opj_poc::prg.

Referenced by opj_t2_decode_packets(), and opj_t2_encode_packets().

OPJ_BOOL opj_pi_next_cprl | ( | opj_pi_iterator_t * | pi | ) |
| static

Get next packet in component-precinct-resolution-layer order.

Parameters

  pi | packet iterator to modify

Returns
  returns false if pi pointed to the last packet or else returns true

References opj_pi_iterator::compno, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_pi_comp::dx, opj_pi_iterator::dx, opj_pi_comp::dy, opj_pi_iterator::dy, opj_pi_iterator::first, opj_pi_iterator::include, opj_pi_iterator::layno, opj_poc::layno0, opj_poc::layno1, opj_pi_comp::numresolutions, OPJ_FALSE, opj_int_ceildiv(), opj_int_floordivpow2(), OPJ_TRUE, opj_uint_min(), opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, opj_pi_iterator::poc, opj_pi_iterator::precno, opj_pi_resolution::pw, opj_pi_iterator::resno, 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_pi_iterator::tp_on, opj_pi_iterator::tx0, opj_poc::tx0, opj_pi_iterator::tx1, opj_poc::tx1, opj_pi_iterator::ty0, opj_poc::ty0, opj_pi_iterator::ty1, opj_poc::ty1, opj_pi_iterator::x, and opj_pi_iterator::y.

Referenced by opj_pi_next().

OPJ_BOOL opj_pi_next_lrcp | ( | opj_pi_iterator_t * | pi | ) |
| static

Get next packet in layer-resolution-component-precinct order.

Parameters

  pi | packet iterator to modify

Returns
  returns false if pi pointed to the last packet or else returns true

References opj_pi_iterator::compno, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_pi_iterator::first, opj_pi_iterator::include, opj_pi_iterator::layno, opj_poc::layno0, opj_poc::layno1, opj_pi_comp::numresolutions, OPJ_FALSE, OPJ_TRUE, opj_pi_resolution::ph, opj_pi_iterator::poc, opj_pi_iterator::precno, opj_poc::precno0, opj_poc::precno1, opj_pi_resolution::pw, opj_pi_iterator::resno, 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, and opj_pi_iterator::tp_on.

Referenced by opj_pi_next().

OPJ_BOOL opj_pi_next_pcrl | ( | opj_pi_iterator_t * | pi | ) |
| static

Get next packet in precinct-component-resolution-layer order.

Parameters

  pi | packet iterator to modify

Returns
  returns false if pi pointed to the last packet or else returns true

References opj_pi_iterator::compno, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_pi_comp::dx, opj_pi_iterator::dx, opj_pi_comp::dy, opj_pi_iterator::dy, opj_pi_iterator::first, opj_pi_iterator::include, opj_pi_iterator::layno, opj_poc::layno0, opj_poc::layno1, opj_pi_iterator::numcomps, opj_pi_comp::numresolutions, OPJ_FALSE, opj_int_ceildiv(), opj_int_floordivpow2(), OPJ_TRUE, opj_uint_min(), opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, opj_pi_iterator::poc, opj_pi_iterator::precno, opj_pi_resolution::pw, opj_pi_iterator::resno, 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_pi_iterator::tp_on, opj_pi_iterator::tx0, opj_poc::tx0, opj_pi_iterator::tx1, opj_poc::tx1, opj_pi_iterator::ty0, opj_poc::ty0, opj_pi_iterator::ty1, opj_poc::ty1, opj_pi_iterator::x, and opj_pi_iterator::y.

Referenced by opj_pi_next().

OPJ_BOOL opj_pi_next_rlcp | ( | opj_pi_iterator_t * | pi | ) |
| static

Get next packet in resolution-layer-component-precinct order.

Parameters

  pi | packet iterator to modify

Returns
  returns false if pi pointed to the last packet or else returns true

References opj_pi_iterator::compno, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_pi_iterator::first, opj_pi_iterator::include, opj_pi_iterator::layno, opj_poc::layno0, opj_poc::layno1, opj_pi_comp::numresolutions, OPJ_FALSE, OPJ_TRUE, opj_pi_resolution::ph, opj_pi_iterator::poc, opj_pi_iterator::precno, opj_poc::precno0, opj_poc::precno1, opj_pi_resolution::pw, opj_pi_iterator::resno, 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, and opj_pi_iterator::tp_on.

Referenced by opj_pi_next().

OPJ_BOOL opj_pi_next_rpcl | ( | opj_pi_iterator_t * | pi | ) |
| static

Get next packet in resolution-precinct-component-layer order.

Parameters

  pi | packet iterator to modify

Returns
  returns false if pi pointed to the last packet or else returns true

References opj_pi_iterator::compno, opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::comps, opj_pi_comp::dx, opj_pi_iterator::dx, opj_pi_comp::dy, opj_pi_iterator::dy, opj_pi_iterator::first, opj_pi_iterator::include, opj_pi_iterator::layno, opj_poc::layno0, opj_poc::layno1, opj_pi_iterator::numcomps, opj_pi_comp::numresolutions, OPJ_FALSE, opj_int_ceildiv(), opj_int_floordivpow2(), OPJ_TRUE, opj_uint_min(), opj_pi_resolution::pdx, opj_pi_resolution::pdy, opj_pi_resolution::ph, opj_pi_iterator::poc, opj_pi_iterator::precno, opj_pi_resolution::pw, opj_pi_iterator::resno, 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_pi_iterator::tp_on, opj_pi_iterator::tx0, opj_poc::tx0, opj_pi_iterator::tx1, opj_poc::tx1, opj_pi_iterator::ty0, opj_poc::ty0, opj_pi_iterator::ty1, opj_poc::ty1, opj_pi_iterator::x, and opj_pi_iterator::y.

Referenced by opj_pi_next().

void opj_pi_update_decode_not_poc | ( | opj_pi_iterator_t * | p_pi,
|  | opj_tcp_t * | p_tcp,
|  | OPJ_UINT32 | p_max_precision,
|  | OPJ_UINT32 | p_max_res
| ) |  |
| static

FIXME DOC.

References opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::first, opj_poc::layno0, opj_poc::layno1, opj_pi_iterator::numcomps, opj_tcp::numlayers, opj_tcp::numpocs, opj_pi_iterator::poc, opj_poc::precno0, opj_poc::precno1, opj_tcp::prg, opj_poc::prg, opj_poc::resno0, and opj_poc::resno1.

Referenced by opj_pi_create_decode().

void opj_pi_update_decode_poc | ( | opj_pi_iterator_t * | p_pi,
|  | opj_tcp_t * | p_tcp,
|  | OPJ_UINT32 | p_max_precision,
|  | OPJ_UINT32 | p_max_res
| ) |  |
| static

FIXME DOC.

References opj_poc::compno0, opj_poc::compno1, opj_pi_iterator::first, opj_poc::layno0, opj_poc::layno1, opj_tcp::numpocs, OPJ_ARG_NOT_USED, opj_pi_iterator::poc, opj_tcp::pocs, opj_poc::precno0, opj_poc::precno1, opj_poc::prg, opj_poc::resno0, and opj_poc::resno1.

Referenced by opj_pi_create_decode().

void opj_pi_update_encode_not_poc | ( | opj_cp_t * | p_cp,
|  | OPJ_UINT32 | p_num_comps,
|  | OPJ_UINT32 | p_tileno,
|  | OPJ_INT32 | p_tx0,
|  | OPJ_INT32 | p_tx1,
|  | OPJ_INT32 | p_ty0,
|  | OPJ_INT32 | p_ty1,
|  | OPJ_UINT32 | p_max_prec,
|  | OPJ_UINT32 | p_max_res,
|  | OPJ_UINT32 | p_dx_min,
|  | OPJ_UINT32 | p_dy_min
| ) |  |
| static

Updates the coding parameters if the encoding is not used with Progression order changes and final (and cinema parameters are used).

Parameters

  p_cp | the coding parameters to modify
  p_num_comps | the number of components
  p_tileno | the tile index being concerned.
  p_tx0 | X0 parameter for the tile
  p_tx1 | X1 parameter for the tile
  p_ty0 | Y0 parameter for the tile
  p_ty1 | Y1 parameter for the tile
  p_max_prec | the maximum precision for all the bands of the tile
  p_max_res | the maximum number of resolutions for all the poc inside the tile.
  p_dx_min | the minimum dx of all the components of all the resolutions for the tile.
  p_dy_min | the minimum dy of all the components of all the resolutions for the tile.

References opj_poc::compE, opj_poc::compS, opj_poc::dx, opj_poc::dy, opj_poc::layE, opj_poc::layS, opj_tcp::numlayers, opj_tcp::numpocs, opj_tcp::pocs, opj_poc::prcE, opj_poc::prcS, opj_tcp::prg, opj_poc::prg, opj_poc::resE, opj_poc::resS, opj_cp::tcps, opj_cp::th, opj_poc::txE, opj_poc::txS, opj_poc::tyE, and opj_poc::tyS.

Referenced by opj_pi_initialise_encode(), and opj_pi_update_encoding_parameters().

void opj_pi_update_encode_poc_and_final | ( | opj_cp_t * | p_cp,
|  | OPJ_UINT32 | p_tileno,
|  | OPJ_INT32 | p_tx0,
|  | OPJ_INT32 | p_tx1,
|  | OPJ_INT32 | p_ty0,
|  | OPJ_INT32 | p_ty1,
|  | OPJ_UINT32 | p_max_prec,
|  | OPJ_UINT32 | p_max_res,
|  | OPJ_UINT32 | p_dx_min,
|  | OPJ_UINT32 | p_dy_min
| ) |  |
| static

Updates the coding parameters if the encoding is used with Progression order changes and final (or cinema parameters are used).

Parameters

  p_cp | the coding parameters to modify
  p_tileno | the tile index being concerned.
  p_tx0 | X0 parameter for the tile
  p_tx1 | X1 parameter for the tile
  p_ty0 | Y0 parameter for the tile
  p_ty1 | Y1 parameter for the tile
  p_max_prec | the maximum precision for all the bands of the tile
  p_max_res | the maximum number of resolutions for all the poc inside the tile.
  p_dx_min | the minimum dx of all the components of all the resolutions for the tile.
  p_dy_min | the minimum dy of all the components of all the resolutions for the tile.

References opj_poc::compE, opj_poc::compno0, opj_poc::compno1, opj_poc::compS, opj_poc::dx, opj_poc::dy, opj_poc::layE, opj_poc::layno1, opj_poc::layS, opj_tcp::numpocs, OPJ_ARG_NOT_USED, opj_tcp::pocs, opj_poc::prcE, opj_poc::prcS, opj_poc::prg, opj_poc::prg1, opj_poc::resE, opj_poc::resno0, opj_poc::resno1, opj_poc::resS, opj_cp::tcps, opj_cp::th, opj_poc::txE, opj_poc::txS, opj_poc::tyE, and opj_poc::tyS.

Referenced by opj_pi_initialise_encode(), and opj_pi_update_encoding_parameters().

void opj_pi_update_encoding_parameters | ( | const opj_image_t * | p_image,
|  | opj_cp_t * | p_cp,
|  | OPJ_UINT32 | p_tile_no
| ) |  |

Updates the encoding parameters of the codec.

Parameters

  p_image | the image being encoded.
  p_cp | the coding parameters.
  p_tile_no | index of the tile being encoded.

References opj_image::numcomps, opj_get_encoding_parameters(), opj_pi_update_encode_not_poc(), opj_pi_update_encode_poc_and_final(), opj_tcp::POC, opj_cp::tcps, and opj_cp::th.

Referenced by opj_j2k_calculate_tp().