Grok
7.6.6
|
JPEG 2000 file format reader/writer. More...
#include <FileFormat.h>
Public Attributes | |
CodeStream * | codeStream |
handle to the J2K codec More... | |
std::vector< jp2_procedure > * | m_validation_list |
list of validation procedures More... | |
std::vector< jp2_procedure > * | m_procedure_list |
list of execution procedures More... | |
uint32_t | w |
uint32_t | h |
uint16_t | numcomps |
uint8_t | bpc |
uint8_t | C |
uint8_t | UnkC |
uint8_t | IPR |
uint8_t | meth |
uint8_t | approx |
GRK_ENUM_COLOUR_SPACE | enumcs |
uint8_t | precedence |
uint32_t | brand |
uint32_t | minversion |
uint32_t | numcl |
uint32_t * | cl |
ComponentInfo * | comps |
uint64_t | j2k_codestream_offset |
bool | needs_xl_jp2c_box_length |
uint32_t | jp2_state |
uint32_t | jp2_img_state |
grk_color | color |
bool | has_capture_resolution |
double | capture_resolution [2] |
bool | has_display_resolution |
double | display_resolution [2] |
grk_buf | xml |
UUIDBox | uuids [JP2_MAX_NUM_UUIDS] |
uint32_t | numUuids |
AsocBox | root_asoc |
bool | m_headerError |
Local static functions | |
FileFormat (bool isDecoder, BufferedStream *stream) | |
~FileFormat () | |
bool | read_header (grk_header_info *header_info) |
Main header reading function handler. More... | |
GrkImage * | get_image (uint16_t tileIndex) |
GrkImage * | get_image (void) |
void | init_decompress (grk_dparameters *p_param) |
Set up decompressor function handler. More... | |
bool | set_decompress_window (grk_rect_u32 window) |
Sets the given area to be decompressed, relative to image origin. More... | |
bool | decompress (grk_plugin_tile *tile) |
bool | end_decompress (void) |
Reading function used after code stream if necessary. More... | |
bool | init_compress (grk_cparameters *p_param, GrkImage *p_image) |
bool | start_compress (void) |
bool | compress (grk_plugin_tile *tile) |
bool | compress_tile (uint16_t tile_index, uint8_t *p_data, uint64_t data_size) |
bool | end_compress (void) |
bool | decompress_tile (uint16_t tile_index) |
decompress tile More... | |
void | dump (uint32_t flag, FILE *out_stream) |
grk_codestream_info_v2 * | get_cstr_info (void) |
grk_codestream_index * | get_cstr_index (void) |
uint32_t | read_asoc (AsocBox *parent, uint8_t **header_data, uint32_t *header_data_size, uint32_t asocSize) |
bool | read_header_procedure (void) |
bool | default_validation (void) |
bool | read_box_hdr (FileFormatBox *box, uint32_t *p_number_bytes_read, BufferedStream *stream) |
bool | read_ihdr (uint8_t *p_image_header_data, uint32_t image_header_size) |
uint8_t * | write_ihdr (uint32_t *p_nb_bytes_written) |
uint8_t * | write_buffer (uint32_t boxId, grk_buf *buffer, uint32_t *p_nb_bytes_written) |
bool | read_xml (uint8_t *p_xml_data, uint32_t xml_size) |
uint8_t * | write_xml (uint32_t *p_nb_bytes_written) |
bool | read_uuid (uint8_t *p_header_data, uint32_t header_size) |
double | calc_res (uint16_t num, uint16_t den, uint8_t exponent) |
bool | read_res_box (uint32_t *id, uint32_t *num, uint32_t *den, uint32_t *exponent, uint8_t **p_resolution_data) |
bool | read_res (uint8_t *p_resolution_data, uint32_t resolution_size) |
void | find_cf (double x, uint32_t *num, uint32_t *den) |
void | write_res_box (double resx, double resy, uint32_t box_id, uint8_t **current_res_ptr) |
uint8_t * | write_res (uint32_t *p_nb_bytes_written) |
uint8_t * | write_bpc (uint32_t *p_nb_bytes_written) |
bool | read_bpc (uint8_t *p_bpc_header_data, uint32_t bpc_header_size) |
uint8_t * | write_channel_definition (uint32_t *p_nb_bytes_written) |
void | apply_channel_definition (GrkImage *image, grk_color *color) |
bool | read_channel_definition (uint8_t *p_cdef_header_data, uint32_t cdef_header_size) |
uint8_t * | write_colr (uint32_t *p_nb_bytes_written) |
bool | read_colr (uint8_t *p_colr_header_data, uint32_t colr_header_size) |
bool | check_color (GrkImage *image, grk_color *color) |
bool | apply_palette_clr (GrkImage *image, grk_color *color) |
bool | read_component_mapping (uint8_t *component_mapping_header_data, uint32_t component_mapping_header_size) |
uint8_t * | write_component_mapping (uint32_t *p_nb_bytes_written) |
uint8_t * | write_palette_clr (uint32_t *p_nb_bytes_written) |
bool | read_palette_clr (uint8_t *p_pclr_header_data, uint32_t pclr_header_size) |
bool | write_jp2h (void) |
bool | write_uuids (void) |
bool | write_ftyp (void) |
bool | write_jp2c (void) |
bool | write_jp (void) |
bool | exec (std::vector< jp2_procedure > *procs) |
Executes the given procedures on the given codec. More... | |
const BoxReadHandler * | find_handler (uint32_t id) |
const BoxReadHandler * | img_find_handler (uint32_t id) |
Finds the image execution function related to the given box id. More... | |
bool | read_jp (uint8_t *p_header_data, uint32_t header_size) |
Reads a JPEG 2000 file signature box. More... | |
bool | read_ftyp (uint8_t *p_header_data, uint32_t header_size) |
Reads a a FTYP box - File type box. More... | |
bool | skip_jp2c (void) |
bool | read_jp2h (uint8_t *p_header_data, uint32_t header_size) |
Reads the Jpeg2000 file Header box - JP2 Header box (warning, this is a super box). More... | |
bool | read_box (FileFormatBox *box, uint8_t *p_data, uint32_t *p_number_bytes_read, uint64_t p_box_max_size) |
void | serializeAsoc (AsocBox *asoc, grk_asoc *serial_asocs, uint32_t *num_asocs, uint32_t level) |
static void | free_color (grk_color *color) |
static void | alloc_palette (grk_color *color, uint8_t num_channels, uint16_t num_entries) |
static void | free_palette_clr (grk_color *color) |
bool | applyColour (GrkImage *img) |
Additional Inherited Members | |
![]() | |
virtual | ~ICodeStream () |
JPEG 2000 file format reader/writer.
grk::FileFormat::FileFormat | ( | bool | isDecoder, |
BufferedStream * | stream | ||
) |
grk::FileFormat::~FileFormat | ( | ) |
References cl, codeStream, color, comps, grk::grk_buffer< T >::dealloc(), free_color(), grk::grk_free(), m_procedure_list, m_validation_list, numUuids, uuids, and xml.
|
static |
References color, free_palette_clr(), and grk_color::palette.
Referenced by grk::GrkImage::copyHeader(), and read_palette_clr().
References grk_color::channel_definition, color, _grk_image::comps, _grk_channel_definition::descriptions, GRK_COMPONENT_ASSOC_WHOLE_IMAGE, GRK_COMPONENT_TYPE_COLOUR, grk::GRK_WARN(), ojph::info, _grk_channel_definition::num_channel_descriptions, _grk_image::numcomps, and _grk_image_comp::type.
Referenced by applyColour().
References grk::GrkImage::allocData(), _grk_palette_data::channel_prec, _grk_palette_data::channel_sign, color, _grk_palette_data::component_mapping, _grk_image::comps, _grk_image_comp::data, grk::grk_aligned_free(), grk::GRK_ERROR(), grk::grk_free(), grk_image_single_component_data_free(), grk::grk_malloc(), h, _grk_palette_data::lut, _grk_palette_data::num_channels, _grk_palette_data::num_entries, _grk_image::numcomps, and grk_color::palette.
Referenced by applyColour().
|
private |
References apply_channel_definition(), apply_palette_clr(), grk_color::channel_definition, color, _grk_image::color_applied, _grk_palette_data::component_mapping, free_palette_clr(), and grk_color::palette.
Referenced by decompress(), and decompress_tile().
double grk::FileFormat::calc_res | ( | uint16_t | num, |
uint16_t | den, | ||
uint8_t | exponent | ||
) |
Referenced by read_res().
References grk_color::channel_definition, color, _grk_palette_data::component_mapping, _grk_channel_definition::descriptions, grk::grk_calloc(), GRK_COMPONENT_ASSOC_UNASSOCIATED, grk::GRK_ERROR(), grk::grk_free(), grk::GRK_WARN(), ojph::info, _grk_channel_definition::num_channel_descriptions, _grk_palette_data::num_channels, _grk_image::numcomps, and grk_color::palette.
Referenced by read_header().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::compress().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::compress_tile().
|
virtual |
Implements grk::ICodeStream.
References applyColour(), codeStream, grk::CodeStream::decompress(), grk::CodeStream::getAllImages(), and grk::GRK_ERROR().
|
virtual |
decompress tile
Implements grk::ICodeStream.
References applyColour(), codeStream, grk::CodeStream::decompress_tile(), grk::CodeStream::getAllImages(), and grk::GRK_ERROR().
bool grk::FileFormat::default_validation | ( | void | ) |
References grk::ComponentInfo::bpc, codeStream, comps, grk::CodeStream::getStream(), jp2_img_state, grk::JP2_IMG_STATE_NONE, jp2_state, grk::JP2_STATE_NONE, m_procedure_list, m_validation_list, meth, and numcomps.
Referenced by grk::jp2_default_validation().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::j2k_dump().
|
virtual |
Implements grk::ICodeStream.
References codeStream, grk::CodeStream::end_compress(), grk::jp2_exec(), grk::jp2_init_end_header_writing(), and m_procedure_list.
|
virtual |
Reading function used after code stream if necessary.
Implements grk::ICodeStream.
References codeStream, grk::CodeStream::end_decompress(), grk::jp2_exec(), grk::jp2_init_end_header_reading(), and m_procedure_list.
bool grk::FileFormat::exec | ( | std::vector< jp2_procedure > * | procs | ) |
Executes the given procedures on the given codec.
procs | the list of procedures to execute |
Referenced by grk::jp2_exec().
void grk::FileFormat::find_cf | ( | double | x, |
uint32_t * | num, | ||
uint32_t * | den | ||
) |
References MAX.
Referenced by write_res_box().
const BoxReadHandler * grk::FileFormat::find_handler | ( | uint32_t | id | ) |
References grk::jp2_header.
|
static |
References grk_color::channel_definition, color, _grk_channel_definition::descriptions, free_palette_clr(), grk_color::icc_profile_buf, and grk_color::icc_profile_len.
Referenced by ~FileFormat(), and grk::GrkImage::~GrkImage().
|
static |
References _grk_palette_data::channel_prec, _grk_palette_data::channel_sign, color, _grk_palette_data::component_mapping, _grk_palette_data::lut, and grk_color::palette.
Referenced by alloc_palette(), applyColour(), and free_color().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::j2k_get_cstr_index().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::j2k_get_cstr_info().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::get_image().
|
virtual |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::get_image().
const BoxReadHandler * grk::FileFormat::img_find_handler | ( | uint32_t | id | ) |
Finds the image execution function related to the given box id.
id | the id of the handler to fetch. |
References grk::jp2_img_header.
|
virtual |
Implements grk::ICodeStream.
References approx, _grk_channel_description::asoc, _grk_image_comp::association, grk::ComponentInfo::bpc, bpc, brand, C, capture_resolution, _grk_cparameters::capture_resolution, _grk_cparameters::capture_resolution_from_file, grk_color::channel_definition, cl, _grk_channel_description::cn, codeStream, color, _grk_image::color, _grk_image::color_space, comps, _grk_image::comps, _grk_channel_definition::descriptions, display_resolution, _grk_cparameters::display_resolution, enumcs, GRK_CLRSPC_CMYK, GRK_CLRSPC_DEFAULT_CIE, GRK_CLRSPC_EYCC, GRK_CLRSPC_GRAY, GRK_CLRSPC_ICC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, GRK_COMPONENT_TYPE_COLOUR, GRK_ENUM_CLRSPC_CIE, GRK_ENUM_CLRSPC_CMYK, GRK_ENUM_CLRSPC_EYCC, GRK_ENUM_CLRSPC_GRAY, GRK_ENUM_CLRSPC_SRGB, GRK_ENUM_CLRSPC_SYCC, GRK_ENUM_CLRSPC_UNKNOWN, grk::GRK_ERROR(), grk::grk_malloc(), grk::GRK_WARN(), h, has_capture_resolution, has_display_resolution, grk_color::icc_profile_buf, grk_color::icc_profile_len, grk::CodeStream::init_compress(), IPR, _grk_image::iptc_buf, _grk_image::iptc_len, grk::IPTC_UUID, JP2_JP2, meth, minversion, _grk_channel_definition::num_channel_descriptions, numcl, numcomps, _grk_image::numcomps, numUuids, grk_color::palette, _grk_image_comp::prec, precedence, _grk_image_comp::sgnd, _grk_channel_description::typ, _grk_image_comp::type, UnkC, uuids, w, _grk_cparameters::write_capture_resolution, _grk_cparameters::write_capture_resolution_from_file, _grk_cparameters::write_display_resolution, _grk_image::x0, _grk_image::x1, _grk_image::xmp_buf, _grk_image::xmp_len, grk::XMP_UUID, _grk_image::y0, and _grk_image::y1.
|
virtual |
Set up decompressor function handler.
Implements grk::ICodeStream.
References codeStream, color, grk_color::has_colour_specification_box, and grk::CodeStream::init_decompress().
uint32_t grk::FileFormat::read_asoc | ( | AsocBox * | parent, |
uint8_t ** | header_data, | ||
uint32_t * | header_data_size, | ||
uint32_t | asocSize | ||
) |
References grk::AsocBox::children, grk::GRK_ERROR(), JP2_ASOC, JP2_LBL, and JP2_XML.
Referenced by grk::jp2_read_asoc().
bool grk::FileFormat::read_box | ( | FileFormatBox * | box, |
uint8_t * | p_data, | ||
uint32_t * | p_number_bytes_read, | ||
uint64_t | p_box_max_size | ||
) |
References grk::GRK_ERROR(), grk::FileFormatBox::length, and grk::FileFormatBox::type.
Referenced by read_jp2h().
bool grk::FileFormat::read_box_hdr | ( | FileFormatBox * | box, |
uint32_t * | p_number_bytes_read, | ||
BufferedStream * | stream | ||
) |
References grk::BufferedStream::get_number_byte_left(), grk::GRK_ERROR(), grk::FileFormatBox::length, grk::BufferedStream::read(), and grk::FileFormatBox::type.
Referenced by read_header_procedure().
bool grk::FileFormat::read_bpc | ( | uint8_t * | p_bpc_header_data, |
uint32_t | bpc_header_size | ||
) |
References bpc, comps, grk::GRK_ERROR(), grk::grk_read(), grk::GRK_WARN(), and numcomps.
Referenced by grk::jp2_read_bpc().
bool grk::FileFormat::read_channel_definition | ( | uint8_t * | p_cdef_header_data, |
uint32_t | cdef_header_size | ||
) |
bool grk::FileFormat::read_colr | ( | uint8_t * | p_colr_header_data, |
uint32_t | colr_header_size | ||
) |
References approx, color, enumcs, GRK_CUSTOM_CIELAB_SPACE, GRK_DEFAULT_CIELAB_SPACE, GRK_ENUM_CLRSPC_CIE, GRK_ENUM_CLRSPC_CMYK, GRK_ENUM_CLRSPC_EYCC, GRK_ENUM_CLRSPC_GRAY, GRK_ENUM_CLRSPC_SRGB, GRK_ENUM_CLRSPC_SYCC, GRK_ENUM_CLRSPC_UNKNOWN, grk::GRK_ERROR(), grk::GRK_WARN(), grk_color::has_colour_specification_box, grk_color::icc_profile_buf, grk_color::icc_profile_len, meth, and precedence.
Referenced by grk::jp2_read_colr().
bool grk::FileFormat::read_component_mapping | ( | uint8_t * | component_mapping_header_data, |
uint32_t | component_mapping_header_size | ||
) |
References color, _grk_palette_data::component_mapping, grk::GRK_ERROR(), _grk_palette_data::num_channels, and grk_color::palette.
Referenced by grk::jp2_read_component_mapping().
bool grk::FileFormat::read_ftyp | ( | uint8_t * | p_header_data, |
uint32_t | header_size | ||
) |
Reads a a FTYP box - File type box.
p_header_data | the data contained in the FTYP box. |
header_size | the size of the data contained in the FTYP box. |
References brand, cl, grk::grk_calloc(), grk::GRK_ERROR(), jp2_state, grk::JP2_STATE_FILE_TYPE, grk::JP2_STATE_SIGNATURE, minversion, and numcl.
Referenced by grk::jp2_read_ftyp().
|
virtual |
Main header reading function handler.
Implements grk::ICodeStream.
References _grk_header_info::asocs, grk::grk_buffer< T >::buf, capture_resolution, check_color(), grk::AsocBox::children, codeStream, color, display_resolution, enumcs, grk::CodeStream::getCompositeImage(), grk::CodeStream::getHeaderImage(), GRK_CLRSPC_CMYK, GRK_CLRSPC_CUSTOM_CIE, GRK_CLRSPC_DEFAULT_CIE, GRK_CLRSPC_EYCC, GRK_CLRSPC_GRAY, GRK_CLRSPC_ICC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, GRK_CLRSPC_UNKNOWN, GRK_DEFAULT_CIELAB_SPACE, GRK_ENUM_CLRSPC_CIE, GRK_ENUM_CLRSPC_CMYK, GRK_ENUM_CLRSPC_EYCC, GRK_ENUM_CLRSPC_GRAY, GRK_ENUM_CLRSPC_SRGB, GRK_ENUM_CLRSPC_SYCC, grk::GRK_ERROR(), has_capture_resolution, has_display_resolution, grk_color::icc_profile_buf, grk_color::icc_profile_len, grk::IPTC_UUID, grk::jp2_exec(), grk::jp2_read_header_procedure(), grk::grk_buffer< T >::len, m_headerError, m_procedure_list, m_validation_list, meth, _grk_header_info::num_asocs, numUuids, grk::CodeStream::read_header(), root_asoc, serializeAsoc(), uuids, xml, _grk_header_info::xml_data, _grk_header_info::xml_data_len, and grk::XMP_UUID.
bool grk::FileFormat::read_header_procedure | ( | void | ) |
References codeStream, grk::CodeStream::getStream(), GRK_BOX_SIZE, grk::grk_calloc(), grk::GRK_ERROR(), grk::grk_free(), grk::grk_realloc(), grk::GRK_WARN(), grk::jp2_find_handler(), grk::jp2_img_find_handler(), JP2_JP2C, jp2_state, grk::JP2_STATE_CODESTREAM, grk::JP2_STATE_FILE_TYPE, grk::JP2_STATE_HEADER, grk::JP2_STATE_SIGNATURE, grk::JP2_STATE_UNKNOWN, grk::FileFormatBox::length, read_box_hdr(), and grk::FileFormatBox::type.
Referenced by grk::jp2_read_header_procedure().
bool grk::FileFormat::read_ihdr | ( | uint8_t * | p_image_header_data, |
uint32_t | image_header_size | ||
) |
References bpc, C, comps, GRK_ENUM_CLRSPC_CIE, grk::GRK_ERROR(), grk::GRK_WARN(), h, IPR, grk::max_num_components, grk::max_supported_precision, numcomps, UnkC, and w.
Referenced by grk::jp2_read_ihdr().
bool grk::FileFormat::read_jp | ( | uint8_t * | p_header_data, |
uint32_t | header_size | ||
) |
Reads a JPEG 2000 file signature box.
p_header_data | the data contained in the signature box. |
header_size | the size of the data contained in the signature box. |
References grk::GRK_ERROR(), jp2_state, grk::JP2_STATE_NONE, and grk::JP2_STATE_SIGNATURE.
Referenced by grk::jp2_read_jp().
bool grk::FileFormat::read_jp2h | ( | uint8_t * | p_header_data, |
uint32_t | header_size | ||
) |
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. |
header_size | the size of the data contained in the file header box. |
References grk::GRK_ERROR(), JP2_IHDR, grk::jp2_img_find_handler(), jp2_img_state, grk::JP2_IMG_STATE_NONE, grk::JP2_IMG_STATE_UNKNOWN, jp2_state, grk::JP2_STATE_FILE_TYPE, grk::JP2_STATE_HEADER, grk::FileFormatBox::length, read_box(), and grk::FileFormatBox::type.
Referenced by grk::jp2_read_jp2h().
bool grk::FileFormat::read_palette_clr | ( | uint8_t * | p_pclr_header_data, |
uint32_t | pclr_header_size | ||
) |
References alloc_palette(), color, grk::GRK_ERROR(), and grk_color::palette.
Referenced by grk::jp2_read_palette_clr().
bool grk::FileFormat::read_res | ( | uint8_t * | p_resolution_data, |
uint32_t | resolution_size | ||
) |
References calc_res(), capture_resolution, display_resolution, grk::GRK_ERROR(), GRK_RESOLUTION_BOX_SIZE, has_capture_resolution, has_display_resolution, JP2_CAPTURE_RES, JP2_DISPLAY_RES, and read_res_box().
Referenced by grk::jp2_read_res().
bool grk::FileFormat::read_res_box | ( | uint32_t * | id, |
uint32_t * | num, | ||
uint32_t * | den, | ||
uint32_t * | exponent, | ||
uint8_t ** | p_resolution_data | ||
) |
Referenced by read_res().
bool grk::FileFormat::read_uuid | ( | uint8_t * | p_header_data, |
uint32_t | header_size | ||
) |
References grk::GRK_WARN(), JP2_MAX_NUM_UUIDS, numUuids, and uuids.
Referenced by grk::jp2_read_uuid().
bool grk::FileFormat::read_xml | ( | uint8_t * | p_xml_data, |
uint32_t | xml_size | ||
) |
References grk::grk_buffer< T >::alloc(), grk::grk_buffer< T >::buf, grk::grk_buffer< T >::len, and xml.
Referenced by grk::jp2_read_xml().
void grk::FileFormat::serializeAsoc | ( | AsocBox * | asoc, |
grk_asoc * | serial_asocs, | ||
uint32_t * | num_asocs, | ||
uint32_t | level | ||
) |
References grk::grk_buffer< T >::buf, grk::AsocBox::children, GRK_NUM_ASOC_BOXES_SUPPORTED, grk::GRK_WARN(), grk::AsocBox::label, grk_asoc::label, and grk::grk_buffer< T >::len.
Referenced by read_header().
|
virtual |
Sets the given area to be decompressed, relative to image origin.
This function should be called right after grk_read_header and before any tile header reading.
p_image | image |
window | decompress window |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::set_decompress_window().
bool grk::FileFormat::skip_jp2c | ( | void | ) |
References codeStream, grk::CodeStream::getStream(), j2k_codestream_offset, and needs_xl_jp2c_box_length.
Referenced by grk::jp2_skip_jp2c().
|
virtual |
Implements grk::ICodeStream.
References codeStream, _grk_image::comps, grk::CodeStream::getHeaderImage(), grk::jp2_exec(), grk::jp2_init_compress_validation(), grk::jp2_init_header_writing(), m_procedure_list, m_validation_list, needs_xl_jp2c_box_length, grk::CodeStream::start_compress(), and _grk_image_comp::w.
uint8_t * grk::FileFormat::write_bpc | ( | uint32_t * | p_nb_bytes_written | ) |
References bpc, comps, grk::grk_calloc(), grk::grk_write(), JP2_BPCC, and numcomps.
Referenced by grk::jp2_write_bpc().
uint8_t * grk::FileFormat::write_buffer | ( | uint32_t | boxId, |
grk_buf * | buffer, | ||
uint32_t * | p_nb_bytes_written | ||
) |
References grk::grk_buffer< T >::buf, grk::grk_calloc(), and grk::grk_buffer< T >::len.
Referenced by write_xml().
uint8_t * grk::FileFormat::write_channel_definition | ( | uint32_t * | p_nb_bytes_written | ) |
References _grk_channel_description::asoc, grk_color::channel_definition, _grk_channel_description::cn, color, _grk_channel_definition::descriptions, grk::grk_malloc(), JP2_CDEF, _grk_channel_definition::num_channel_descriptions, and _grk_channel_description::typ.
Referenced by grk::jp2_write_channel_definition().
uint8_t * grk::FileFormat::write_colr | ( | uint32_t * | p_nb_bytes_written | ) |
References approx, color, enumcs, grk::grk_calloc(), grk_color::icc_profile_buf, grk_color::icc_profile_len, JP2_COLR, meth, and precedence.
Referenced by grk::jp2_write_colr().
uint8_t * grk::FileFormat::write_component_mapping | ( | uint32_t * | p_nb_bytes_written | ) |
References color, grk::grk_malloc(), JP2_CMAP, _grk_palette_data::num_channels, and grk_color::palette.
Referenced by grk::jp2_write_component_mapping().
bool grk::FileFormat::write_ftyp | ( | void | ) |
References brand, cl, codeStream, grk::CodeStream::getStream(), grk::GRK_ERROR(), JP2_FTYP, minversion, and numcl.
Referenced by grk::jp2_write_ftyp().
uint8_t * grk::FileFormat::write_ihdr | ( | uint32_t * | p_nb_bytes_written | ) |
References bpc, C, grk::grk_calloc(), h, IPR, JP2_IHDR, numcomps, UnkC, and w.
Referenced by grk::jp2_write_ihdr().
bool grk::FileFormat::write_jp | ( | void | ) |
References codeStream, grk::CodeStream::getStream(), and JP2_JP.
Referenced by grk::jp2_write_jp().
bool grk::FileFormat::write_jp2c | ( | void | ) |
References codeStream, grk::CodeStream::getStream(), grk::GRK_ERROR(), j2k_codestream_offset, JP2_JP2C, and needs_xl_jp2c_box_length.
Referenced by grk::jp2_write_jp2c().
bool grk::FileFormat::write_jp2h | ( | void | ) |
References bpc, grk::grk_buffer< T >::buf, capture_resolution, grk_color::channel_definition, codeStream, color, display_resolution, grk::CodeStream::getStream(), grk::GRK_ERROR(), grk::grk_free(), grk::BoxWriteHandler::handler, has_capture_resolution, has_display_resolution, JP2_JP2H, grk::jp2_write_bpc(), grk::jp2_write_channel_definition(), grk::jp2_write_colr(), grk::jp2_write_component_mapping(), grk::jp2_write_ihdr(), grk::jp2_write_palette_clr(), grk::jp2_write_res(), grk::jp2_write_xml(), grk::grk_buffer< T >::len, grk::BoxWriteHandler::m_data, grk_color::palette, and xml.
Referenced by grk::jp2_write_jp2h().
uint8_t * grk::FileFormat::write_palette_clr | ( | uint32_t * | p_nb_bytes_written | ) |
References color, grk::grk_malloc(), JP2_PCLR, and grk_color::palette.
Referenced by grk::jp2_write_palette_clr().
uint8_t * grk::FileFormat::write_res | ( | uint32_t * | p_nb_bytes_written | ) |
References capture_resolution, display_resolution, grk::grk_calloc(), GRK_RESOLUTION_BOX_SIZE, JP2_CAPTURE_RES, JP2_DISPLAY_RES, JP2_RES, and write_res_box().
Referenced by grk::jp2_write_res().
void grk::FileFormat::write_res_box | ( | double | resx, |
double | resy, | ||
uint32_t | box_id, | ||
uint8_t ** | current_res_ptr | ||
) |
References find_cf(), and GRK_RESOLUTION_BOX_SIZE.
Referenced by write_res().
bool grk::FileFormat::write_uuids | ( | void | ) |
References codeStream, grk::CodeStream::getStream(), JP2_UUID, numUuids, and uuids.
Referenced by grk::jp2_write_uuids().
uint8_t * grk::FileFormat::write_xml | ( | uint32_t * | p_nb_bytes_written | ) |
References JP2_XML, write_buffer(), and xml.
Referenced by grk::jp2_write_xml().
uint8_t grk::FileFormat::approx |
Referenced by init_compress(), read_colr(), and write_colr().
uint8_t grk::FileFormat::bpc |
Referenced by init_compress(), read_bpc(), read_ihdr(), write_bpc(), write_ihdr(), and write_jp2h().
uint32_t grk::FileFormat::brand |
Referenced by init_compress(), read_ftyp(), and write_ftyp().
uint8_t grk::FileFormat::C |
Referenced by init_compress(), read_ihdr(), and write_ihdr().
double grk::FileFormat::capture_resolution[2] |
Referenced by FileFormat(), init_compress(), read_header(), read_res(), write_jp2h(), and write_res().
uint32_t* grk::FileFormat::cl |
Referenced by init_compress(), read_ftyp(), write_ftyp(), and ~FileFormat().
CodeStream* grk::FileFormat::codeStream |
handle to the J2K codec
Referenced by compress(), compress_tile(), decompress(), decompress_tile(), default_validation(), dump(), end_compress(), end_decompress(), get_cstr_index(), get_cstr_info(), get_image(), init_compress(), init_decompress(), grk::jp2_dump(), grk::jp2_get_cstr_index(), grk::jp2_get_cstr_info(), read_header(), read_header_procedure(), set_decompress_window(), skip_jp2c(), start_compress(), write_ftyp(), write_jp(), write_jp2c(), write_jp2h(), write_uuids(), and ~FileFormat().
grk_color grk::FileFormat::color |
Referenced by alloc_palette(), apply_channel_definition(), apply_palette_clr(), applyColour(), check_color(), FileFormat(), free_color(), free_palette_clr(), init_compress(), init_decompress(), read_channel_definition(), read_colr(), read_component_mapping(), read_header(), read_palette_clr(), write_channel_definition(), write_colr(), write_component_mapping(), write_jp2h(), write_palette_clr(), and ~FileFormat().
ComponentInfo* grk::FileFormat::comps |
Referenced by default_validation(), init_compress(), read_bpc(), read_ihdr(), write_bpc(), and ~FileFormat().
double grk::FileFormat::display_resolution[2] |
Referenced by FileFormat(), init_compress(), read_header(), read_res(), write_jp2h(), and write_res().
GRK_ENUM_COLOUR_SPACE grk::FileFormat::enumcs |
Referenced by init_compress(), read_colr(), read_header(), and write_colr().
uint32_t grk::FileFormat::h |
Referenced by apply_palette_clr(), init_compress(), read_ihdr(), and write_ihdr().
bool grk::FileFormat::has_capture_resolution |
Referenced by init_compress(), read_header(), read_res(), and write_jp2h().
bool grk::FileFormat::has_display_resolution |
Referenced by init_compress(), read_header(), read_res(), and write_jp2h().
uint8_t grk::FileFormat::IPR |
Referenced by init_compress(), read_ihdr(), and write_ihdr().
uint64_t grk::FileFormat::j2k_codestream_offset |
Referenced by skip_jp2c(), and write_jp2c().
uint32_t grk::FileFormat::jp2_img_state |
Referenced by default_validation(), and read_jp2h().
uint32_t grk::FileFormat::jp2_state |
Referenced by default_validation(), read_ftyp(), read_header_procedure(), read_jp(), and read_jp2h().
bool grk::FileFormat::m_headerError |
Referenced by read_header().
std::vector<jp2_procedure>* grk::FileFormat::m_procedure_list |
list of execution procedures
Referenced by default_validation(), end_compress(), end_decompress(), grk::jp2_init_end_header_reading(), grk::jp2_init_end_header_writing(), grk::jp2_init_header_writing(), read_header(), start_compress(), and ~FileFormat().
std::vector<jp2_procedure>* grk::FileFormat::m_validation_list |
list of validation procedures
Referenced by default_validation(), grk::jp2_init_compress_validation(), read_header(), start_compress(), and ~FileFormat().
uint8_t grk::FileFormat::meth |
Referenced by default_validation(), init_compress(), read_colr(), read_header(), and write_colr().
uint32_t grk::FileFormat::minversion |
Referenced by init_compress(), read_ftyp(), and write_ftyp().
bool grk::FileFormat::needs_xl_jp2c_box_length |
Referenced by skip_jp2c(), start_compress(), and write_jp2c().
uint32_t grk::FileFormat::numcl |
Referenced by init_compress(), read_ftyp(), and write_ftyp().
uint16_t grk::FileFormat::numcomps |
Referenced by default_validation(), init_compress(), read_bpc(), read_ihdr(), write_bpc(), and write_ihdr().
uint32_t grk::FileFormat::numUuids |
Referenced by init_compress(), read_header(), read_uuid(), write_uuids(), and ~FileFormat().
uint8_t grk::FileFormat::precedence |
Referenced by init_compress(), read_colr(), and write_colr().
AsocBox grk::FileFormat::root_asoc |
Referenced by grk::jp2_read_asoc(), and read_header().
uint8_t grk::FileFormat::UnkC |
Referenced by init_compress(), read_ihdr(), and write_ihdr().
UUIDBox grk::FileFormat::uuids[JP2_MAX_NUM_UUIDS] |
Referenced by init_compress(), read_header(), read_uuid(), write_uuids(), and ~FileFormat().
uint32_t grk::FileFormat::w |
Referenced by init_compress(), read_ihdr(), and write_ihdr().
grk_buf grk::FileFormat::xml |
Referenced by read_header(), read_xml(), write_jp2h(), write_xml(), and ~FileFormat().