Go to the documentation of this file.
74 int t2_encode_packets(
opj_t2_t* t2,
int tileno,
opj_tcd_tile_t *tile,
int maxlayers,
unsigned char *dest,
int len,
opj_codestream_info_t *cstr_info,
int tpnum,
int tppos,
int pino,
J2K_T2_MODE t2_mode,
int cur_totnum_tp);
opj_packet_info_t * packet
information concerning packets inside tile
Definition: openjpeg.h:652
int t2_encode_packets(opj_t2_t *t2, int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tpnum, int tppos, int pino, J2K_T2_MODE t2_mode, int cur_totnum_tp)
Encode the packets of a tile to a destination buffer.
Definition: t2.c:625
Packet iterator.
Definition: pi.h:67
int numnewpasses
Definition: tcd.h:98
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
FIXME: documentation.
Definition: tcd.h:79
#define opj_malloc(size)
Allocate an uninitialized memory block.
Definition: opj_malloc.h:51
unsigned char * data
Definition: tcd.h:73
static INLINE int int_max(int a, int b)
Get the maximum of two integers.
Definition: int.h:57
int bio_inalign(opj_bio_t *bio)
Passes the ending bits (coming from flushing)
Definition: bio.c:178
FIXME: documentation.
Definition: tcd.h:47
struct opj_tcd_seg opj_tcd_seg_t
FIXME: documentation.
int len
Definition: tcd.h:63
opj_bool pi_next(opj_pi_iterator_t *pi)
Modify the packet iterator to point to the next packet.
Definition: pi.c:743
int index_write
writing the packet in the index with t2_encode_packets
Definition: openjpeg.h:678
int csty
coding style
Definition: j2k.h:170
double D_max
maximum distortion reduction on the whole image (add for Marcela)
Definition: openjpeg.h:674
int len
Definition: tcd.h:51
int numbps
Definition: tcd.h:95
opj_image_t * image
Encoding: pointer to the src image.
Definition: t2.h:50
int tp_end_header
end position of tile part header
Definition: openjpeg.h:620
opj_tcd_pass_t * passes
Definition: tcd.h:82
int max_comp_size
Maximum rate for each component.
Definition: j2k.h:208
static int t2_getnumpasses(opj_bio_t *bio)
Definition: t2.c:119
opj_tcd_layer_t * layers
Definition: tcd.h:81
int numbands
Definition: tcd.h:133
Tier-2 coding.
Definition: t2.h:45
int numlenbits
Definition: tcd.h:96
opj_tcd_band_t bands[3]
Definition: tcd.h:134
@ THRESH_CALC
Definition: j2k.h:117
#define J2K_CCP_CBLKSTY_LAZY
Selective arithmetic coding bypass.
Definition: j2k.h:48
static opj_bool t2_init_seg(opj_tcd_cblk_dec_t *cblk, int index, int cblksty, int first)
Definition: t2.c:299
void tgt_reset(opj_tgt_tree_t *tree)
Reset a tag-tree (set all leaves to 0)
Definition: tgt.c:116
static void t2_putcommacode(opj_bio_t *bio, int n)
Definition: t2.c:90
int end_pos
packet end position
Definition: openjpeg.h:593
int ppt_len
ppmbug1
Definition: j2k.h:194
double disto
packet distorsion
Definition: openjpeg.h:595
unsigned char * ppt_data
packet header store there for futur use in t2_decode_packet
Definition: j2k.h:186
int packno
packet number
Definition: tcd.h:159
double disto
Definition: tcd.h:72
int maxpasses
Definition: tcd.h:52
int start_pos
packet start position (including SOP marker if it exists)
Definition: openjpeg.h:589
int precno
precinct that identify the packet
Definition: pi.h:85
int numpasses
Definition: tcd.h:50
opj_tcd_resolution_t * resolutions
Definition: tcd.h:143
opj_pi_iterator_t * pi_create_decode(opj_image_t *image, opj_cp_t *cp, int tileno)
Create a packet iterator for Decoder.
Definition: pi.c:443
int y0
Definition: tcd.h:120
int end_ph_pos
end of packet header position (including EPH marker if it exists)
Definition: openjpeg.h:591
Coding parameters.
Definition: j2k.h:204
void t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:818
int ppt
If ppt == 1 --> there was a PPT marker for the present tile.
Definition: j2k.h:190
int numnewpasses
Definition: tcd.h:53
void bio_destroy(opj_bio_t *bio)
Destroy a previously created BIO handle.
Definition: bio.c:122
#define EVT_WARNING
Warning event type.
Definition: event.h:36
int layno
layer that identify the packet
Definition: pi.h:87
#define opj_realloc(m, s)
Reallocate memory blocks.
Definition: opj_malloc.h:142
static int t2_getcommacode(opj_bio_t *bio)
Definition: t2.c:97
opj_common_ptr cinfo
codec context
Definition: t2.h:47
FIXME: documentation.
Definition: tcd.h:69
int ppm
if ppm == 1 --> there was a PPM marker for the present tile
Definition: j2k.h:254
int end_header
end position of the header
Definition: openjpeg.h:640
struct opj_t2 opj_t2_t
Tier-2 coding.
opj_tcd_cblk_enc_t * enc
Definition: tcd.h:109
int cw
Definition: tcd.h:107
opj_tcp_t * tcps
tile coding parameters
Definition: j2k.h:262
opj_tgt_tree_t * imsbtree
Definition: tcd.h:113
FIXME: documentation.
Definition: tcd.h:105
opj_bio_t * bio_create(void)
Create a new BIO handle.
Definition: bio.c:117
void pi_destroy(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno)
Destroy a packet iterator.
Definition: pi.c:721
Individual bit input-output stream (BIO)
Definition: bio.h:47
int t2_encode_packets(opj_t2_t *t2, int tileno, opj_tcd_tile_t *tile, int maxlayers, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tpnum, int tppos, int pino, J2K_T2_MODE t2_mode, int cur_totnum_tp)
Encode the packets of a tile to a destination buffer.
Definition: t2.c:625
opj_t2_t * t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp)
Create a T2 handle.
Definition: t2.c:807
opj_tgt_tree_t * incltree
Definition: tcd.h:112
FIXME: documentation.
Definition: tcd.h:60
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info)
Decode the packets of a tile from a source buffer.
Definition: t2.c:716
FIXME: documentation.
Definition: tcd.h:130
FIXME: documentation.
Definition: tcd.h:140
enum T2_MODE J2K_T2_MODE
T2 encoding mode.
int numsegs
Definition: tcd.h:99
opj_bool pi_create_encode(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno, int pino, int tpnum, int tppos, J2K_T2_MODE t2_mode, int cur_totnum_tp)
Modify the packet iterator for enabling tile part generation.
Definition: pi.c:762
FIXME: documentation.
Definition: tcd.h:119
int numpasses
Definition: tcd.h:86
int newlen
Definition: tcd.h:54
void bio_write(opj_bio_t *bio, int v, int n)
Write bits.
Definition: bio.c:148
union opj_tcd_precinct::@0 cblks
static INLINE int int_floorlog2(int a)
Get logarithm of an integer and round downwards.
Definition: int.h:107
static INLINE int int_min(int a, int b)
Get the minimum of two integers.
Definition: int.h:50
void bio_init_enc(opj_bio_t *bio, unsigned char *bp, int len)
Init encoder.
Definition: bio.c:132
void tgt_setvalue(opj_tgt_tree_t *tree, int leafno, int value)
Set the value of a leaf of a tag-tree.
Definition: tgt.c:129
void t2_destroy(opj_t2_t *t2)
Destroy a T2 handle.
Definition: t2.c:818
int packno
packet number
Definition: openjpeg.h:676
opj_tcd_precinct_t * precincts
Definition: tcd.h:122
#define OPJ_TRUE
Definition: openjpeg.h:64
int len
Definition: tcd.h:97
int numlenbits
Definition: tcd.h:85
int bio_numbytes(opj_bio_t *bio)
Number of bytes written.
Definition: bio.c:128
int numpocs
number of progression order changes
Definition: j2k.h:180
unsigned char * data
Definition: tcd.h:92
#define J2K_CP_CSTY_SOP
Definition: j2k.h:45
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:76
Definition: openjpeg.h:430
#define J2K_CP_CSTY_EPH
Definition: j2k.h:46
int numbps
Definition: tcd.h:84
Index structure : Information concerning a packet inside tile.
Definition: openjpeg.h:587
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: j2k.h:166
opj_tccp_t * tccps
tile-component coding parameters
Definition: j2k.h:198
char tp_on
Enabling Tile part generation.
Definition: j2k.h:214
int y1
Definition: tcd.h:120
void bio_init_dec(opj_bio_t *bio, unsigned char *bp, int len)
Init decoder.
Definition: bio.c:140
#define JPWL_ASSUME
Assume a basic codestream structure, so you can resort better from uncorrected errors.
Definition: jpwl.h:52
@ CINEMA4K_24
2K Digital Cinema at 48 fps
Definition: openjpeg.h:112
unsigned char * ppm_data
packet header store there for futur use in t2_decode_packet
Definition: j2k.h:250
int x0
Definition: tcd.h:120
int opj_bool
Definition: openjpeg.h:63
unsigned char ** data
Definition: tcd.h:48
int resno_decoded
number of decoded resolution
Definition: openjpeg.h:523
int resno
resolution that identify the packet
Definition: pi.h:83
FIXME: documentation.
Definition: tcd.h:151
opj_image_comp_t * comps
image components
Definition: openjpeg.h:547
int dataindex
Definition: tcd.h:49
opj_tile_info_t * tile
information regarding tiles inside image
Definition: openjpeg.h:718
opj_cp_t * cp
pointer to the image coding parameters
Definition: t2.h:52
int cblksty
code-block coding style
Definition: j2k.h:144
OPJ_CINEMA_MODE cinema
Digital cinema profile.
Definition: j2k.h:206
int bio_read(opj_bio_t *bio, int n)
Read bits.
Definition: bio.c:155
Index structure of the codestream.
Definition: openjpeg.h:672
int numpasses
Definition: tcd.h:70
#define EVT_ERROR
Error event type.
Definition: event.h:35
static int t2_decode_packet(opj_t2_t *t2, unsigned char *src, int len, opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, opj_packet_info_t *pack_info)
Decode a packet of a tile from a source buffer.
Definition: t2.c:331
int term
Definition: tcd.h:63
opj_tp_info_t * tp
information concerning tile parts
Definition: openjpeg.h:666
Index structure : information regarding tiles.
Definition: openjpeg.h:632
opj_t2_t * t2_create(opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp)
Create a T2 handle.
Definition: t2.c:807
opj_tcd_seg_t * segs
Definition: tcd.h:93
#define OPJ_FALSE
Definition: openjpeg.h:65
int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj_tcd_tile_t *tile, opj_codestream_info_t *cstr_info)
Decode the packets of a tile from a source buffer.
Definition: t2.c:716
static void t2_putnumpasses(opj_bio_t *bio, int n)
Variable length code for signalling delta Zil (truncation point)
Definition: t2.c:105
int numbps
Definition: tcd.h:123
opj_pi_iterator_t * pi_initialise_encode(opj_image_t *image, opj_cp_t *cp, int tileno, J2K_T2_MODE t2_mode)
Create a packet iterator for Encoder.
Definition: pi.c:576
int POC
indicates if a POC marker has been used O:NO, 1:YES
Definition: j2k.h:182
#define J2K_CCP_CBLKSTY_TERMALL
Termination on each coding pass.
Definition: j2k.h:50
int compno
component that identify the packet
Definition: pi.h:81
int tgt_decode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold)
Decode the value of a leaf of the tag-tree up to a given threshold.
Definition: tgt.c:178
int x1
Definition: tcd.h:120
opj_tcd_cblk_dec_t * dec
Definition: tcd.h:110
void tgt_encode(opj_bio_t *bio, opj_tgt_tree_t *tree, int leafno, int threshold)
Encode the value of a leaf of the tag-tree up to a given threshold.
Definition: tgt.c:138
int ppm_len
ppmbug1
Definition: j2k.h:260
static int t2_encode_packet(opj_tcd_tile_t *tile, opj_tcp_t *tcp, opj_pi_iterator_t *pi, unsigned char *dest, int len, opj_codestream_info_t *cstr_info, int tileno)
Encode a packet of a tile to a destination buffer.
Definition: t2.c:132
int tp_end_pos
end position of tile part
Definition: openjpeg.h:622
Defines image data and characteristics.
Definition: openjpeg.h:533
int ch
Definition: tcd.h:107
opj_tcd_tilecomp_t * comps
Definition: tcd.h:154
int layer
if != 0, then only the first "layer" layers are decoded; if == 0 or not used, all the quality layers ...
Definition: j2k.h:228
int len
Definition: tcd.h:71
int tp_numpacks
number of packets of tile part
Definition: openjpeg.h:626
int bio_flush(opj_bio_t *bio)
Flush bits.
Definition: bio.c:164
int numcomps
number of components in the image
Definition: openjpeg.h:543
int tp_start_pack
start packet of tile part
Definition: openjpeg.h:624