OpenJPEG
1.5.1
|
Functions | |
opj_cio_t *OPJ_CALLCONV | opj_cio_open (opj_common_ptr cinfo, unsigned char *buffer, int length) |
Open and allocate a memory stream for read / write. More... | |
void OPJ_CALLCONV | opj_cio_close (opj_cio_t *cio) |
Close and free a CIO handle. More... | |
int OPJ_CALLCONV | cio_tell (opj_cio_t *cio) |
Get position in byte stream. More... | |
void OPJ_CALLCONV | cio_seek (opj_cio_t *cio, int pos) |
Set position in byte stream. More... | |
int | cio_numbytesleft (opj_cio_t *cio) |
Number of bytes left before the end of the stream. More... | |
unsigned char * | cio_getbp (opj_cio_t *cio) |
Get pointer to the current position in the stream. More... | |
opj_bool | cio_byteout (opj_cio_t *cio, unsigned char v) |
unsigned char | cio_bytein (opj_cio_t *cio) |
unsigned int | cio_write (opj_cio_t *cio, unsigned int64 v, int n) |
Write some bytes. More... | |
unsigned int | cio_read (opj_cio_t *cio, int n) |
Read some bytes. More... | |
void | cio_skip (opj_cio_t *cio, int n) |
Skip some bytes. More... | |
unsigned char cio_bytein | ( | opj_cio_t * | cio | ) |
References opj_cio::bp, opj_cio::cinfo, opj_cio::end, EVT_ERROR, opj_event_msg(), and opj_cio::start.
Referenced by cio_read().
References opj_cio::bp, opj_cio::cinfo, opj_cio::end, EVT_ERROR, opj_event_msg(), OPJ_FALSE, OPJ_TRUE, and opj_cio::start.
Referenced by cio_write().
void OPJ_CALLCONV cio_seek | ( | opj_cio_t * | cio, |
int | pos | ||
) |
Set position in byte stream.
cio | CIO handle |
pos | Position, in number of bytes, from the beginning of the stream |
References opj_cio::bp, opj_cio::cinfo, opj_cio::end, EVT_ERROR, opj_event_msg(), and opj_cio::start.
Referenced by check_EPHuse(), j2k_decode(), j2k_read_cod(), j2k_read_epb(), j2k_read_epc(), j2k_read_qcd(), j2k_read_unk(), j2k_write_coc(), j2k_write_cod(), j2k_write_com(), j2k_write_epb(), j2k_write_epc(), j2k_write_qcc(), j2k_write_qcd(), j2k_write_siz(), j2k_write_sod(), j2k_write_sot(), jp2_read_jp2h(), jp2_write_bpcc(), jp2_write_colr(), jp2_write_ftyp(), jp2_write_ihdr(), jp2_write_jp(), jp2_write_jp2c(), jp2_write_jp2h(), jpwl_correct(), jpwl_dump_marks(), jpwl_epb_correct(), jpwl_prepare_marks(), opj_jp2_encode(), write_cidx(), write_cptr(), write_fidx(), write_iptr(), write_mainmhix(), write_manf(), write_phix(), write_phixfaix(), write_ppix(), write_ppixfaix(), write_prxy(), write_thix(), write_tilemhix(), write_tpix(), and write_tpixfaix().
int OPJ_CALLCONV cio_tell | ( | opj_cio_t * | cio | ) |
Get position in byte stream.
cio | CIO handle |
References opj_cio::bp, and opj_cio::start.
Referenced by check_EPHuse(), j2k_decode(), j2k_decode_jpt_stream(), j2k_encode(), j2k_read_cod(), j2k_read_epb(), j2k_read_epc(), j2k_read_esd(), j2k_read_insec(), j2k_read_ppm(), j2k_read_qcd(), j2k_read_red(), j2k_read_sec(), j2k_read_soc(), j2k_read_sod(), j2k_read_sot(), j2k_read_unk(), j2k_write_coc(), j2k_write_cod(), j2k_write_com(), j2k_write_eoc(), j2k_write_epb(), j2k_write_epc(), j2k_write_qcc(), j2k_write_qcd(), j2k_write_siz(), j2k_write_soc(), j2k_write_sod(), j2k_write_sot(), j2k_write_tlm(), jp2_read_boxhdr(), jp2_read_bpcc(), jp2_read_colr(), jp2_read_ftyp(), jp2_read_ihdr(), jp2_read_jp(), jp2_read_jp2c(), jp2_read_jp2h(), jp2_write_bpcc(), jp2_write_colr(), jp2_write_ftyp(), jp2_write_ihdr(), jp2_write_jp(), jp2_write_jp2c(), jp2_write_jp2h(), jpwl_correct(), jpwl_epb_correct(), jpwl_prepare_marks(), opj_jp2_encode(), write_cidx(), write_cptr(), write_fidx(), write_iptr(), write_mainmhix(), write_manf(), write_phix(), write_phixfaix(), write_ppix(), write_ppixfaix(), write_prxy(), write_thix(), write_tilemhix(), write_tpix(), and write_tpixfaix().
void OPJ_CALLCONV opj_cio_close | ( | opj_cio_t * | cio | ) |
Close and free a CIO handle.
cio | CIO handle to free |
References opj_cio::buffer, opj_cio::openmode, opj_free, and OPJ_STREAM_WRITE.
opj_cio_t* OPJ_CALLCONV opj_cio_open | ( | opj_common_ptr | cinfo, |
unsigned char * | buffer, | ||
int | length | ||
) |
Open and allocate a memory stream for read / write.
On reading, the user must provide a buffer containing encoded data. The buffer will be wrapped by the returned CIO handle. On writing, buffer parameters must be set to 0: a buffer will be allocated by the library to contain encoded data.
cinfo | Codec context info |
buffer | Reading: buffer address. Writing: NULL |
length | Reading: buffer length. Writing: 0 |
References opj_cio::bp, opj_cio::buffer, opj_cio::cinfo, CODEC_J2K, CODEC_JP2, opj_cio::end, EVT_ERROR, opj_cp::img_size, opj_cio::length, opj_cio::openmode, opj_event_msg(), opj_free, opj_malloc, OPJ_STREAM_READ, OPJ_STREAM_WRITE, and opj_cio::start.