#define OPJ_J2K_MAXRLVLS
Number of maximum resolution level authorized.
Definition: openjpeg.h:152
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)
Creates a packet iterator for encoding.
Definition: pi.c:1615
FIXME DOC.
Definition: pi.h:55
OPJ_UINT32 compE
Definition: openjpeg.h:383
struct opj_jp2_box opj_jp2_box_t
JP2 Box.
OPJ_UINT32 x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:715
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.
Definition: pi.c:1592
unsigned char OPJ_BYTE
Definition: openjpeg.h:123
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:831
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx1
Definition: openjpeg.h:379
OPJ_UINT32 compS
Definition: openjpeg.h:381
int numcomps
component numbers
Definition: openjpeg.h:877
Packet iterator.
Definition: pi.h:73
struct opj_pi_comp opj_pi_comp_t
FIXME DOC.
int tw
number of tiles in X
Definition: openjpeg.h:873
OPJ_SIZE_T opj_stream_write_data(opj_stream_private_t *p_stream, const OPJ_BYTE *p_buffer, OPJ_SIZE_T p_size, opj_event_mgr_t *p_event_mgr)
Writes some bytes to the stream.
Definition: cio.c:385
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
OPJ_INT16 * include
precise if the packet has been already used (useful for progression order change)
Definition: pi.h:77
OPJ_PROG_ORDER prg
progression order
Definition: j2k.h:249
OPJ_UINT32 dy
YRsiz: vertical separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:681
OPJ_UINT32 step_l
layer step used to localize the packet in the include vector
Definition: pi.h:81
opj_poc_t pocs[J2K_MAX_POCS]
progression order changes
Definition: j2k.h:260
static OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t *pi)
Get next packet in component-precinct-resolution-layer order.
Definition: pi.c:627
int ph[33]
precinct number for each resolution level (height)
Definition: openjpeg.h:825
OPJ_UINT32 precno0
Definition: openjpeg.h:371
OPJ_UINT32 compno
component that identify the packet
Definition: pi.h:89
OPJ_UINT32 numresolutions
number of resolutions
Definition: j2k.h:183
void opj_pi_destroy(opj_pi_iterator_t *p_pi, OPJ_UINT32 p_nb_elements)
Destroys a packet iterator array.
Definition: pi.c:2071
static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t *pi)
Get next packet in precinct-component-resolution-layer order.
Definition: pi.c:489
OPJ_UINT32 tyS
Definition: openjpeg.h:385
opj_pi_iterator_t * opj_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.
Definition: pi.c:1393
OPJ_BOOL opj_pi_next(opj_pi_iterator_t *pi)
Modify the packet iterator to point to the next packet.
Definition: pi.c:2136
OPJ_UINT32 include_size
Number of elements in include array.
Definition: pi.h:79
opj_encoding_param_t m_enc
Definition: j2k.h:401
OPJ_UINT32 y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:717
opj_pi_comp_t * comps
Components.
Definition: pi.h:103
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:719
static INLINE OPJ_UINT32 opj_uint_ceildiv(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer and round upwards.
Definition: opj_intmath.h:170
static 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.
Definition: pi.c:1304
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.
Definition: pi.c:2103
FIXME DOC.
Definition: pi.h:63
#define OPJ_IS_IMF(v)
Definition: openjpeg.h:231
OPJ_BOOL opj_event_msg(opj_event_mgr_t *p_event_mgr, OPJ_INT32 event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:91
OPJ_BOOL first
0 if the first packet
Definition: pi.h:97
OPJ_UINT32 x
FIXME DOC.
Definition: pi.h:107
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:142
static void opj_get_all_encoding_parameters(const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, OPJ_UINT32 *p_tx0, OPJ_UINT32 *p_tx1, OPJ_UINT32 *p_ty0, OPJ_UINT32 *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.
Definition: pi.c:883
OPJ_UINT32 txE
Definition: openjpeg.h:385
OPJ_UINT32 pdy
Definition: pi.h:56
int numlayers
number of layer
Definition: openjpeg.h:879
@ tcp
Definition: query_parser.h:41
OPJ_UINT32 ty0
Definition: pi.h:105
#define JPIP_PHIX
Definition: indexbox_manager.h:51
OPJ_UINT32 layno0
Layer num start,Precinct num start, Precinct num end.
Definition: openjpeg.h:371
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.
Definition: pi.c:1592
int64_t OPJ_OFF_T
Definition: openjpeg.h:136
OPJ_OFF_T opj_stream_skip(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, opj_event_mgr_t *p_event_mgr)
Skips a number of bytes from the stream.
Definition: cio.c:593
OPJ_BOOL opj_stream_seek(opj_stream_private_t *p_stream, OPJ_OFF_T p_size, struct opj_event_mgr *p_event_mgr)
Seeks a number of bytes from the stream.
Definition: cio.c:641
@ OPJ_RLCP
resolution-layer-component-precinct order
Definition: openjpeg.h:306
static INLINE OPJ_UINT32 opj_uint_floordivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round downwards.
Definition: opj_intmath.h:216
Message handler object used for.
Definition: event.h:50
OPJ_UINT32 dx
Definition: pi.h:64
static opj_pi_iterator_t * opj_pi_create(const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, opj_event_mgr_t *manager)
Allocates memory for a packet iterator.
Definition: pi.c:1019
OPJ_UINT32 y
Definition: pi.h:107
struct opj_pi_resolution opj_pi_resolution_t
FIXME DOC.
OPJ_OFF_T opj_stream_tell(const opj_stream_private_t *p_stream)
Tells the byte offset on the stream (similar to ftell).
Definition: cio.c:579
OPJ_UINT32 step_p
precinct step used to localize the packet in the include vector
Definition: pi.h:87
OPJ_UINT32 tx1
Definition: pi.h:105
OPJ_UINT32 type
Definition: jp2.h:200
Defines a single image component.
Definition: openjpeg.h:677
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.
Definition: pi.c:1220
Byte input-output stream.
Definition: cio.h:81
@ OPJ_CPRL
component-precinct-resolution-layer order
Definition: openjpeg.h:309
Coding parameters.
Definition: j2k.h:351
opj_event_mgr_t * manager
event manager
Definition: pi.h:111
OPJ_UINT32 dx
FIXME DOC.
Definition: pi.h:109
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:768
OPJ_UINT32 ty1
Definition: pi.h:105
OPJ_UINT32 tdy
YTsiz.
Definition: j2k.h:363
OPJ_UINT32 tx0
XTOsiz.
Definition: j2k.h:357
OPJ_UINT32 precno1
Definition: openjpeg.h:371
OPJ_UINT32 prch[OPJ_J2K_MAXRLVLS]
precinct height
Definition: j2k.h:203
OPJ_UINT32 numpocs
number of progression order changes
Definition: j2k.h:258
OPJ_UINT32 tdx
XTsiz.
Definition: j2k.h:361
void opj_write_manf(int second, int v, opj_jp2_box_t *box, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: cidx_manager.c:157
static INLINE OPJ_UINT32 opj_uint_adds(OPJ_UINT32 a, OPJ_UINT32 b)
Get the saturated sum of two unsigned integers.
Definition: opj_intmath.h:92
int OPJ_BOOL
Definition: openjpeg.h:116
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:397
OPJ_PROG_ORDER prg
Definition: openjpeg.h:373
OPJ_UINT32 pdx
Definition: pi.h:56
OPJ_UINT32 dy
Definition: openjpeg.h:385
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:304
OPJ_UINT32 precno
precinct that identify the packet
Definition: pi.h:93
OPJ_OFF_T end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:770
@ OPJ_PCRL
precinct-component-resolution-layer order
Definition: openjpeg.h:308
OPJ_UINT32 prcw[OPJ_J2K_MAXRLVLS]
precinct width
Definition: j2k.h:201
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.
Definition: pi.c:1808
#define OPJ_IS_CINEMA(v)
JPEG 2000 profile macros.
Definition: openjpeg.h:228
JP2 Box.
Definition: jp2.h:198
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty1
Definition: openjpeg.h:379
char OPJ_CHAR
Definition: openjpeg.h:120
OPJ_UINT32 dy
Definition: pi.h:109
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
OPJ_BITFIELD m_tp_on
Enabling Tile part generation.
Definition: j2k.h:335
opj_pi_iterator_t * opj_pi_initialise_encode(const opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no, J2K_T2_MODE p_t2_mode, opj_event_mgr_t *manager)
Creates a packet iterator for encoding.
Definition: pi.c:1615
int32_t OPJ_INT32
Definition: openjpeg.h:131
OPJ_UINT32 th
number of tiles in height
Definition: j2k.h:369
OPJ_UINT32 resE
Definition: openjpeg.h:383
static OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t *pi)
Get next packet in resolution-precinct-component-layer order.
Definition: pi.c:350
void opj_pi_destroy(opj_pi_iterator_t *p_pi, OPJ_UINT32 p_nb_elements)
Destroys a packet iterator array.
Definition: pi.c:2071
OPJ_UINT32 numlayers
number of layers
Definition: j2k.h:251
OPJ_UINT32 y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: openjpeg.h:713
OPJ_BYTE tp_on
Enabling Tile part generation.
Definition: pi.h:75
OPJ_BITFIELD POC
indicates if a POC marker has been used O:NO, 1:YES
Definition: j2k.h:313
opj_pi_resolution_t * resolutions
Definition: pi.h:67
OPJ_UINT32 dy
Definition: pi.h:64
static OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t *pi)
Get next packet in layer-resolution-component-precinct order.
Definition: pi.c:237
static INLINE OPJ_UINT32 opj_uint_min(OPJ_UINT32 a, OPJ_UINT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:65
#define OPJ_TRUE
Definition: openjpeg.h:117
static INLINE OPJ_UINT32 opj_uint_max(OPJ_UINT32 a, OPJ_UINT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:83
void * opj_malloc(size_t size)
Allocate an uninitialized memory block.
Definition: opj_malloc.c:191
OPJ_UINT32 layE
End value, initialised in pi_initialise_encode.
Definition: openjpeg.h:383
OPJ_UINT32 compno0
Definition: openjpeg.h:367
OPJ_UINT32 prcS
Definition: openjpeg.h:381
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
@ OPJ_RPCL
resolution-precinct-component-layer order
Definition: openjpeg.h:307
OPJ_UINT32 tx0
FIXME DOC.
Definition: pi.h:105
OPJ_UINT32 ph
Definition: pi.h:57
OPJ_UINT16 rsiz
Size of the image in bits.
Definition: j2k.h:355
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:766
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: j2k.h:245
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:278
static void opj_pi_update_encode_not_poc(opj_cp_t *p_cp, OPJ_UINT32 p_num_comps, OPJ_UINT32 p_tileno, OPJ_UINT32 p_tx0, OPJ_UINT32 p_tx1, OPJ_UINT32 p_ty0, OPJ_UINT32 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 (a...
Definition: pi.c:1165
OPJ_UINT32 compno1
Definition: openjpeg.h:369
OPJ_UINT32_SEMANTICALLY_BUT_INT32 ty0
Definition: openjpeg.h:379
OPJ_UINT32 numcomps
number of components in the image
Definition: pi.h:101
OPJ_UINT32 step_r
resolution step used to localize the packet in the include vector
Definition: pi.h:83
OPJ_BOOL opj_pi_next(opj_pi_iterator_t *pi)
Modify the packet iterator to point to the next packet.
Definition: pi.c:2136
OPJ_UINT32 resno
resolution that identify the packet
Definition: pi.h:91
OPJ_UINT32 txS
Start and end values of Tile width and height, initialised in pi_initialise_encode.
Definition: openjpeg.h:385
Tile-component coding parameters.
Definition: j2k.h:179
OPJ_UINT32 prcE
Definition: openjpeg.h:383
struct opj_pi_iterator opj_pi_iterator_t
Packet iterator.
OPJ_UINT32 step_c
component step used to localize the packet in the include vector
Definition: pi.h:85
OPJ_UINT32 x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: openjpeg.h:711
static INLINE OPJ_UINT32 opj_uint_ceildivpow2(OPJ_UINT32 a, OPJ_UINT32 b)
Divide an integer by a power of 2 and round upwards.
Definition: opj_intmath.h:198
OPJ_UINT32 length
Definition: jp2.h:199
OPJ_UINT32 pw
Definition: pi.h:57
opj_image_comp_t * comps
image components
Definition: openjpeg.h:723
OPJ_PROG_ORDER prog
progression order
Definition: openjpeg.h:863
OPJ_UINT32 tyE
Definition: openjpeg.h:385
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:897
int opj_write_phixfaix(int coff, int compno, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: phix_manager.c:96
static void opj_get_encoding_parameters(const opj_image_t *p_image, const opj_cp_t *p_cp, OPJ_UINT32 tileno, OPJ_UINT32 *p_tx0, OPJ_UINT32 *p_tx1, OPJ_UINT32 *p_ty0, OPJ_UINT32 *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.
Definition: pi.c:762
@ FINAL_PASS
Function called in Rate allocation process.
Definition: j2k.h:163
Index structure of the codestream.
Definition: openjpeg.h:851
OPJ_UINT32_SEMANTICALLY_BUT_INT32 tx0
Start and end values for Tile width and height.
Definition: openjpeg.h:379
#define EVT_ERROR
Error event type.
Definition: event.h:66
OPJ_UINT32 tw
number of tiles in width
Definition: j2k.h:367
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
OPJ_UINT32 dx
XRsiz: horizontal separation of a sample of ith component with respect to the reference grid.
Definition: openjpeg.h:679
static void opj_pi_update_encode_poc_and_final(opj_cp_t *p_cp, OPJ_UINT32 p_tileno, OPJ_UINT32 p_tx0, OPJ_UINT32 p_tx1, OPJ_UINT32 p_ty0, OPJ_UINT32 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 ci...
Definition: pi.c:1086
OPJ_UINT32 ty0
YTOsiz.
Definition: j2k.h:359
Index structure : information regarding tiles.
Definition: openjpeg.h:811
OPJ_UINT32 numresolutions
number of resolution levels
Definition: pi.h:66
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.
Definition: pi.c:1808
#define OPJ_FALSE
Definition: openjpeg.h:118
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:373
int16_t OPJ_INT16
Definition: openjpeg.h:129
@ OPJ_LRCP
layer-resolution-component-precinct order
Definition: openjpeg.h:305
#define JPIP_FAIX
Definition: indexbox_manager.h:46
static OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t *pi)
Get next packet in resolution-layer-component-precinct order.
Definition: pi.c:297
int * numdecompos
number of decomposition for each component
Definition: openjpeg.h:881
OPJ_UINT32 resS
Definition: openjpeg.h:381
#define opj_write_bytes
Definition: cio.h:64
OPJ_UINT32 layno1
Layer num end,Resolution num end, Component num end, given by POC.
Definition: openjpeg.h:369
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.
Definition: pi.c:2103
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.
Definition: pi.c:1267
OPJ_UINT32 resno1
Definition: openjpeg.h:369
int th
number of tiles in Y
Definition: openjpeg.h:875
int opj_write_phix(int coff, opj_codestream_info_t cstr_info, OPJ_BOOL EPHused, int j2klen, opj_stream_private_t *cio, opj_event_mgr_t *p_manager)
Definition: phix_manager.c:51
Defines image data and characteristics.
Definition: openjpeg.h:709
OPJ_UINT32 resno0
Resolution num start, Component num start, given by POC.
Definition: openjpeg.h:367
Progression order changes.
Definition: openjpeg.h:365
opj_pi_iterator_t * opj_pi_create_decode(opj_image_t *p_image, opj_cp_t *p_cp, OPJ_UINT32 p_tile_no, opj_event_mgr_t *manager)
Create a packet iterator for Decoder.
Definition: pi.c:1393
const char * opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order)
Converts an enum type progression order to string type.
Definition: j2k.c:1651
OPJ_UINT32 layS
Start value, initialised in pi_initialise_encode.
Definition: openjpeg.h:381
OPJ_UINT32 dx
Definition: openjpeg.h:385
opj_poc_t poc
progression order change information
Definition: pi.h:99
union opj_cp::@0 m_specific_param
OPJ_UINT32 layno
layer that identify the packet
Definition: pi.h:95
int pw[33]
precinct number for each resolution level (width)
Definition: openjpeg.h:823