Grok 12.0.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
grk::FileFormatCompress Class Reference

#include <FileFormatCompress.h>

Inheritance diagram for grk::FileFormatCompress:
grk::FileFormat grk::ICodeStreamCompress

Public Member Functions

 FileFormatCompress (BufferedStream *stream)
 
virtual ~FileFormatCompress ()
 
bool init (grk_cparameters *p_param, GrkImage *p_image)
 
bool start (void)
 
uint64_t compress (grk_plugin_tile *tile)
 
- Public Member Functions inherited from grk::FileFormat
 FileFormat (void)
 
virtual ~FileFormat ()
 
- Public Member Functions inherited from grk::ICodeStreamCompress
virtual ~ICodeStreamCompress ()=default
 

Private Member Functions

bool end (void)
 
grk_colorgetColour (void)
 
void find_cf (double x, uint16_t *num, uint16_t *den)
 
void write_res_box (double resx, double resy, uint32_t box_id, uint8_t **current_res_ptr)
 
uint8_twrite_res (uint32_t *p_nb_bytes_written)
 
uint8_twrite_bpc (uint32_t *p_nb_bytes_written)
 
uint8_twrite_colr (uint32_t *p_nb_bytes_written)
 
uint8_twrite_component_mapping (uint32_t *p_nb_bytes_written)
 
uint8_twrite_palette_clr (uint32_t *p_nb_bytes_written)
 
uint8_twrite_channel_definition (uint32_t *p_nb_bytes_written)
 
bool write_jp2h (void)
 
uint8_twrite_ihdr (uint32_t *p_nb_bytes_written)
 
uint8_twrite_buffer (uint32_t boxId, grk_buf8 *buffer, uint32_t *p_nb_bytes_written)
 
bool write_uuids (void)
 
bool write_ftyp (void)
 
bool write_jp2c (void)
 
bool write_jp (void)
 
bool default_validation (void)
 
void init_header_writing ()
 
void init_end_header_writing (void)
 
void init_compressValidation (void)
 
uint8_twrite_xml (uint32_t *p_nb_bytes_written)
 
bool skip_jp2c (void)
 

Private Attributes

CodeStreamCompresscodeStream
 
bool needs_xl_jp2c_box_length
 
uint64_t j2k_codestream_offset
 
GrkImageinputImage_
 

Additional Inherited Members

- Protected Member Functions inherited from grk::FileFormat
bool exec (std::vector< PROCEDURE_FUNC > *procs)
 
- Protected Attributes inherited from grk::FileFormat
std::vector< PROCEDURE_FUNC > * validation_list_
 list of validation procedures
 
std::vector< PROCEDURE_FUNC > * procedure_list_
 list of execution procedures
 
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_tcl
 
ComponentInfocomps
 
bool has_capture_resolution
 
double capture_resolution [2]
 
bool has_display_resolution
 
double display_resolution [2]
 
grk_buf8 xml
 
UUIDBox uuids [JP2_MAX_NUM_UUIDS]
 
uint32_t numUuids
 

Constructor & Destructor Documentation

◆ FileFormatCompress()

grk::FileFormatCompress::FileFormatCompress ( BufferedStream * stream)

◆ ~FileFormatCompress()

grk::FileFormatCompress::~FileFormatCompress ( )
virtual

Member Function Documentation

◆ compress()

uint64_t grk::FileFormatCompress::compress ( grk_plugin_tile * tile)
virtual

◆ default_validation()

bool grk::FileFormatCompress::default_validation ( void )
private

◆ end()

bool grk::FileFormatCompress::end ( void )
private

◆ find_cf()

void grk::FileFormatCompress::find_cf ( double x,
uint16_t * num,
uint16_t * den )
private

References grk::grk_read().

Referenced by write_res_box().

◆ getColour()

grk_color * grk::FileFormatCompress::getColour ( void )
private

◆ init()

bool grk::FileFormatCompress::init ( grk_cparameters * p_param,
GrkImage * p_image )
virtual

Implements grk::ICodeStreamCompress.

