OPJ_UINT32 num_layers_to_decode
Definition: j2k.h:248
OPJ_UINT32 cw
Definition: tcd.h:145
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_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
unsigned char OPJ_BYTE
Definition: openjpeg.h:117
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:791
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:215
void opj_t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:594
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:1437
OPJ_INT32 x0
Definition: tcd.h:159
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:2042
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:817
OPJ_BOOL opj_bio_flush(opj_bio_t *bio)
Flush bits.
Definition: bio.c:195
opj_encoding_param_t m_enc
Definition: j2k.h:397
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:813
OPJ_UINT32 numchunks
Definition: tcd.h:135
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:144
opj_image_t * image
Encoding: pointer to the src image.
Definition: t2.h:57
#define OPJ_J2K_DEFAULT_NB_SEGS
Definition: openjpeg.h:149
opj_tcd_pass_t * passes
Definition: tcd.h:80
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:679
OPJ_UINT32 precincts_data_size
Definition: tcd.h:165
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:179
@ THRESH_CALC
Definition: j2k.h:158
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:375
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:136
OPJ_BITFIELD ppt
If ppt == 1 --> there was a PPT marker for the present tile.
Definition: j2k.h:307
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:979
#define OPJ_PROFILE_CINEMA_4K
Definition: openjpeg.h:199
double disto
packet distorsion
Definition: openjpeg.h:734
OPJ_INT32 y1
Definition: tcd.h:159
@ 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:264
OPJ_INT32 x1
Definition: tcd.h:159
OPJ_BITFIELD ppm
if ppm == 1 --> there was a PPM marker
Definition: j2k.h:448
Message handler object used for.
Definition: event.h:50
OPJ_UINT32 ph
Definition: tcd.h:175
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:317
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:637
opj_tcd_resolution_t * resolutions
Definition: tcd.h:199
void opj_tcd_reinit_segment(opj_tcd_seg_t *seg)
Reinitialize a segment.
Definition: tcd.c:1268
Coding parameters.
Definition: j2k.h:347
OPJ_UINT32 pw
Definition: tcd.h:175
static void opj_t2_putcommacode(opj_bio_t *bio, OPJ_INT32 n)
Definition: t2.c:167
OPJ_UINT32 csty
coding style
Definition: j2k.h:243
OPJ_OFF_T start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:728
#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:580
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:1307
FIXME DOC.
Definition: tcd.h:67
OPJ_UINT32 numpocs
number of progression order changes
Definition: j2k.h:254
OPJ_UINT32 minimum_num_resolutions
Definition: tcd.h:197
OPJ_INT32 x1
Definition: tcd.h:144
int end_header
end position of the header
Definition: openjpeg.h:779
int OPJ_BOOL
Definition: openjpeg.h:110
struct opj_t2 opj_t2_t
Tier-2 coding.
opj_tcd_cblk_enc_t * enc
Definition: tcd.h:147
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:393
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
opj_tgt_tree_t * imsbtree
Definition: tcd.h:153
OPJ_PROG_ORDER prg
Definition: openjpeg.h:333
Precinct structure.
Definition: tcd.h:142
@ OPJ_PROG_UNKNOWN
place-holder
Definition: openjpeg.h:268
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:730
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:144
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:1780
opj_tgt_tree_t * incltree
Definition: tcd.h:152
FIXME DOC.
Definition: tcd.h:57
Tile-component resolution structure.
Definition: tcd.h:171
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:601
opj_tile_index_t * tile_index
Definition: openjpeg.h:1018
Tile-component structure.
Definition: tcd.h:189
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
Sub-band structure.
Definition: tcd.h:157
OPJ_BITFIELD m_tp_on
Enabling Tile part generation.
Definition: j2k.h:331
OPJ_UINT32 numbands
Definition: tcd.h:177
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:1587
int32_t OPJ_INT32
Definition: openjpeg.h:125
OPJ_UINT32 m_current_max_segs
Definition: tcd.h:134
static INLINE OPJ_UINT32 opj_uint_floorlog2(OPJ_UINT32 a)
Get logarithm of an integer and round downwards.
Definition: opj_intmath.h:227
OPJ_BYTE * ppm_data
packet header store there for future use in t2_decode_packet
Definition: j2k.h:373
OPJ_BITFIELD term
Definition: tcd.h:61
OPJ_UINT32 numlenbits
Definition: tcd.h:84
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:309
OPJ_UINT32 numchunksalloc
Definition: tcd.h:136
int packno
packet number
Definition: openjpeg.h:815
opj_tcd_precinct_t * precincts
Definition: tcd.h:163
OPJ_UINT32 numlenbits
Definition: tcd.h:127
#define OPJ_TRUE
Definition: openjpeg.h:111
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:373
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:1021
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_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
Tile coding parameters information.
Definition: openjpeg.h:901
#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_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:657
union opj_tcd_precinct::@3 cblks
Index structure of the codestream (FIXME should be expand and enhance)
Definition: openjpeg.h:997
OPJ_UINT16 rsiz
Size of the image in bits.
Definition: j2k.h:351
static void opj_null_jas_fprintf(FILE *file, const char *format,...)
Definition: t2.c:365
OPJ_INT32 y0
Definition: tcd.h:144
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:726
OPJ_BOOL opj_tcd_is_band_empty(opj_tcd_band_t *band)
Returns whether a sub-band is empty (i.e.
Definition: tcd.c:2697
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:241
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:274
OPJ_UINT32 ppt_len
size of ppt_data
Definition: j2k.h:270
void opj_t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:594
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:2702
OPJ_UINT32 len
Definition: tcd.h:99
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:2107
OPJ_UINT32 cblksty
code-block coding style
Definition: j2k.h:185
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:159
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:166
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:1543
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:228
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:683
OPJ_UINT32 packno
Definition: tcd.h:236
OPJ_UINT32 len
Definition: tcd.h:69
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:857
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:732
OPJ_FLOAT64 disto
Definition: tcd.h:70
@ FINAL_PASS
Function called in Rate allocation process.
Definition: j2k.h:159
Index structure of the codestream.
Definition: openjpeg.h:811
OPJ_BYTE * data
Definition: tcd.h:71
#define EVT_ERROR
Error event type.
Definition: event.h:66
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
OPJ_UINT32 bandno
Definition: tcd.h:161
OPJ_UINT32 real_num_segs
Definition: tcd.h:133
Index structure : information regarding tiles.
Definition: openjpeg.h:771
opj_tcd_seg_data_chunk_t * chunks
Definition: tcd.h:122
OPJ_BYTE * data
Definition: tcd.h:98
#define JAS_FPRINTF
Definition: t2.c:370
OPJ_UINT32 numpasses
Definition: tcd.h:108
opj_tcd_seg_t * segs
Definition: tcd.h:121
#define OPJ_FALSE
Definition: openjpeg.h:112
OPJ_PROG_ORDER prg1
Progression order enum.
Definition: openjpeg.h:333
OPJ_UINT32 numnewpasses
Definition: tcd.h:129
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:373
#define J2K_CCP_CBLKSTY_TERMALL
Termination on each coding pass.
Definition: j2k.h:60
OPJ_UINT32 numbps
Definition: tcd.h:125
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:148
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
Defines image data and characteristics.
Definition: openjpeg.h:669
opj_tcd_tilecomp_t * comps
Definition: tcd.h:232
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:1387
opj_t2_t * opj_t2_create(opj_image_t *p_image, opj_cp_t *p_cp)
Creates a Tier 2 handle.
Definition: t2.c:580
opj_poc_t poc
progression order change information
Definition: pi.h:99
OPJ_UINT32 numsegs
Definition: tcd.h:131
OPJ_UINT32 ch
Definition: tcd.h:145
Tile coder/decoder.
Definition: tcd.h:251
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:643
OPJ_UINT32 layno
layer that identify the packet
Definition: pi.h:95
OPJ_UINT32 newlen
Definition: tcd.h:116