OpenJPEG  2.5.0
Data Structures | Typedefs
pi.h File Reference

Implementation of a packet iterator (PI) More...

Go to the source code of this file.

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...
 

Functions

Exported functions
opj_pi_iterator_topj_pi_initialise_encode (const opj_image_t *image, opj_cp_t *cp, OPJ_UINT32 tileno, J2K_T2_MODE t2_mode, opj_event_mgr_t *manager)
 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_topj_pi_create_decode (opj_image_t *image, opj_cp_t *cp, OPJ_UINT32 tileno, opj_event_mgr_t *manager)
 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...
 
OPJ_UINT32 opj_get_encoding_packet_count (const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 p_tile_no)
 Return the number of packets in the tile. More...
 

Detailed Description

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 Documentation

◆ opj_pi_comp_t

typedef struct opj_pi_comp opj_pi_comp_t

FIXME DOC.

◆ opj_pi_iterator_t

Packet iterator.

◆ opj_pi_resolution_t

FIXME DOC.

Function Documentation

◆ opj_get_encoding_packet_count()

OPJ_UINT32 opj_get_encoding_packet_count ( const opj_image_t p_image,
const opj_cp_t p_cp,
OPJ_UINT32  p_tile_no 
)

Return the number of packets in the tile.

Parameters
imagethe image being encoded.
cpCoding parameters
tilenoNumber that identifies the tile.

References opj_image::numcomps, opj_tcp::numlayers, opj_get_all_encoding_parameters(), opj_cp::tcps, and opj_cp::th.

Referenced by opj_j2k_get_specific_header_sizes(), and opj_t2_encode_packets().

◆ opj_pi_create_decode()

opj_pi_iterator_t* opj_pi_create_decode ( opj_image_t image,
opj_cp_t cp,
OPJ_UINT32  tileno,
opj_event_mgr_t manager 
)

◆ opj_pi_create_encode()

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
piHandle to the packet iterator generated in pi_initialise_encode
cpCoding parameters
tilenoNumber that identifies the tile for which to list the packets
pinoFIXME DOC
tpnumTile part number of the current tile
tpposThe position of the tile part flag in the progression order
t2_modeFIXME DOC

References opj_poc::compno0, opj_poc::compno1, FINAL_PASS, opj_pi_iterator::first, opj_poc::layno0, opj_poc::layno1, opj_cp::m_enc, opj_cp::m_specific_param, opj_encoding_param::m_tp_on, OPJ_IS_CINEMA, OPJ_IS_IMF, opj_j2k_convert_progression_order(), OPJ_LRCP, opj_pi_check_next_level(), OPJ_RLCP, opj_pi_iterator::poc, opj_tcp::pocs, opj_poc::precno0, opj_poc::precno1, opj_poc::prg, opj_poc::resno0, opj_poc::resno1, opj_cp::rsiz, tcp, opj_cp::tcps, opj_poc::tx0, opj_pi_iterator::tx1, opj_poc::tx1, opj_poc::ty0, opj_pi_iterator::ty1, and opj_poc::ty1.

Referenced by opj_t2_encode_packets().

◆ opj_pi_destroy()

void opj_pi_destroy ( opj_pi_iterator_t p_pi,
OPJ_UINT32  p_nb_elements 
)

Destroys a packet iterator array.

Parameters
p_pithe packet iterator array to destroy.
p_nb_elementsthe 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_initialise_encode()

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,
opj_event_mgr_t manager 
)

◆ opj_pi_next()

OPJ_BOOL opj_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 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_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_imagethe image being encoded.
p_cpthe coding parameters.
p_tile_noindex 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().