Grok
7.6.2
|
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 |
grk_jp2_comps * | comps |
uint64_t | j2k_codestream_offset |
bool | needs_xl_jp2c_box_length |
uint32_t | jp2_state |
uint32_t | jp2_img_state |
grk_jp2_color | color |
bool | has_capture_resolution |
double | capture_resolution [2] |
bool | has_display_resolution |
double | display_resolution [2] |
grk_jp2_buffer | xml |
grk_jp2_uuid | uuids [JP2_MAX_NUM_UUIDS] |
uint32_t | numUuids |
Private Attributes | |
BufferedStream * | m_stream |
Local static functions | |
FileFormat (bool isDecoder, BufferedStream *stream) | |
~FileFormat () | |
bool | read_header (grk_header_info *header_info, grk_image **p_image) |
Main header reading function handler. More... | |
void | init_decompress (grk_dparameters *p_param) |
Set up decompressor function handler. More... | |
bool | set_decompress_window (grk_image *p_image, uint32_t start_x, uint32_t start_y, uint32_t end_x, uint32_t end_y) |
Sets the given area to be decompressed. More... | |
bool | decompress (grk_plugin_tile *tile, grk_image *p_image) |
bool | end_decompress (void) |
Reading function used after code stream if necessary. More... | |
bool | init_compress (grk_cparameters *p_param, grk_image *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 (grk_image *p_image, uint16_t tile_index) |
decompress tile More... | |
void | dump (int32_t flag, FILE *out_stream) |
grk_codestream_info_v2 * | get_cstr_info (void) |
grk_codestream_index * | get_cstr_index (void) |
static void | free_color (grk_jp2_color *color) |
static void | alloc_palette (grk_jp2_color *color, uint8_t num_channels, uint16_t num_entries) |
bool | postDecompress (grk_image *p_image) |
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_jp2_buffer::dealloc(), free_color(), grk::grk_free(), m_procedure_list, m_validation_list, numUuids, uuids, and xml.
|
static |
References color, and _grk_jp2_color::palette.
Referenced by grk::grk_copy_image_header(), and grk::jp2_read_palette_clr().
|
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 codeStream, grk::CodeStream::decompress(), grk::GRK_ERROR(), and postDecompress().
|
virtual |
decompress tile
Implements grk::ICodeStream.
References codeStream, grk::CodeStream::decompress_tile(), grk::GRK_ERROR(), and postDecompress().
|
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.
|
static |
|
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 approx, _grk_channel_description::asoc, _grk_image_comp::association, grk::grk_jp2_comps::bpc, bpc, brand, C, capture_resolution, _grk_cparameters::capture_resolution, _grk_cparameters::capture_resolution_from_file, _grk_jp2_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_jp2_color::icc_profile_buf, _grk_jp2_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_jp2_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_jp2_color::has_colour_specification_box, and grk::CodeStream::init_decompress().
|
private |
|
virtual |
Main header reading function handler.
Implements grk::ICodeStream.
References grk::grk_jp2_buffer::buffer, capture_resolution, codeStream, color, display_resolution, enumcs, 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, _grk_image::has_capture_resolution, has_display_resolution, _grk_jp2_color::icc_profile_buf, _grk_jp2_color::icc_profile_len, grk::IPTC_UUID, grk::jp2_check_color(), grk::jp2_exec(), grk::jp2_init_decompress_validation(), grk::jp2_init_header_reading(), grk::grk_jp2_buffer::len, m_procedure_list, m_validation_list, meth, numUuids, grk::CodeStream::read_header(), uuids, xml, _grk_header_info::xml_data, _grk_header_info::xml_data_len, and grk::XMP_UUID.
|
virtual |
Sets the given area to be decompressed.
This function should be called right after grk_read_header and before any tile header reading.
p_image | image |
start_x | the left position of the rectangle to decompress (in image coordinates). |
start_y | the up position of the rectangle to decompress (in image coordinates). |
end_x | the right position of the rectangle to decompress (in image coordinates). |
end_y | the bottom position of the rectangle to decompress (in image coordinates). |
Implements grk::ICodeStream.
References codeStream, and grk::CodeStream::set_decompress_window().
|
virtual |
Implements grk::ICodeStream.
References codeStream, _grk_image::comps, grk::jp2_exec(), grk::jp2_init_compress_validation(), grk::jp2_init_header_writing(), grk::CodeStream::m_input_image, m_procedure_list, m_validation_list, needs_xl_jp2c_box_length, grk::CodeStream::start_compress(), and _grk_image_comp::w.
uint8_t grk::FileFormat::approx |
Referenced by init_compress(), grk::jp2_read_colr(), and grk::jp2_write_colr().
uint8_t grk::FileFormat::bpc |
Referenced by init_compress(), grk::jp2_read_bpc(), grk::jp2_read_ihdr(), grk::jp2_write_ihdr(), and grk::jp2_write_jp2h().
uint32_t grk::FileFormat::brand |
Referenced by init_compress(), grk::jp2_read_ftyp(), and grk::jp2_write_ftyp().
uint8_t grk::FileFormat::C |
Referenced by init_compress(), grk::jp2_read_ihdr(), and grk::jp2_write_ihdr().
double grk::FileFormat::capture_resolution[2] |
Referenced by FileFormat(), init_compress(), grk::jp2_read_res(), grk::jp2_write_jp2h(), grk::jp2_write_res(), and read_header().
uint32_t* grk::FileFormat::cl |
Referenced by init_compress(), grk::jp2_read_ftyp(), grk::jp2_write_ftyp(), and ~FileFormat().
CodeStream* grk::FileFormat::codeStream |
handle to the J2K codec
Referenced by compress(), compress_tile(), decompress(), decompress_tile(), dump(), end_compress(), end_decompress(), get_cstr_index(), get_cstr_info(), init_compress(), init_decompress(), grk::jp2_default_validation(), grk::jp2_dump(), grk::jp2_get_cstr_index(), grk::jp2_get_cstr_info(), grk::jp2_read_header_procedure(), grk::jp2_skip_jp2c(), grk::jp2_write_ftyp(), grk::jp2_write_jp(), grk::jp2_write_jp2c(), grk::jp2_write_jp2h(), grk::jp2_write_uuids(), read_header(), set_decompress_window(), start_compress(), and ~FileFormat().
grk_jp2_color grk::FileFormat::color |
Referenced by alloc_palette(), FileFormat(), free_color(), init_compress(), init_decompress(), grk::jp2_read_channel_definition(), grk::jp2_read_colr(), grk::jp2_read_component_mapping(), grk::jp2_read_palette_clr(), grk::jp2_write_channel_definition(), grk::jp2_write_colr(), grk::jp2_write_component_mapping(), grk::jp2_write_jp2h(), grk::jp2_write_palette_clr(), postDecompress(), read_header(), and ~FileFormat().
grk_jp2_comps* grk::FileFormat::comps |
Referenced by init_compress(), grk::jp2_default_validation(), grk::jp2_read_bpc(), grk::jp2_read_ihdr(), grk::jp2_write_bpc(), and ~FileFormat().
double grk::FileFormat::display_resolution[2] |
Referenced by FileFormat(), init_compress(), grk::jp2_read_res(), grk::jp2_write_jp2h(), grk::jp2_write_res(), and read_header().
GRK_ENUM_COLOUR_SPACE grk::FileFormat::enumcs |
Referenced by init_compress(), grk::jp2_read_colr(), grk::jp2_write_colr(), and read_header().
uint32_t grk::FileFormat::h |
Referenced by init_compress(), grk::jp2_read_ihdr(), and grk::jp2_write_ihdr().
bool grk::FileFormat::has_capture_resolution |
Referenced by init_compress(), grk::jp2_read_res(), grk::jp2_write_jp2h(), and read_header().
bool grk::FileFormat::has_display_resolution |
Referenced by init_compress(), grk::jp2_read_res(), grk::jp2_write_jp2h(), and read_header().
uint8_t grk::FileFormat::IPR |
Referenced by init_compress(), grk::jp2_read_ihdr(), and grk::jp2_write_ihdr().
uint64_t grk::FileFormat::j2k_codestream_offset |
Referenced by grk::jp2_skip_jp2c(), and grk::jp2_write_jp2c().
uint32_t grk::FileFormat::jp2_img_state |
Referenced by grk::jp2_default_validation(), and grk::jp2_read_jp2h().
uint32_t grk::FileFormat::jp2_state |
std::vector<jp2_procedure>* grk::FileFormat::m_procedure_list |
list of execution procedures
Referenced by end_compress(), end_decompress(), grk::jp2_default_validation(), grk::jp2_init_end_header_reading(), grk::jp2_init_end_header_writing(), grk::jp2_init_header_reading(), grk::jp2_init_header_writing(), read_header(), start_compress(), and ~FileFormat().
|
private |
std::vector<jp2_procedure>* grk::FileFormat::m_validation_list |
list of validation procedures
Referenced by grk::jp2_default_validation(), grk::jp2_init_compress_validation(), read_header(), start_compress(), and ~FileFormat().
uint8_t grk::FileFormat::meth |
Referenced by init_compress(), grk::jp2_default_validation(), grk::jp2_read_colr(), grk::jp2_write_colr(), and read_header().
uint32_t grk::FileFormat::minversion |
Referenced by init_compress(), grk::jp2_read_ftyp(), and grk::jp2_write_ftyp().
bool grk::FileFormat::needs_xl_jp2c_box_length |
Referenced by grk::jp2_skip_jp2c(), grk::jp2_write_jp2c(), and start_compress().
uint32_t grk::FileFormat::numcl |
Referenced by init_compress(), grk::jp2_read_ftyp(), and grk::jp2_write_ftyp().
uint16_t grk::FileFormat::numcomps |
uint32_t grk::FileFormat::numUuids |
Referenced by init_compress(), grk::jp2_read_uuid(), grk::jp2_write_uuids(), read_header(), and ~FileFormat().
uint8_t grk::FileFormat::precedence |
Referenced by init_compress(), grk::jp2_read_colr(), and grk::jp2_write_colr().
uint8_t grk::FileFormat::UnkC |
Referenced by init_compress(), grk::jp2_read_ihdr(), and grk::jp2_write_ihdr().
grk_jp2_uuid grk::FileFormat::uuids[JP2_MAX_NUM_UUIDS] |
Referenced by init_compress(), grk::jp2_read_uuid(), grk::jp2_write_uuids(), read_header(), and ~FileFormat().
uint32_t grk::FileFormat::w |
Referenced by init_compress(), grk::jp2_read_ihdr(), and grk::jp2_write_ihdr().
grk_jp2_buffer grk::FileFormat::xml |
Referenced by grk::jp2_read_xml(), grk::jp2_write_jp2h(), grk::jp2_write_xml(), read_header(), and ~FileFormat().