OPJ_UINT32 num_layers_to_decode
Definition: j2k.h:252
OPJ_UINT32 cw
Definition: tcd.h:150
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
ptrdiff_t opj_bio_numbytes(opj_bio_t *bio)
Number of bytes written.
Definition: bio.c:142
Packet iterator.
Definition: pi.h:73
void * opj_calloc(size_t num, size_t size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.c:198
void opj_bio_init_enc(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len)
Init encoder.
Definition: bio.c:147
FIXME DOC.
Definition: tcd.h:77
static INLINE OPJ_INT32 opj_int_floorlog2(OPJ_INT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:225
void opj_t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:613
static OPJ_BOOL opj_t2_skip_packet_data(opj_t2_t *p_t2, opj_tcd_tile_t *p_tile, opj_pi_iterator_t *p_pi, OPJ_UINT32 *p_data_read, OPJ_UINT32 p_max_length, opj_packet_info_t *pack_info, opj_event_mgr_t *p_manager)
Definition: t2.c:1525
OPJ_INT32 x0
Definition: tcd.h:164
OPJ_UINT32 compno
component that identify the packet
Definition: pi.h:89
Segment of a code-block.
Definition: tcd.h:105
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 INLINE OPJ_INT32 opj_int_min(OPJ_INT32 a, OPJ_INT32 b)
Get the minimum of two integers.
Definition: opj_intmath.h:56
OPJ_UINT32 maxpasses
Definition: tcd.h:112
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:857
OPJ_BOOL opj_bio_flush(opj_bio_t *bio)
Flush bits.
Definition: bio.c:195
opj_encoding_param_t m_enc
Definition: j2k.h:401
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:853
OPJ_UINT32 numchunks
Definition: tcd.h:140
static OPJ_UINT32 opj_t2_getcommacode(opj_bio_t *bio)
Definition: t2.c:175
OPJ_UINT32 real_num_passes
Definition: tcd.h:110
OPJ_INT32 y1
Definition: tcd.h:149
opj_image_t * image
Encoding: pointer to the src image.
Definition: t2.h:57
#define OPJ_J2K_DEFAULT_NB_SEGS
Definition: openjpeg.h:155
opj_tcd_pass_t * passes
Definition: tcd.h:80
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:719
OPJ_UINT32 precincts_data_size
Definition: tcd.h:170
opj_tcd_layer_t * layers
Definition: tcd.h:79
OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n)
Read bits.
Definition: bio.c:175
Tier-2 coding.
Definition: t2.h:54
opj_tcd_band_t bands[3]
Definition: tcd.h:184
@ THRESH_CALC
Definition: j2k.h:162
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_UINT32 ppm_len
size of the ppm_data
Definition: j2k.h:379
opj_bio_t * opj_bio_create(void)
Create a new BIO handle.
Definition: bio.c:129
#define J2K_CCP_CBLKSTY_LAZY
Selective arithmetic coding bypass.
Definition: j2k.h:58
static OPJ_UINT32 opj_t2_getnumpasses(opj_bio_t *bio)
Definition: t2.c:199
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:142
OPJ_BITFIELD ppt
If ppt == 1 --> there was a PPT marker for the present tile.
Definition: j2k.h:311
static OPJ_BOOL opj_t2_skip_packet(opj_t2_t *p_t2, opj_tcd_tile_t *p_tile, opj_tcp_t *p_tcp, opj_pi_iterator_t *p_pi, OPJ_BYTE *p_src, OPJ_UINT32 *p_data_read, OPJ_UINT32 p_max_length, opj_packet_info_t *p_pack_info, opj_event_mgr_t *p_manager)
Definition: t2.c:1006
#define OPJ_PROFILE_CINEMA_4K
Definition: openjpeg.h:205
double disto
packet distorsion
Definition: openjpeg.h:774
OPJ_UINT32 Mb
Definition: tcd.h:128
OPJ_INT32 y1
Definition: tcd.h:164
@ tcp
Definition: query_parser.h:41
void opj_bio_destroy(opj_bio_t *bio)
Destroy a previously created BIO handle.
Definition: bio.c:135
OPJ_BYTE * ppt_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:268
OPJ_INT32 x1
Definition: tcd.h:164
OPJ_BITFIELD ppm
if ppm == 1 --> there was a PPM marker
Definition: j2k.h:454
Message handler object used for.
Definition: event.h:50
OPJ_UINT32 ph
Definition: tcd.h:180
void opj_bio_init_dec(opj_bio_t *bio, OPJ_BYTE *bp, OPJ_UINT32 len)
Init decoder.
Definition: bio.c:156
OPJ_UINT32 len
Definition: tcd.h:60
OPJ_UINT32 m_max_comp_size
Maximum rate for each component.
Definition: j2k.h:321
void opj_bio_write(opj_bio_t *bio, OPJ_UINT32 v, OPJ_UINT32 n)
Write bits.
Definition: bio.c:165
Defines a single image component.
Definition: openjpeg.h:677
opj_tcd_resolution_t * resolutions
Definition: tcd.h:204
OPJ_BOOL opj_t2_encode_packets(opj_t2_t *p_t2, OPJ_UINT32 p_tile_no, opj_tcd_tile_t *p_tile, OPJ_UINT32 p_maxlayers, OPJ_BYTE *p_dest, OPJ_UINT32 *p_data_written, OPJ_UINT32 p_max_len, opj_codestream_info_t *cstr_info, opj_tcd_marker_info_t *p_marker_info, OPJ_UINT32 p_tp_num, OPJ_INT32 p_tp_pos, OPJ_UINT32 p_pino, J2K_T2_MODE p_t2_mode, opj_event_mgr_t *p_manager)
Encode the packets of a tile to a destination buffer.
Definition: t2.c:219
void opj_tcd_reinit_segment(opj_tcd_seg_t *seg)
Reinitialize a segment.
Definition: tcd.c:1280
Coding parameters.
Definition: j2k.h:351
OPJ_UINT32 pw
Definition: tcd.h:180
static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n)
Definition: t2.c:167
OPJ_UINT32 csty
coding style
Definition: j2k.h:247
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:768
#define EVT_WARNING
Warning event type.
Definition: event.h:67
opj_t2_t * opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp)
Creates a Tier 2 handle.
Definition: t2.c:599
void opj_tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold)
Encode the value of a leaf of the tag-tree up to a given threshold.
Definition: tgt.c:264
static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t *p_t2, opj_tcd_tile_t *p_tile, opj_pi_iterator_t *p_pi, OPJ_BYTE *p_src_data, OPJ_UINT32 *p_data_read, OPJ_UINT32 p_max_length, opj_packet_info_t *pack_info, opj_event_mgr_t *p_manager)
Definition: t2.c:1364
FIXME DOC.
Definition: tcd.h:67
OPJ_UINT32 numpocs
number of progression order changes
Definition: j2k.h:258
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:202
OPJ_INT32 x1
Definition: tcd.h:149
int end_header
end position of the header
Definition: openjpeg.h:819
int OPJ_BOOL
Definition: openjpeg.h:116
struct opj_t2 opj_t2_t
Tier-2 coding.
opj_tcd_cblk_enc_t * enc
Definition: tcd.h:152
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:397
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
opj_tgt_tree_t * imsbtree
Definition: tcd.h:158
OPJ_PROG_ORDER prg
Definition: openjpeg.h:373
Precinct structure.
Definition: tcd.h:147
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:304
OPJ_UINT32 precno
precinct that identify the packet
Definition: pi.h:93
Individual bit input-output stream (BIO)
Definition: bio.h:56
OPJ_OFF_T end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:770
void opj_tgt_reset(opj_tgt_tree_t *p_tree)
Reset a tag-tree (set all leaves to 0)
Definition: tgt.c:236
OPJ_INT32 x0
Definition: tcd.h:149
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
opj_tgt_tree_t * incltree
Definition: tcd.h:157
FIXME DOC.
Definition: tcd.h:57
Tile-component resolution structure.
Definition: tcd.h:176
static OPJ_BOOL opj_t2_decode_packet(opj_t2_t *t2, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, OPJ_BYTE *src, OPJ_UINT32 *data_read, OPJ_UINT32 max_length, opj_packet_info_t *pack_info, opj_event_mgr_t *p_manager)
Decode a packet of a tile from a source buffer.
Definition: t2.c:620
opj_tile_index_t * tile_index
Definition: openjpeg.h:1058
Tile-component structure.
Definition: tcd.h:194
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
Sub-band structure.
Definition: tcd.h:162
OPJ_BITFIELD m_tp_on
Enabling Tile part generation.
Definition: j2k.h:335
OPJ_UINT32 numbands
Definition: tcd.h:182
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 m_current_max_segs
Definition: tcd.h:139
static INLINE OPJ_UINT32 opj_uint_floorlog2(OPJ_UINT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:237
OPJ_BYTE * ppm_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:377
OPJ_BITFIELD term
Definition: tcd.h:61
OPJ_UINT32 packet_count
OUT: Number of elements in p_packet_size[] array.
Definition: tcd.h:301
OPJ_UINT32 numlenbits
Definition: tcd.h:84
#define J2K_CCP_CBLKSTY_HT
(high throughput) HT codeblocks
Definition: j2k.h:64
void * opj_realloc(void *ptr, size_t new_size)
Reallocate memory blocks.
Definition: opj_malloc.c:239
OPJ_BITFIELD POC
indicates if a POC marker has been used O:NO, 1:YES
Definition: j2k.h:313
OPJ_UINT32 numchunksalloc
Definition: tcd.h:141
int packno
packet number
Definition: openjpeg.h:855
opj_tcd_precinct_t * precincts
Definition: tcd.h:168
OPJ_UINT32 numlenbits
Definition: tcd.h:132
#define OPJ_TRUE
Definition: openjpeg.h:117
OPJ_BOOL opj_t2_decode_packets(opj_tcd_t *tcd, opj_t2_t *p_t2, OPJ_UINT32 p_tile_no, opj_tcd_tile_t *p_tile, OPJ_BYTE *p_src, OPJ_UINT32 *p_data_read, OPJ_UINT32 p_max_len, opj_codestream_index_t *p_cstr_index, opj_event_mgr_t *p_manager)
Decode the packets of a tile from a source buffer.
Definition: t2.c:393
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 numnewpasses
Definition: tcd.h:114
static OPJ_BOOL opj_t2_read_packet_header(opj_t2_t *p_t2, opj_tcd_tile_t *p_tile, opj_tcp_t *p_tcp, opj_pi_iterator_t *p_pi, OPJ_BOOL *p_is_data_present, OPJ_BYTE *p_src_data, OPJ_UINT32 *p_data_read, OPJ_UINT32 p_max_length, opj_packet_info_t *p_pack_info, opj_event_mgr_t *p_manager)
Definition: t2.c:1048
Tile coding parameters information.
Definition: openjpeg.h:941
#define J2K_CP_CSTY_SOP
Definition: j2k.h:55
void opj_free(void *ptr)
Deallocates or frees a memory block.
Definition: opj_malloc.c:246
#define J2K_CP_CSTY_EPH
Definition: j2k.h:56
OPJ_BOOL opj_t2_encode_packets(opj_t2_t *t2, OPJ_UINT32 tileno, opj_tcd_tile_t *tile, OPJ_UINT32 maxlayers, OPJ_BYTE *dest, OPJ_UINT32 *p_data_written, OPJ_UINT32 len, opj_codestream_info_t *cstr_info, opj_tcd_marker_info_t *p_marker_info, OPJ_UINT32 tpnum, OPJ_INT32 tppos, OPJ_UINT32 pino, J2K_T2_MODE t2_mode, opj_event_mgr_t *p_manager)
Encode the packets of a tile to a destination buffer.
Definition: t2.c:219
OPJ_UINT32 numbps
Definition: tcd.h:83
Chunk of codestream data that is part of a code block.
Definition: tcd.h:94
OPJ_UINT32 resno_decoded
number of decoded resolution
Definition: openjpeg.h:697
union opj_tcd_precinct::@3 cblks
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:1037
OPJ_UINT16 rsiz
Size of the image in bits.
Definition: j2k.h:355
static void opj_null_jas_fprintf(FILE *file, const char *format,...)
Definition: t2.c:385
OPJ_INT32 y0
Definition: tcd.h:149
OPJ_BOOL need_PLT
In: Whether information to generate PLT markers in needed.
Definition: tcd.h:298
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:766
OPJ_BOOL opj_tcd_is_band_empty(opj_tcd_band_t *band)
Returns whether a sub-band is empty (i.e.
Definition: tcd.c:2707
OPJ_UINT32 numpasses
Definition: tcd.h:87
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
OPJ_UINT32 ppt_len
size of ppt_data
Definition: j2k.h:274
void opj_t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:613
OPJ_BOOL opj_tcd_is_subband_area_of_interest(opj_tcd_t *tcd, OPJ_UINT32 compno, OPJ_UINT32 resno, OPJ_UINT32 bandno, OPJ_UINT32 band_x0, OPJ_UINT32 band_y0, OPJ_UINT32 band_x1, OPJ_UINT32 band_y1)
Returns whether a sub-band region contributes to the area of interest tcd->win_x0,...
Definition: tcd.c:2712
OPJ_UINT32 len
Definition: tcd.h:99
OPJ_UINT32 * p_packet_size
OUT: Array of size packet_count, such that p_packet_size[i] is the size in bytes of the ith packet.
Definition: tcd.h:305
OPJ_UINT32 numpasses
Definition: tcd.h:68
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 cblksty
code-block coding style
Definition: j2k.h:189
OPJ_UINT32 resno
resolution that identify the packet
Definition: pi.h:91
static INLINE OPJ_INT32 opj_int_max(OPJ_INT32 a, OPJ_INT32 b)
Get the maximum of two integers.
Definition: opj_intmath.h:74
OPJ_INT32 y0
Definition: tcd.h:164
OPJ_UINT32 opj_tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 threshold)
Decode the value of a leaf of the tag-tree up to a given threshold.
Definition: tgt.c:307
Code-block for decoding.
Definition: tcd.h:120
OPJ_INT32 numbps
Definition: tcd.h:171
static OPJ_BOOL opj_t2_init_seg(opj_tcd_cblk_dec_t *cblk, OPJ_UINT32 index, OPJ_UINT32 cblksty, OPJ_UINT32 first)
Definition: t2.c:1638
void opj_tgt_setvalue(opj_tgt_tree_t *tree, OPJ_UINT32 leafno, OPJ_INT32 value)
Set the value of a leaf of a tag-tree.
Definition: tgt.c:254
FIXME DOC.
Definition: tcd.h:233
OPJ_BOOL opj_bio_inalign(opj_bio_t *bio)
Passes the ending bits (coming from flushing)
Definition: bio.c:208
opj_image_comp_t * comps
image components
Definition: openjpeg.h:723
OPJ_UINT32 packno
Definition: tcd.h:241
OPJ_UINT32 len
Definition: tcd.h:69
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:897
opj_cp_t * cp
pointer to the image coding parameters
Definition: t2.h:59
OPJ_UINT32 len
Definition: tcd.h:106
OPJ_OFF_T end_pos
packet end position
Definition: openjpeg.h:772
OPJ_FLOAT64 disto
Definition: tcd.h:70
@ FINAL_PASS
Function called in Rate allocation process.
Definition: j2k.h:163
Index structure of the codestream.
Definition: openjpeg.h:851
OPJ_BYTE * data
Definition: tcd.h:71
OPJ_BOOL strict
OPJ_TRUE if entire bit stream must be decoded, OPJ_FALSE if partial bitstream decoding allowed.
Definition: j2k.h:406
#define EVT_ERROR
Error event type.
Definition: event.h:66
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
OPJ_UINT32 bandno
Definition: tcd.h:166
OPJ_UINT32 real_num_segs
Definition: tcd.h:138
Index structure : information regarding tiles.
Definition: openjpeg.h:811
opj_tcd_seg_data_chunk_t * chunks
Definition: tcd.h:122
OPJ_BYTE * data
Definition: tcd.h:98
#define JAS_FPRINTF
Definition: t2.c:390
OPJ_UINT32 numpasses
Definition: tcd.h:108
opj_tcd_seg_t * segs
Definition: tcd.h:121
#define OPJ_FALSE
Definition: openjpeg.h:118
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:373
OPJ_UINT32 numnewpasses
Definition: tcd.h:134
OPJ_BOOL opj_t2_decode_packets(opj_tcd_t *tcd, opj_t2_t *t2, OPJ_UINT32 tileno, opj_tcd_tile_t *tile, OPJ_BYTE *src, OPJ_UINT32 *p_data_read, OPJ_UINT32 len, opj_codestream_index_t *cstr_info, opj_event_mgr_t *p_manager)
Decode the packets of a tile from a source buffer.
Definition: t2.c:393
#define J2K_CCP_CBLKSTY_TERMALL
Termination on each coding pass.
Definition: j2k.h:60
OPJ_UINT32 numbps
Definition: tcd.h:130
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:153
static void opj_t2_putnumpasses(opj_bio_t *bio, OPJ_UINT32 n)
Variable length code for signalling delta Zil (truncation point)
Definition: t2.c:184
Structure to hold information needed to generate some markers.
Definition: tcd.h:296
Defines image data and characteristics.
Definition: openjpeg.h:709
opj_tcd_tilecomp_t * comps
Definition: tcd.h:237
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
opj_t2_t * opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp)
Creates a Tier 2 handle.
Definition: t2.c:599
opj_poc_t poc
progression order change information
Definition: pi.h:99
OPJ_UINT32 numsegs
Definition: tcd.h:136
OPJ_UINT32 ch
Definition: tcd.h:150
Tile coder/decoder.
Definition: tcd.h:256
union opj_cp::@0 m_specific_param
static OPJ_BOOL opj_t2_encode_packet(OPJ_UINT32 tileno, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, OPJ_BYTE *dest, OPJ_UINT32 *p_data_written, OPJ_UINT32 len, opj_codestream_info_t *cstr_info, J2K_T2_MODE p_t2_mode, opj_event_mgr_t *p_manager)
Encode a packet of a tile to a destination buffer.
Definition: t2.c:662
OPJ_UINT32 layno
layer that identify the packet
Definition: pi.h:95
OPJ_UINT32 newlen
Definition: tcd.h:116