OpenJPEG
1.5.1
|
Data Structures | |
struct | opj_t2 |
Tier-2 coding. More... | |
Typedefs | |
typedef struct opj_t2 | opj_t2_t |
Tier-2 coding. More... | |
Local static functions | |
static void | t2_putcommacode (opj_bio_t *bio, int n) |
static int | t2_getcommacode (opj_bio_t *bio) |
static void | t2_putnumpasses (opj_bio_t *bio, int n) |
Variable length code for signalling delta Zil (truncation point) More... | |
static int | t2_getnumpasses (opj_bio_t *bio) |
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. More... | |
static opj_bool | t2_init_seg (opj_tcd_cblk_dec_t *cblk, int index, int cblksty, int first) |
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. More... | |
Exported functions | |
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. More... | |
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. More... | |
opj_t2_t * | t2_create (opj_common_ptr cinfo, opj_image_t *image, opj_cp_t *cp) |
Create a T2 handle. More... | |
void | t2_destroy (opj_t2_t *t2) |
Destroy a T2 handle. More... | |
opj_t2_t* t2_create | ( | opj_common_ptr | cinfo, |
opj_image_t * | image, | ||
opj_cp_t * | cp | ||
) |
Create a T2 handle.
cinfo | Codec context info |
image | Source or destination image |
cp | Image coding parameters |
References opj_t2::cinfo, opj_t2::cp, opj_t2::image, and opj_malloc.
Referenced by tcd_decode_tile(), tcd_encode_tile(), and tcd_rateallocate().
|
static |
Decode a packet of a tile from a source buffer.
t2 | T2 handle |
src | Source buffer |
len | Length of the source buffer |
tile | Tile for which to write the packets |
tcp | Tile coding parameters |
pi | Packet identity |
pack_info | Packet information |
TODO : check the Nsop value
References opj_tcd_resolution::bands, bio_create(), bio_destroy(), bio_inalign(), bio_init_dec(), bio_numbytes(), bio_read(), opj_tcd_precinct::cblks, opj_tccp::cblksty, opj_tcd_precinct::ch, opj_t2::cinfo, opj_pi_iterator::compno, opj_tcd_tile::comps, opj_t2::cp, opj_tcp::csty, opj_tcd_precinct::cw, opj_tcd_seg::data, opj_tcd_cblk_dec::data, opj_tcd_seg::dataindex, opj_tcd_precinct::dec, opj_packet_info::end_ph_pos, EVT_ERROR, EVT_WARNING, opj_tcd_precinct::imsbtree, opj_tcd_precinct::incltree, int_floorlog2(), int_min(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_SOP, JPWL_ASSUME, opj_pi_iterator::layno, opj_tcd_seg::len, opj_tcd_cblk_dec::len, opj_tcd_seg::maxpasses, opj_tcd_seg::newlen, opj_tcd_resolution::numbands, opj_tcd_cblk_dec::numbps, opj_tcd_band::numbps, opj_tcd_cblk_dec::numlenbits, opj_tcd_seg::numnewpasses, opj_tcd_cblk_dec::numnewpasses, opj_tcd_seg::numpasses, opj_tcd_cblk_dec::numsegs, opj_event_msg(), opj_realloc, opj_cp::ppm, opj_cp::ppm_data, opj_cp::ppm_len, opj_tcp::ppt, opj_tcp::ppt_data, opj_tcp::ppt_len, opj_tcd_band::precincts, opj_pi_iterator::precno, opj_pi_iterator::resno, opj_tcd_tilecomp::resolutions, opj_tcd_cblk_dec::segs, t2_getcommacode(), t2_getnumpasses(), t2_init_seg(), opj_tcp::tccps, tgt_decode(), tgt_reset(), opj_tcd_band::x0, opj_tcd_band::x1, opj_tcd_band::y0, and opj_tcd_band::y1.
Referenced by t2_decode_packets().
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.
t2 | T2 handle |
src | the source buffer |
len | length of the source buffer |
tileno | number that identifies the tile for which to decode the packets |
tile | tile for which to decode the packets |
cstr_info | Codestream information structure |
References opj_pi_iterator::compno, opj_image::comps, opj_t2::cp, opj_tile_info::end_header, opj_packet_info::end_ph_pos, opj_packet_info::end_pos, opj_t2::image, int_max(), opj_cp::layer, opj_pi_iterator::layno, opj_tcp::numpocs, opj_tile_info::packet, opj_codestream_info::packno, pi_create_decode(), pi_destroy(), pi_next(), opj_image_comp::resno_decoded, opj_packet_info::start_pos, t2_decode_packet(), opj_cp::tcps, opj_codestream_info::tile, opj_tile_info::tp, opj_tp_info::tp_end_header, opj_tp_info::tp_end_pos, opj_tp_info::tp_numpacks, opj_cp::tp_on, and opj_tp_info::tp_start_pack.
Referenced by tcd_decode_tile().
void t2_destroy | ( | opj_t2_t * | t2 | ) |
Destroy a T2 handle.
t2 | T2 handle to destroy |
References opj_free.
Referenced by tcd_decode_tile(), tcd_encode_tile(), and tcd_rateallocate().
|
static |
Encode a packet of a tile to a destination buffer.
tile | Tile for which to write the packets |
tcp | Tile coding parameters |
pi | Packet identity |
dest | Destination buffer |
len | Length of the destination buffer |
cstr_info | Codestream information structure |
tileno | Number of the tile encoded |
References opj_tcd_resolution::bands, bio_create(), bio_destroy(), bio_flush(), bio_init_enc(), bio_numbytes(), bio_write(), opj_tcd_precinct::cblks, opj_tcd_precinct::ch, opj_pi_iterator::compno, opj_tcd_tile::comps, opj_tcp::csty, opj_tcd_precinct::cw, opj_codestream_info::D_max, opj_tcd_layer::data, opj_tcd_layer::disto, opj_packet_info::disto, opj_tcd_precinct::enc, opj_packet_info::end_ph_pos, opj_tcd_precinct::imsbtree, opj_tcd_precinct::incltree, opj_codestream_info::index_write, int_floorlog2(), int_max(), J2K_CP_CSTY_EPH, J2K_CP_CSTY_SOP, opj_tcd_cblk_enc::layers, opj_pi_iterator::layno, opj_tcd_pass::len, opj_tcd_layer::len, opj_tcd_resolution::numbands, opj_tcd_cblk_enc::numbps, opj_tcd_band::numbps, opj_tcd_cblk_enc::numlenbits, opj_tcd_layer::numpasses, opj_tcd_cblk_enc::numpasses, opj_tile_info::packet, opj_tcd_tile::packno, opj_codestream_info::packno, opj_tcd_cblk_enc::passes, opj_tcd_band::precincts, opj_pi_iterator::precno, opj_pi_iterator::resno, opj_tcd_tilecomp::resolutions, t2_putcommacode(), t2_putnumpasses(), opj_tcd_pass::term, tgt_encode(), tgt_reset(), tgt_setvalue(), and opj_codestream_info::tile.
Referenced by t2_encode_packets().
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.
t2 | T2 handle |
tileno | number of the tile encoded |
tile | the tile for which to write the packets |
maxlayers | maximum number of layers |
dest | the destination buffer |
len | the length of the destination buffer |
cstr_info | Codestream information structure |
tpnum | Tile part number of the current tile |
tppos | The position of the tile part flag in the progression order |
pino | |
t2_mode | If == 0 In Threshold calculation ,If == 1 Final pass |
cur_totnum_tp | The total number of tile parts in the current tile |
References opj_cp::cinema, CINEMA4K_24, opj_t2::cinfo, opj_t2::cp, opj_tile_info::end_header, opj_packet_info::end_ph_pos, opj_packet_info::end_pos, EVT_ERROR, opj_t2::image, opj_codestream_info::index_write, opj_cp::max_comp_size, opj_image::numcomps, opj_event_msg(), opj_tile_info::packet, opj_tcd_tile::packno, opj_codestream_info::packno, pi_create_encode(), pi_destroy(), pi_initialise_encode(), pi_next(), opj_tcp::POC, opj_packet_info::start_pos, t2_encode_packet(), opj_cp::tcps, THRESH_CALC, opj_codestream_info::tile, and opj_cp::tp_on.
Referenced by tcd_encode_tile(), and tcd_rateallocate().
|
static |
References bio_read().
Referenced by t2_decode_packet().
|
static |
References bio_read().
Referenced by t2_decode_packet().
|
static |
cblk | |
index | |
cblksty | |
first |
References opj_tcd_seg::data, opj_tcd_seg::dataindex, J2K_CCP_CBLKSTY_LAZY, J2K_CCP_CBLKSTY_TERMALL, opj_tcd_seg::len, opj_tcd_seg::maxpasses, opj_tcd_seg::numpasses, OPJ_FALSE, opj_realloc, OPJ_TRUE, and opj_tcd_cblk_dec::segs.
Referenced by t2_decode_packet().
|
static |
References bio_write().
Referenced by t2_encode_packet().
|
static |
Variable length code for signalling delta Zil (truncation point)
bio | Bit Input/Output component |
n | delta Zil |
References bio_write().
Referenced by t2_encode_packet().