References grk::FileFormat::approx, _grk_channel_description::asoc, _grk_image_comp::association, grk::ComponentInfo::bpc, grk::FileFormat::bpc, grk::FileFormat::brand, grk::FileFormat::C, grk::FileFormat::capture_resolution, _grk_channel_description::channel, _grk_color::channel_definition, grk::FileFormat::cl, codeStream, _grk_image::color_space, grk::FileFormat::comps, _grk_image::comps, _grk_channel_definition::descriptions, grk::FileFormat::display_resolution, grk::FileFormat::enumcs, grk::Logger::error(), getColour(), GRK_CBLKSTY_HT, GRK_CHANNEL_TYPE_COLOUR, GRK_CLRSPC_CMYK, GRK_CLRSPC_DEFAULT_CIE, GRK_CLRSPC_EYCC, GRK_CLRSPC_GRAY, GRK_CLRSPC_ICC, GRK_CLRSPC_SRGB, GRK_CLRSPC_SYCC, 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_image_meta_new(), grk::grk_malloc(), grk_object_ref(), grk::grk_read(), grk::FileFormat::h, grk::FileFormat::has_capture_resolution, grk::FileFormat::has_display_resolution, grk::CodeStreamCompress::init(), inputImage_, grk::FileFormat::IPR, _grk_image_meta::iptc_buf, _grk_image_meta::iptc_len, grk::IPTC_UUID, JP2_JP2, JP2_JPH, grk::Logger::logger_, _grk_image::meta, grk::FileFormat::meth, grk::FileFormat::minversion, grk::MycmsLogErrorHandlerFunction(), _grk_channel_definition::num_channel_descriptions, grk::FileFormat::numcl, grk::FileFormat::numcomps, _grk_image::numcomps, grk::FileFormat::numUuids, _grk_image::obj, _grk_image_comp::prec, grk::FileFormat::precedence, _grk_image_comp::sgnd, _grk_channel_description::typ, _grk_image_comp::type, grk::FileFormat::UnkC, grk::FileFormat::uuids, grk::GrkImage::validateICC(), grk::FileFormat::w, grk::Logger::warn(), _grk_image::x0, _grk_image::x1, _grk_image_meta::xmp_buf, _grk_image_meta::xmp_len, grk::XMP_UUID, _grk_image::y0, and _grk_image::y1.

◆ init_compressValidation()

void grk::FileFormatCompress::init_compressValidation ( void )
private

◆ init_end_header_writing()

void grk::FileFormatCompress::init_end_header_writing ( void )
private

References grk::FileFormat::procedure_list_, and write_jp2c().

Referenced by end().

◆ init_header_writing()

void grk::FileFormatCompress::init_header_writing ( void )
private

◆ skip_jp2c()

bool grk::FileFormatCompress::skip_jp2c ( void )
private

◆ start()

bool grk::FileFormatCompress::start ( void )
virtual

◆ write_bpc()

uint8_t * grk::FileFormatCompress::write_bpc ( uint32_t * p_nb_bytes_written)
private

◆ write_buffer()

uint8_t * grk::FileFormatCompress::write_buffer ( uint32_t boxId,
grk_buf8 * buffer,
uint32_t * p_nb_bytes_written )
private

◆ write_channel_definition()

uint8_t * grk::FileFormatCompress::write_channel_definition ( uint32_t * p_nb_bytes_written)
private

◆ write_colr()

uint8_t * grk::FileFormatCompress::write_colr ( uint32_t * p_nb_bytes_written)
private

◆ write_component_mapping()

uint8_t * grk::FileFormatCompress::write_component_mapping ( uint32_t * p_nb_bytes_written)
private

◆ write_ftyp()

bool grk::FileFormatCompress::write_ftyp ( void )
private

◆ write_ihdr()

uint8_t * grk::FileFormatCompress::write_ihdr ( uint32_t * p_nb_bytes_written)
private

◆ write_jp()

bool grk::FileFormatCompress::write_jp ( void )
private

◆ write_jp2c()

bool grk::FileFormatCompress::write_jp2c ( void )
private

◆ write_jp2h()

bool grk::FileFormatCompress::write_jp2h ( void )
private

◆ write_palette_clr()

uint8_t * grk::FileFormatCompress::write_palette_clr ( uint32_t * p_nb_bytes_written)
private

◆ write_res()

uint8_t * grk::FileFormatCompress::write_res ( uint32_t * p_nb_bytes_written)
private

◆ write_res_box()

void grk::FileFormatCompress::write_res_box ( double resx,
double resy,
uint32_t box_id,
uint8_t ** current_res_ptr )
private

◆ write_uuids()

bool grk::FileFormatCompress::write_uuids ( void )
private

◆ write_xml()

uint8_t * grk::FileFormatCompress::write_xml ( uint32_t * p_nb_bytes_written)
private

Member Data Documentation

◆ codeStream

CodeStreamCompress* grk::FileFormatCompress::codeStream
private

◆ inputImage_

GrkImage* grk::FileFormatCompress::inputImage_
private

◆ j2k_codestream_offset

uint64_t grk::FileFormatCompress::j2k_codestream_offset
private

Referenced by skip_jp2c(), and write_jp2c().

◆ needs_xl_jp2c_box_length

bool grk::FileFormatCompress::needs_xl_jp2c_box_length
private

Referenced by skip_jp2c(), start(), and write_jp2c().


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