Grok  7.6.2
Public Attributes | Private Attributes | List of all members
grk::FileFormat Struct Reference

JPEG 2000 file format reader/writer. More...

#include <FileFormat.h>

Inheritance diagram for grk::FileFormat:
grk::ICodeStream

Public Attributes

CodeStreamcodeStream
 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_compscomps
 
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

BufferedStreamm_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_v2get_cstr_info (void)
 
grk_codestream_indexget_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

- Public Member Functions inherited from grk::ICodeStream
virtual ~ICodeStream ()
 

Detailed Description

JPEG 2000 file format reader/writer.

Constructor & Destructor Documentation

◆ FileFormat()

grk::FileFormat::FileFormat ( bool  isDecoder,
BufferedStream stream 
)

◆ ~FileFormat()

grk::FileFormat::~FileFormat ( )

Member Function Documentation

◆ alloc_palette()

void grk::FileFormat::alloc_palette ( grk_jp2_color color,
uint8_t  num_channels,
uint16_t  num_entries 
)
static

◆ compress()

bool grk::FileFormat::compress ( grk_plugin_tile tile)
virtual

◆ compress_tile()

bool grk::FileFormat::compress_tile ( uint16_t  tile_index,
uint8_t *  p_data,
uint64_t  data_size 
)
virtual

◆ decompress()

bool grk::FileFormat::decompress ( grk_plugin_tile tile,
grk_image p_image 
)
virtual

◆ decompress_tile()

bool grk::FileFormat::decompress_tile ( grk_image p_image,
uint16_t  tile_index 
)
virtual

◆ dump()

void grk::FileFormat::dump ( int32_t  flag,
FILE *  out_stream 
)
virtual

Implements grk::ICodeStream.

References codeStream, and grk::j2k_dump().

◆ end_compress()

bool grk::FileFormat::end_compress ( void  )
virtual

◆ end_decompress()

bool grk::FileFormat::end_decompress ( void  )
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.

◆ free_color()

void grk::FileFormat::free_color ( grk_jp2_color color)
static

◆ get_cstr_index()

grk_codestream_index * grk::FileFormat::get_cstr_index ( void  )
virtual

◆ get_cstr_info()

grk_codestream_info_v2 * grk::FileFormat::get_cstr_info ( void  )
virtual

◆ init_compress()

bool grk::FileFormat::init_compress ( grk_cparameters p_param,
grk_image p_image 
)
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.

◆ init_decompress()

void grk::FileFormat::init_decompress ( grk_dparameters p_param)
virtual

Set up decompressor function handler.

Implements grk::ICodeStream.

References codeStream, color, _grk_jp2_color::has_colour_specification_box, and grk::CodeStream::init_decompress().

◆ postDecompress()

bool grk::FileFormat::postDecompress ( grk_image p_image)
private

◆ read_header()

bool grk::FileFormat::read_header ( grk_header_info header_info,
grk_image **  p_image 
)
virtual

◆ set_decompress_window()

bool grk::FileFormat::set_decompress_window ( grk_image p_image,
uint32_t  start_x,
uint32_t  start_y,
uint32_t  end_x,
uint32_t  end_y 
)
virtual

Sets the given area to be decompressed.

This function should be called right after grk_read_header and before any tile header reading.

Parameters
p_imageimage
start_xthe left position of the rectangle to decompress (in image coordinates).
start_ythe up position of the rectangle to decompress (in image coordinates).
end_xthe right position of the rectangle to decompress (in image coordinates).
end_ythe bottom position of the rectangle to decompress (in image coordinates).
Returns
true if the area could be set.

Implements grk::ICodeStream.

References codeStream, and grk::CodeStream::set_decompress_window().

◆ start_compress()

bool grk::FileFormat::start_compress ( void  )
virtual

Member Data Documentation

◆ approx

uint8_t grk::FileFormat::approx

◆ bpc

uint8_t grk::FileFormat::bpc

◆ brand

uint32_t grk::FileFormat::brand

◆ C

uint8_t grk::FileFormat::C

◆ capture_resolution

double grk::FileFormat::capture_resolution[2]

◆ cl

uint32_t* grk::FileFormat::cl

◆ codeStream

CodeStream* grk::FileFormat::codeStream

◆ color

grk_jp2_color grk::FileFormat::color

◆ comps

grk_jp2_comps* grk::FileFormat::comps

◆ display_resolution

double grk::FileFormat::display_resolution[2]

◆ enumcs

GRK_ENUM_COLOUR_SPACE grk::FileFormat::enumcs

◆ h

uint32_t grk::FileFormat::h

◆ has_capture_resolution

bool grk::FileFormat::has_capture_resolution

◆ has_display_resolution

bool grk::FileFormat::has_display_resolution

◆ IPR

uint8_t grk::FileFormat::IPR

◆ j2k_codestream_offset

uint64_t grk::FileFormat::j2k_codestream_offset

◆ jp2_img_state

uint32_t grk::FileFormat::jp2_img_state

◆ jp2_state

uint32_t grk::FileFormat::jp2_state

◆ m_procedure_list

std::vector<jp2_procedure>* grk::FileFormat::m_procedure_list

◆ m_stream

BufferedStream* grk::FileFormat::m_stream
private

◆ m_validation_list

std::vector<jp2_procedure>* grk::FileFormat::m_validation_list

◆ meth

uint8_t grk::FileFormat::meth

◆ minversion

uint32_t grk::FileFormat::minversion

◆ needs_xl_jp2c_box_length

bool grk::FileFormat::needs_xl_jp2c_box_length

◆ numcl

uint32_t grk::FileFormat::numcl

◆ numcomps

uint16_t grk::FileFormat::numcomps

◆ numUuids

uint32_t grk::FileFormat::numUuids

◆ precedence

uint8_t grk::FileFormat::precedence

◆ UnkC

uint8_t grk::FileFormat::UnkC

◆ uuids

grk_jp2_uuid grk::FileFormat::uuids[JP2_MAX_NUM_UUIDS]

◆ w

uint32_t grk::FileFormat::w

◆ xml

grk_jp2_buffer grk::FileFormat::xml

The documentation for this struct was generated from the following files: