OpenJPEG
2.2.0
|
Data Structures | |
struct | opj_jp2_cdef_info |
Channel description: channel index, type, association. More... | |
struct | opj_jp2_cdef |
Channel descriptions and number of descriptions. More... | |
struct | opj_jp2_cmap_comp |
Component mappings: channel index, mapping type, palette index. More... | |
struct | opj_jp2_pclr |
Palette data: table entries, palette columns. More... | |
struct | opj_jp2_color |
Collector for ICC profile, palette, component mapping, channel description. More... | |
struct | opj_jp2_comps |
JP2 component. More... | |
struct | opj_jp2 |
JPEG-2000 file format reader/writer. More... | |
struct | opj_jp2_box |
JP2 Box. More... | |
struct | opj_jp2_header_handler |
struct | opj_jp2_img_header_writer_handler |
Macros | |
#define | OPJ_BOX_SIZE 1024 |
#define | OPJ_UNUSED(x) (void)x |
#define | JP2_JP 0x6a502020 |
JPEG 2000 signature box. More... | |
#define | JP2_FTYP 0x66747970 |
File type box. More... | |
#define | JP2_JP2H 0x6a703268 |
JP2 header box (super-box) More... | |
#define | JP2_IHDR 0x69686472 |
Image header box. More... | |
#define | JP2_COLR 0x636f6c72 |
Colour specification box. More... | |
#define | JP2_JP2C 0x6a703263 |
Contiguous codestream box. More... | |
#define | JP2_URL 0x75726c20 |
Data entry URL box. More... | |
#define | JP2_PCLR 0x70636c72 |
Palette box. More... | |
#define | JP2_CMAP 0x636d6170 |
Component Mapping box. More... | |
#define | JP2_CDEF 0x63646566 |
Channel Definition box. More... | |
#define | JP2_DTBL 0x6474626c |
Data Reference box. More... | |
#define | JP2_BPCC 0x62706363 |
Bits per component box. More... | |
#define | JP2_JP2 0x6a703220 |
File type fields. More... | |
Typedefs | |
typedef struct opj_jp2_cdef_info | opj_jp2_cdef_info_t |
Channel description: channel index, type, association. More... | |
typedef struct opj_jp2_cdef | opj_jp2_cdef_t |
Channel descriptions and number of descriptions. More... | |
typedef struct opj_jp2_cmap_comp | opj_jp2_cmap_comp_t |
Component mappings: channel index, mapping type, palette index. More... | |
typedef struct opj_jp2_pclr | opj_jp2_pclr_t |
Palette data: table entries, palette columns. More... | |
typedef struct opj_jp2_color | opj_jp2_color_t |
Collector for ICC profile, palette, component mapping, channel description. More... | |
typedef struct opj_jp2_comps | opj_jp2_comps_t |
JP2 component. More... | |
typedef struct opj_jp2 | opj_jp2_t |
JPEG-2000 file format reader/writer. More... | |
typedef struct opj_jp2_box | opj_jp2_box_t |
JP2 Box. More... | |
typedef struct opj_jp2_header_handler | opj_jp2_header_handler_t |
typedef struct opj_jp2_img_header_writer_handler | opj_jp2_img_header_writer_handler_t |
Enumerations | |
enum | JP2_STATE { JP2_STATE_NONE = 0x0, JP2_STATE_SIGNATURE = 0x1, JP2_STATE_FILE_TYPE = 0x2, JP2_STATE_HEADER = 0x4, JP2_STATE_CODESTREAM = 0x8, JP2_STATE_END_CODESTREAM = 0x10, JP2_STATE_UNKNOWN = 0x7fffffff } |
< Resolution box (super-box) More... | |
enum | JP2_IMG_STATE { JP2_IMG_STATE_NONE = 0x0, JP2_IMG_STATE_UNKNOWN = 0x7fffffff } |
Local static functions | |
static OPJ_BOOL | opj_jp2_read_ihdr (opj_jp2_t *jp2, OPJ_BYTE *p_image_header_data, OPJ_UINT32 p_image_header_size, opj_event_mgr_t *p_manager) |
Reads a IHDR box - Image Header box. More... | |
static OPJ_BYTE * | opj_jp2_write_ihdr (opj_jp2_t *jp2, OPJ_UINT32 *p_nb_bytes_written) |
Writes the Image Header box - Image Header box. More... | |
static OPJ_BYTE * | opj_jp2_write_bpcc (opj_jp2_t *jp2, OPJ_UINT32 *p_nb_bytes_written) |
Writes the Bit per Component box. More... | |
static OPJ_BOOL | opj_jp2_read_bpcc (opj_jp2_t *jp2, OPJ_BYTE *p_bpc_header_data, OPJ_UINT32 p_bpc_header_size, opj_event_mgr_t *p_manager) |
Reads a Bit per Component box. More... | |
static OPJ_BOOL | opj_jp2_read_cdef (opj_jp2_t *jp2, OPJ_BYTE *p_cdef_header_data, OPJ_UINT32 p_cdef_header_size, opj_event_mgr_t *p_manager) |
static void | opj_jp2_apply_cdef (opj_image_t *image, opj_jp2_color_t *color, opj_event_mgr_t *) |
static OPJ_BYTE * | opj_jp2_write_cdef (opj_jp2_t *jp2, OPJ_UINT32 *p_nb_bytes_written) |
Writes the Channel Definition box. More... | |
static OPJ_BYTE * | opj_jp2_write_colr (opj_jp2_t *jp2, OPJ_UINT32 *p_nb_bytes_written) |
Writes the Colour Specification box. More... | |
static OPJ_BOOL | opj_jp2_write_ftyp (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
Writes a FTYP box - File type box. More... | |
static OPJ_BOOL | opj_jp2_read_ftyp (opj_jp2_t *jp2, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager) |
Reads a a FTYP box - File type box. More... | |
static OPJ_BOOL | opj_jp2_skip_jp2c (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
static OPJ_BOOL | opj_jp2_read_jp2h (opj_jp2_t *jp2, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager) |
Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). More... | |
static OPJ_BOOL | opj_jp2_write_jp2h (opj_jp2_t *jp2, opj_stream_private_t *stream, opj_event_mgr_t *p_manager) |
Writes the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). More... | |
static OPJ_BOOL | opj_jp2_write_jp2c (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
Writes the Jpeg2000 codestream Header box - JP2C Header box. More... | |
static OPJ_BOOL | opj_jp2_read_jp (opj_jp2_t *jp2, OPJ_BYTE *p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t *p_manager) |
Reads a jpeg2000 file signature box. More... | |
static OPJ_BOOL | opj_jp2_write_jp (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
Writes a jpeg2000 file signature box. More... | |
static OPJ_BOOL | opj_jp2_apply_pclr (opj_image_t *image, opj_jp2_color_t *color, opj_event_mgr_t *p_manager) |
Apply collected palette data. More... | |
static void | opj_jp2_free_pclr (opj_jp2_color_t *color) |
static OPJ_BOOL | opj_jp2_read_pclr (opj_jp2_t *jp2, OPJ_BYTE *p_pclr_header_data, OPJ_UINT32 p_pclr_header_size, opj_event_mgr_t *p_manager) |
Collect palette data. More... | |
static OPJ_BOOL | opj_jp2_read_cmap (opj_jp2_t *jp2, OPJ_BYTE *p_cmap_header_data, OPJ_UINT32 p_cmap_header_size, opj_event_mgr_t *p_manager) |
Collect component mapping data. More... | |
static OPJ_BOOL | opj_jp2_read_colr (opj_jp2_t *jp2, OPJ_BYTE *p_colr_header_data, OPJ_UINT32 p_colr_header_size, opj_event_mgr_t *p_manager) |
Reads the Color Specification box. More... | |
Exported functions | |
void | opj_jp2_setup_decoder (opj_jp2_t *jp2, opj_dparameters_t *parameters) |
Setup the decoder decoding parameters using user parameters. More... | |
OPJ_BOOL | opj_jp2_set_threads (opj_jp2_t *jp2, OPJ_UINT32 num_threads) |
OPJ_BOOL | opj_jp2_decode (opj_jp2_t *jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager) |
Decode an image from a JPEG-2000 file stream. More... | |
OPJ_BOOL | opj_jp2_setup_encoder (opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image, opj_event_mgr_t *p_manager) |
Setup the encoder parameters using the current image and using user parameters. More... | |
OPJ_BOOL | opj_jp2_encode (opj_jp2_t *jp2, opj_stream_private_t *stream, opj_event_mgr_t *p_manager) |
Encode an image into a JPEG-2000 file stream. More... | |
OPJ_BOOL | opj_jp2_start_compress (opj_jp2_t *jp2, opj_stream_private_t *stream, opj_image_t *p_image, opj_event_mgr_t *p_manager) |
Starts a compression scheme, i.e. More... | |
OPJ_BOOL | opj_jp2_end_compress (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
Ends the compression procedures and possibiliy add data to be read after the codestream. More... | |
OPJ_BOOL | opj_jp2_end_decompress (opj_jp2_t *jp2, opj_stream_private_t *cio, opj_event_mgr_t *p_manager) |
Ends the decompression procedures and possibiliy add data to be read after the codestream. More... | |
OPJ_BOOL | opj_jp2_read_header (opj_stream_private_t *p_stream, opj_jp2_t *jp2, opj_image_t **p_image, opj_event_mgr_t *p_manager) |
Reads a jpeg2000 file header structure. More... | |
OPJ_BOOL | opj_jp2_read_tile_header (opj_jp2_t *p_jp2, OPJ_UINT32 *p_tile_index, OPJ_UINT32 *p_data_size, OPJ_INT32 *p_tile_x0, OPJ_INT32 *p_tile_y0, OPJ_INT32 *p_tile_x1, OPJ_INT32 *p_tile_y1, OPJ_UINT32 *p_nb_comps, OPJ_BOOL *p_go_on, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager) |
Reads a tile header. More... | |
OPJ_BOOL | opj_jp2_write_tile (opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager) |
Writes a tile. More... | |
OPJ_BOOL | opj_jp2_decode_tile (opj_jp2_t *p_jp2, OPJ_UINT32 p_tile_index, OPJ_BYTE *p_data, OPJ_UINT32 p_data_size, opj_stream_private_t *p_stream, opj_event_mgr_t *p_manager) |
Decode tile data. More... | |
opj_jp2_t * | opj_jp2_create (OPJ_BOOL p_is_decoder) |
Creates a jpeg2000 file decompressor. More... | |
void | opj_jp2_destroy (opj_jp2_t *jp2) |
Destroy a JP2 decompressor handle. More... | |
OPJ_BOOL | opj_jp2_set_decode_area (opj_jp2_t *p_jp2, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y, opj_event_mgr_t *p_manager) |
Sets the given area to be decoded. More... | |
OPJ_BOOL | opj_jp2_get_tile (opj_jp2_t *p_jp2, opj_stream_private_t *p_stream, opj_image_t *p_image, opj_event_mgr_t *p_manager, OPJ_UINT32 tile_index) |
OPJ_BOOL | opj_jp2_set_decoded_resolution_factor (opj_jp2_t *p_jp2, OPJ_UINT32 res_factor, opj_event_mgr_t *p_manager) |
void | jp2_dump (opj_jp2_t *p_jp2, OPJ_INT32 flag, FILE *out_stream) |
Dump some elements from the JP2 decompression structure . More... | |
opj_codestream_info_v2_t * | jp2_get_cstr_info (opj_jp2_t *p_jp2) |
Get the codestream info from a JPEG2000 codec. More... | |
opj_codestream_index_t * | jp2_get_cstr_index (opj_jp2_t *p_jp2) |
Get the codestream index from a JPEG2000 codec. More... | |
#define JP2_BPCC 0x62706363 |
Bits per component box.
Referenced by opj_jp2_write_bpcc().
#define JP2_CDEF 0x63646566 |
Channel Definition box.
Referenced by opj_jp2_write_cdef().
#define JP2_CMAP 0x636d6170 |
Component Mapping box.
#define JP2_COLR 0x636f6c72 |
Colour specification box.
Referenced by opj_jp2_write_colr().
#define JP2_DTBL 0x6474626c |
Data Reference box.
#define JP2_FTYP 0x66747970 |
File type box.
Referenced by opj_jp2_write_ftyp().
#define JP2_IHDR 0x69686472 |
Image header box.
Referenced by opj_jp2_read_jp2h(), and opj_jp2_write_ihdr().
#define JP2_JP 0x6a502020 |
JPEG 2000 signature box.
Referenced by opj_jp2_write_jp().
#define JP2_JP2 0x6a703220 |
File type fields.
Referenced by opj_jp2_setup_encoder().
#define JP2_JP2C 0x6a703263 |
Contiguous codestream box.
Referenced by opj_jp2_read_header_procedure(), and opj_jp2_write_jp2c().
#define JP2_JP2H 0x6a703268 |
JP2 header box (super-box)
Referenced by opj_jp2_write_jp2h().
#define JP2_PCLR 0x70636c72 |
Palette box.
#define JP2_URL 0x75726c20 |
Data entry URL box.
#define OPJ_BOX_SIZE 1024 |
Referenced by opj_jp2_read_header_procedure().
#define OPJ_UNUSED | ( | x | ) | (void)x |
Referenced by opj_jp2_default_validation(), opj_jp2_setup_decoding_validation(), and opj_jp2_write_jp().
typedef struct opj_jp2_box opj_jp2_box_t |
JP2 Box.
typedef struct opj_jp2_cdef_info opj_jp2_cdef_info_t |
Channel description: channel index, type, association.
typedef struct opj_jp2_cdef opj_jp2_cdef_t |
Channel descriptions and number of descriptions.
typedef struct opj_jp2_cmap_comp opj_jp2_cmap_comp_t |
Component mappings: channel index, mapping type, palette index.
typedef struct opj_jp2_color opj_jp2_color_t |
Collector for ICC profile, palette, component mapping, channel description.
typedef struct opj_jp2_comps opj_jp2_comps_t |
JP2 component.
typedef struct opj_jp2_header_handler opj_jp2_header_handler_t |
typedef struct opj_jp2_pclr opj_jp2_pclr_t |
Palette data: table entries, palette columns.
enum JP2_IMG_STATE |
enum JP2_STATE |
Dump some elements from the JP2 decompression structure .
p_jp2 | the jp2 codec. |
flag | flag to describe what elements are dump. |
out_stream | output stream where dump the elements. |
References opj_jp2::j2k, and j2k_dump().
Referenced by opj_create_decompress().
opj_codestream_index_t* jp2_get_cstr_index | ( | opj_jp2_t * | p_jp2 | ) |
Get the codestream index from a JPEG2000 codec.
p_jp2 | jp2 codec. |
References opj_jp2::j2k, and j2k_get_cstr_index().
Referenced by opj_create_decompress().
opj_codestream_info_v2_t* jp2_get_cstr_info | ( | opj_jp2_t * | p_jp2 | ) |
Get the codestream info from a JPEG2000 codec.
p_jp2 | jp2 codec. |
References opj_jp2::j2k, and j2k_get_cstr_info().
Referenced by opj_create_decompress().
|
static |
References opj_image_comp::alpha, opj_jp2_cdef_info::asoc, opj_jp2_cdef_info::cn, opj_image::comps, EVT_WARNING, opj_jp2_cdef::info, opj_jp2_color::jp2_cdef, opj_jp2_cdef::n, opj_image::numcomps, opj_event_msg(), opj_free(), and opj_jp2_cdef_info::typ.
Referenced by opj_jp2_decode(), and opj_jp2_get_tile().
|
static |
Apply collected palette data.
image | Image. |
color | Collector for profile, cdef and pclr data. |
p_manager | the user event manager. |
References opj_jp2_pclr::channel_sign, opj_jp2_pclr::channel_size, opj_jp2_pclr::cmap, opj_jp2_cmap_comp::cmp, opj_image::comps, opj_image_comp::data, opj_jp2_pclr::entries, EVT_ERROR, opj_image_comp::h, opj_jp2_color::jp2_pclr, max(), opj_jp2_pclr::nr_channels, opj_jp2_pclr::nr_entries, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_free(), opj_image_data_alloc(), opj_image_data_free(), opj_jp2_free_pclr(), opj_malloc(), OPJ_TRUE, opj_jp2_cmap_comp::pcol, opj_image_comp::prec, opj_image_comp::sgnd, and opj_image_comp::w.
Referenced by opj_jp2_decode(), and opj_jp2_get_tile().
Creates a jpeg2000 file decompressor.
References opj_jp2::color, opj_jp2_color::icc_profile_buf, opj_jp2_color::icc_profile_len, opj_jp2::j2k, opj_jp2_color::jp2_cdef, opj_jp2_color::jp2_has_colr, opj_jp2_color::jp2_pclr, opj_jp2::m_procedure_list, opj_jp2::m_validation_list, opj_calloc(), opj_j2k_create_compress(), opj_j2k_create_decompress(), opj_jp2_destroy(), and opj_procedure_list_create().
Referenced by opj_create_compress(), and opj_create_decompress().
OPJ_BOOL opj_jp2_decode | ( | opj_jp2_t * | jp2, |
opj_stream_private_t * | p_stream, | ||
opj_image_t * | p_image, | ||
opj_event_mgr_t * | p_manager | ||
) |
Decode an image from a JPEG-2000 file stream.
jp2 | JP2 decompressor handle |
p_stream | FIXME DOC |
p_image | FIXME DOC |
p_manager | FIXME DOC |
References opj_jp2_pclr::cmap, opj_jp2::color, opj_image::color_space, opj_jp2::enumcs, EVT_ERROR, opj_jp2_color::icc_profile_buf, opj_image::icc_profile_buf, opj_jp2_color::icc_profile_len, opj_image::icc_profile_len, opj_jp2::ignore_pclr_cmap_cdef, opj_jp2::j2k, opj_jp2_color::jp2_cdef, opj_jp2_color::jp2_pclr, OPJ_CLRSPC_CMYK, OPJ_CLRSPC_EYCC, OPJ_CLRSPC_GRAY, OPJ_CLRSPC_SRGB, OPJ_CLRSPC_SYCC, OPJ_CLRSPC_UNKNOWN, opj_event_msg(), OPJ_FALSE, opj_j2k_decode(), opj_jp2_apply_cdef(), opj_jp2_apply_pclr(), opj_jp2_check_color(), opj_jp2_free_pclr(), and OPJ_TRUE.
Referenced by opj_create_decompress().
OPJ_BOOL opj_jp2_decode_tile | ( | opj_jp2_t * | p_jp2, |
OPJ_UINT32 | p_tile_index, | ||
OPJ_BYTE * | p_data, | ||
OPJ_UINT32 | p_data_size, | ||
opj_stream_private_t * | p_stream, | ||
opj_event_mgr_t * | p_manager | ||
) |
Decode tile data.
p_jp2 | the jpeg2000 codec. |
p_tile_index | FIXME DOC |
p_data | FIXME DOC |
p_data_size | FIXME DOC |
p_stream | the stream to write data to. |
p_manager | the user event manager. |
References opj_jp2::j2k, and opj_j2k_decode_tile().
Referenced by opj_create_decompress().
void opj_jp2_destroy | ( | opj_jp2_t * | jp2 | ) |
Destroy a JP2 decompressor handle.
jp2 | JP2 decompressor handle to destroy |
References opj_jp2_pclr::channel_sign, opj_jp2_pclr::channel_size, opj_jp2::cl, opj_jp2_pclr::cmap, opj_jp2::color, opj_jp2::comps, opj_jp2_pclr::entries, opj_jp2_color::icc_profile_buf, opj_jp2_cdef::info, opj_jp2::j2k, opj_jp2_color::jp2_cdef, opj_jp2_color::jp2_pclr, opj_jp2::m_procedure_list, opj_jp2::m_validation_list, opj_free(), opj_j2k_destroy(), and opj_procedure_list_destroy().
Referenced by opj_create_compress(), opj_create_decompress(), and opj_jp2_create().
OPJ_BOOL opj_jp2_encode | ( | opj_jp2_t * | jp2, |
opj_stream_private_t * | stream, | ||
opj_event_mgr_t * | p_manager | ||
) |
Encode an image into a JPEG-2000 file stream.
jp2 | JP2 compressor handle |
stream | Output buffer stream |
p_manager | event manager |
References opj_jp2::j2k, and opj_j2k_encode().
Referenced by opj_create_compress().
OPJ_BOOL opj_jp2_end_compress | ( | opj_jp2_t * | jp2, |
opj_stream_private_t * | cio, | ||
opj_event_mgr_t * | p_manager | ||
) |
Ends the compression procedures and possibiliy add data to be read after the codestream.
References opj_jp2::j2k, opj_jp2::m_procedure_list, OPJ_FALSE, opj_j2k_end_compress(), opj_jp2_exec(), and opj_jp2_setup_end_header_writing().
Referenced by opj_create_compress().
OPJ_BOOL opj_jp2_end_decompress | ( | opj_jp2_t * | jp2, |
opj_stream_private_t * | cio, | ||
opj_event_mgr_t * | p_manager | ||
) |
Ends the decompression procedures and possibiliy add data to be read after the codestream.
References opj_jp2::j2k, opj_jp2::m_procedure_list, OPJ_FALSE, opj_j2k_end_decompress(), opj_jp2_exec(), and opj_jp2_setup_end_header_reading().
Referenced by opj_create_decompress().
|
static |
References opj_jp2_pclr::channel_sign, opj_jp2_pclr::channel_size, opj_jp2_pclr::cmap, opj_jp2_pclr::entries, opj_jp2_color::jp2_pclr, and opj_free().
Referenced by opj_jp2_apply_pclr(), opj_jp2_decode(), and opj_jp2_get_tile().
OPJ_BOOL opj_jp2_get_tile | ( | opj_jp2_t * | p_jp2, |
opj_stream_private_t * | p_stream, | ||
opj_image_t * | p_image, | ||
opj_event_mgr_t * | p_manager, | ||
OPJ_UINT32 | tile_index | ||
) |
References opj_jp2_pclr::cmap, opj_jp2::color, opj_image::color_space, opj_jp2::enumcs, EVT_ERROR, EVT_WARNING, opj_jp2_color::icc_profile_buf, opj_image::icc_profile_buf, opj_jp2_color::icc_profile_len, opj_image::icc_profile_len, opj_jp2::j2k, opj_jp2_color::jp2_cdef, opj_jp2_color::jp2_pclr, OPJ_CLRSPC_CMYK, OPJ_CLRSPC_EYCC, OPJ_CLRSPC_GRAY, OPJ_CLRSPC_SRGB, OPJ_CLRSPC_SYCC, OPJ_CLRSPC_UNKNOWN, opj_event_msg(), OPJ_FALSE, opj_j2k_get_tile(), opj_jp2_apply_cdef(), opj_jp2_apply_pclr(), opj_jp2_check_color(), opj_jp2_free_pclr(), and OPJ_TRUE.
Referenced by opj_create_decompress().
|
static |
Reads a Bit per Component box.
p_bpc_header_data | pointer to actual data (already read from file) |
jp2 | the jpeg2000 file codec. |
p_bpc_header_size | the size of the bpc header |
p_manager | the user event manager. |
References opj_jp2::bpc, opj_jp2_comps::bpcc, opj_jp2::comps, EVT_ERROR, EVT_WARNING, opj_jp2::numcomps, opj_event_msg(), OPJ_FALSE, opj_read_bytes, and OPJ_TRUE.
|
static |
|
static |
Collect component mapping data.
jp2 | JP2 handle |
p_cmap_header_data | FIXME DOC |
p_cmap_header_size | FIXME DOC |
p_manager | FIXME DOC |
References opj_jp2_pclr::cmap, opj_jp2_cmap_comp::cmp, opj_jp2::color, EVT_ERROR, opj_jp2_color::jp2_pclr, opj_jp2_cmap_comp::mtyp, opj_jp2_pclr::nr_channels, opj_event_msg(), OPJ_FALSE, opj_malloc(), opj_read_bytes, OPJ_TRUE, and opj_jp2_cmap_comp::pcol.
|
static |
Reads the Color Specification box.
p_colr_header_data | pointer to actual data (already read from file) |
jp2 | the jpeg2000 file codec. |
p_colr_header_size | the size of the color header |
p_manager | the user event manager. |
References opj_jp2::approx, opj_jp2::color, opj_jp2::enumcs, opj_j2k::enumcs, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_jp2_color::icc_profile_buf, opj_jp2_color::icc_profile_len, opj_jp2::j2k, opj_jp2_color::jp2_has_colr, opj_jp2::meth, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_malloc(), opj_read_bytes, OPJ_TRUE, and opj_jp2::precedence.
|
static |
Reads a a FTYP box - File type box.
p_header_data | the data contained in the FTYP box. |
jp2 | the jpeg2000 file codec. |
p_header_size | the size of the data contained in the FTYP box. |
p_manager | the user event manager. |
References opj_jp2::brand, opj_jp2::cl, EVT_ERROR, opj_jp2::jp2_state, JP2_STATE_FILE_TYPE, JP2_STATE_SIGNATURE, opj_jp2::minversion, opj_jp2::numcl, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_read_bytes, and OPJ_TRUE.
OPJ_BOOL opj_jp2_read_header | ( | opj_stream_private_t * | p_stream, |
opj_jp2_t * | jp2, | ||
opj_image_t ** | p_image, | ||
opj_event_mgr_t * | p_manager | ||
) |
Reads a jpeg2000 file header structure.
p_stream | the stream to read data from. |
jp2 | the jpeg2000 file header structure. |
p_image | FIXME DOC |
p_manager | the user event manager. |
References EVT_ERROR, opj_jp2::has_ihdr, opj_jp2::has_jp2h, opj_jp2::j2k, opj_jp2::m_procedure_list, opj_jp2::m_validation_list, opj_event_msg(), OPJ_FALSE, opj_j2k_read_header(), opj_jp2_exec(), opj_jp2_setup_decoding_validation(), and opj_jp2_setup_header_reading().
Referenced by opj_create_decompress().
|
static |
Reads a IHDR box - Image Header box.
p_image_header_data | pointer to actual data (already read from file) |
jp2 | the jpeg2000 file codec. |
p_image_header_size | the size of the image header |
p_manager | the user event manager. |
References opj_cp::allow_different_bit_depth_sign, opj_jp2::bpc, opj_jp2::C, opj_jp2::comps, EVT_ERROR, EVT_INFO, EVT_WARNING, opj_jp2::h, opj_jp2::has_ihdr, opj_j2k::ihdr_h, opj_j2k::ihdr_w, opj_jp2::IPR, opj_jp2::j2k, opj_j2k::m_cp, opj_jp2::numcomps, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_read_bytes, OPJ_TRUE, opj_jp2::UnkC, and opj_jp2::w.
|
static |
Reads a jpeg2000 file signature box.
p_header_data | the data contained in the signature box. |
jp2 | the jpeg2000 file codec. |
p_header_size | the size of the data contained in the signature box. |
p_manager | the user event manager. |
References EVT_ERROR, opj_jp2::jp2_state, JP2_STATE_NONE, JP2_STATE_SIGNATURE, opj_event_msg(), OPJ_FALSE, opj_read_bytes, and OPJ_TRUE.
|
static |
Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box).
p_header_data | the data contained in the file header box. |
jp2 | the jpeg2000 file codec. |
p_header_size | the size of the data contained in the file header box. |
p_manager | the user event manager. |
References EVT_ERROR, opj_jp2_header_handler::handler, opj_jp2::has_jp2h, JP2_IHDR, opj_jp2::jp2_img_state, JP2_IMG_STATE_NONE, JP2_IMG_STATE_UNKNOWN, opj_jp2::jp2_state, JP2_STATE_FILE_TYPE, JP2_STATE_HEADER, opj_jp2_box::length, opj_event_msg(), OPJ_FALSE, opj_jp2_img_find_handler(), opj_jp2_read_boxhdr_char(), OPJ_TRUE, and opj_jp2_box::type.
|
static |
Collect palette data.
jp2 | JP2 handle |
p_pclr_header_data | FIXME DOC |
p_pclr_header_size | FIXME DOC |
p_manager |
References opj_jp2_pclr::channel_sign, opj_jp2_pclr::channel_size, opj_jp2_pclr::cmap, opj_jp2::color, opj_jp2_pclr::entries, EVT_ERROR, opj_jp2_color::jp2_pclr, opj_jp2_pclr::nr_channels, opj_jp2_pclr::nr_entries, opj_event_msg(), OPJ_FALSE, opj_free(), opj_malloc(), opj_read_bytes, and OPJ_TRUE.
OPJ_BOOL opj_jp2_read_tile_header | ( | opj_jp2_t * | p_jp2, |
OPJ_UINT32 * | p_tile_index, | ||
OPJ_UINT32 * | p_data_size, | ||
OPJ_INT32 * | p_tile_x0, | ||
OPJ_INT32 * | p_tile_y0, | ||
OPJ_INT32 * | p_tile_x1, | ||
OPJ_INT32 * | p_tile_y1, | ||
OPJ_UINT32 * | p_nb_comps, | ||
OPJ_BOOL * | p_go_on, | ||
opj_stream_private_t * | p_stream, | ||
opj_event_mgr_t * | p_manager | ||
) |
Reads a tile header.
p_jp2 | the jpeg2000 codec. |
p_tile_index | FIXME DOC |
p_data_size | FIXME DOC |
p_tile_x0 | FIXME DOC |
p_tile_y0 | FIXME DOC |
p_tile_x1 | FIXME DOC |
p_tile_y1 | FIXME DOC |
p_nb_comps | FIXME DOC |
p_go_on | FIXME DOC |
p_stream | the stream to write data to. |
p_manager | the user event manager. |
References opj_jp2::j2k, and opj_j2k_read_tile_header().
Referenced by opj_create_decompress().
OPJ_BOOL opj_jp2_set_decode_area | ( | opj_jp2_t * | p_jp2, |
opj_image_t * | p_image, | ||
OPJ_INT32 | p_start_x, | ||
OPJ_INT32 | p_start_y, | ||
OPJ_INT32 | p_end_x, | ||
OPJ_INT32 | p_end_y, | ||
opj_event_mgr_t * | p_manager | ||
) |
Sets the given area to be decoded.
This function should be called right after opj_read_header and before any tile header reading.
p_jp2 | the jpeg2000 codec. |
p_image | FIXME DOC |
p_start_x | the left position of the rectangle to decode (in image coordinates). |
p_start_y | the up position of the rectangle to decode (in image coordinates). |
p_end_x | the right position of the rectangle to decode (in image coordinates). |
p_end_y | the bottom position of the rectangle to decode (in image coordinates). |
p_manager | the user event manager |
References opj_jp2::j2k, and opj_j2k_set_decode_area().
Referenced by opj_create_decompress().
OPJ_BOOL opj_jp2_set_decoded_resolution_factor | ( | opj_jp2_t * | p_jp2, |
OPJ_UINT32 | res_factor, | ||
opj_event_mgr_t * | p_manager | ||
) |
References opj_jp2::j2k, and opj_j2k_set_decoded_resolution_factor().
Referenced by opj_create_decompress().
OPJ_BOOL opj_jp2_set_threads | ( | opj_jp2_t * | jp2, |
OPJ_UINT32 | num_threads | ||
) |
References opj_jp2::j2k, and opj_j2k_set_threads().
Referenced by opj_create_decompress().
void opj_jp2_setup_decoder | ( | opj_jp2_t * | jp2, |
opj_dparameters_t * | parameters | ||
) |
Setup the decoder decoding parameters using user parameters.
Decoding parameters are returned in jp2->j2k->cp.
jp2 | JP2 decompressor handle |
parameters | decompression parameters |
References opj_jp2::color, opj_dparameters::flags, opj_jp2::ignore_pclr_cmap_cdef, opj_jp2::j2k, opj_jp2_color::jp2_has_colr, OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG, and opj_j2k_setup_decoder().
Referenced by opj_create_decompress().
OPJ_BOOL opj_jp2_setup_encoder | ( | opj_jp2_t * | jp2, |
opj_cparameters_t * | parameters, | ||
opj_image_t * | image, | ||
opj_event_mgr_t * | p_manager | ||
) |
Setup the encoder parameters using the current image and using user parameters.
Coding parameters are returned in jp2->j2k->cp.
jp2 | JP2 compressor handle |
parameters | compression parameters |
image | input filled image |
p_manager | FIXME DOC |
References opj_image_comp::alpha, opj_jp2::approx, opj_jp2_cdef_info::asoc, opj_jp2::bpc, opj_jp2_comps::bpcc, opj_jp2::brand, opj_jp2::C, opj_jp2::cl, opj_jp2_cdef_info::cn, opj_jp2::color, opj_image::color_space, opj_jp2::comps, opj_image::comps, opj_jp2::enumcs, EVT_ERROR, EVT_WARNING, opj_jp2::h, opj_image::icc_profile_len, opj_jp2_cdef::info, opj_jp2::IPR, opj_jp2::j2k, opj_jp2_color::jp2_cdef, JP2_JP2, opj_jp2::jpip_on, opj_cparameters::jpip_on, opj_jp2::meth, opj_jp2::minversion, opj_jp2_cdef::n, opj_jp2::numcl, opj_jp2::numcomps, opj_image::numcomps, opj_event_msg(), OPJ_FALSE, opj_j2k_setup_encoder(), opj_malloc(), OPJ_TRUE, opj_image_comp::prec, opj_jp2::precedence, opj_image_comp::sgnd, opj_jp2_cdef_info::typ, opj_jp2::UnkC, opj_jp2::w, opj_image::x0, opj_image::x1, opj_image::y0, and opj_image::y1.
Referenced by opj_create_compress().
|
static |
References opj_jp2::j2k_codestream_offset, OPJ_FALSE, opj_stream_skip(), opj_stream_tell(), and OPJ_TRUE.
Referenced by opj_jp2_setup_header_writing().
OPJ_BOOL opj_jp2_start_compress | ( | opj_jp2_t * | jp2, |
opj_stream_private_t * | stream, | ||
opj_image_t * | p_image, | ||
opj_event_mgr_t * | p_manager | ||
) |
Starts a compression scheme, i.e.
validates the codec parameters, writes the header.
jp2 | the jpeg2000 file codec. |
stream | the stream object. |
p_image | FIXME DOC |
p_manager | FIXME DOC |
References opj_jp2::j2k, opj_jp2::m_procedure_list, opj_jp2::m_validation_list, OPJ_FALSE, opj_j2k_start_compress(), opj_jp2_exec(), opj_jp2_setup_encoding_validation(), and opj_jp2_setup_header_writing().
Referenced by opj_create_compress().
|
static |
Writes the Bit per Component box.
jp2 | jpeg2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References opj_jp2_comps::bpcc, opj_jp2::comps, JP2_BPCC, opj_jp2::numcomps, opj_calloc(), and opj_write_bytes.
Referenced by opj_jp2_write_jp2h().
|
static |
Writes the Channel Definition box.
jp2 | jpeg2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References opj_jp2_cdef_info::asoc, opj_jp2_cdef_info::cn, opj_jp2::color, opj_jp2_cdef::info, JP2_CDEF, opj_jp2_color::jp2_cdef, opj_jp2_cdef::n, opj_malloc(), opj_write_bytes, and opj_jp2_cdef_info::typ.
Referenced by opj_jp2_write_jp2h().
|
static |
Writes the Colour Specification box.
jp2 | jpeg2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References opj_jp2::approx, opj_jp2::color, opj_jp2::enumcs, opj_jp2_color::icc_profile_buf, opj_jp2_color::icc_profile_len, JP2_COLR, opj_jp2::meth, opj_calloc(), opj_write_bytes, and opj_jp2::precedence.
Referenced by opj_jp2_write_jp2h().
|
static |
Writes a FTYP box - File type box.
cio | the stream to write data to. |
jp2 | the jpeg2000 file codec. |
p_manager | the user event manager. |
References opj_jp2::brand, opj_jp2::cl, EVT_ERROR, JP2_FTYP, opj_jp2::minversion, opj_jp2::numcl, opj_calloc(), opj_event_msg(), OPJ_FALSE, opj_free(), opj_stream_write_data(), and opj_write_bytes.
Referenced by opj_jp2_setup_header_writing().
|
static |
Writes the Image Header box - Image Header box.
jp2 | jpeg2000 file codec. |
p_nb_bytes_written | pointer to store the nb of bytes written by the function. |
References opj_jp2::bpc, opj_jp2::C, opj_jp2::h, opj_jp2::IPR, JP2_IHDR, opj_jp2::numcomps, opj_calloc(), opj_write_bytes, opj_jp2::UnkC, and opj_jp2::w.
Referenced by opj_jp2_write_jp2h().
|
static |
Writes a jpeg2000 file signature box.
cio | the stream to write data to. |
jp2 | the jpeg2000 file codec. |
p_manager | the user event manager. |
References JP2_JP, OPJ_FALSE, opj_stream_write_data(), OPJ_TRUE, OPJ_UNUSED, and opj_write_bytes.
Referenced by opj_jp2_setup_header_writing().
|
static |
Writes the Jpeg2000 codestream Header box - JP2C Header box.
This function must be called AFTER the coding has been done.
cio | the stream to write data to. |
jp2 | the jpeg2000 file codec. |
p_manager | user event manager. |
References EVT_ERROR, opj_jp2::j2k_codestream_offset, JP2_JP2C, opj_event_msg(), OPJ_FALSE, opj_stream_has_seek(), opj_stream_seek(), opj_stream_tell(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.
Referenced by opj_jp2_setup_end_header_writing().
|
static |
Writes the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box).
jp2 | the jpeg2000 file codec. |
stream | the stream to write data to. |
p_manager | user event manager. |
References opj_jp2::bpc, opj_jp2::color, EVT_ERROR, opj_jp2_img_header_writer_handler::handler, opj_jp2_color::jp2_cdef, JP2_JP2H, opj_jp2_img_header_writer_handler::m_data, opj_jp2_img_header_writer_handler::m_size, opj_event_msg(), OPJ_FALSE, opj_free(), opj_jp2_write_bpcc(), opj_jp2_write_cdef(), opj_jp2_write_colr(), opj_jp2_write_ihdr(), opj_stream_write_data(), OPJ_TRUE, and opj_write_bytes.
Referenced by opj_jp2_setup_header_writing().
OPJ_BOOL opj_jp2_write_tile | ( | opj_jp2_t * | p_jp2, |
OPJ_UINT32 | p_tile_index, | ||
OPJ_BYTE * | p_data, | ||
OPJ_UINT32 | p_data_size, | ||
opj_stream_private_t * | p_stream, | ||
opj_event_mgr_t * | p_manager | ||
) |
Writes a tile.
p_jp2 | the jpeg2000 codec. |
p_tile_index | FIXME DOC |
p_data | FIXME DOC |
p_data_size | FIXME DOC |
p_stream | the stream to write data to. |
p_manager | the user event manager. |
References opj_jp2::j2k, and opj_j2k_write_tile().
Referenced by opj_create_compress().