|
Grok 20.3.2
|
#include <FileFormatJP2Compress.h>
Public Member Functions | |
| FileFormatJP2Compress (IStream *stream) | |
| virtual | ~FileFormatJP2Compress () |
| bool | init (grk_cparameters *param, GrkImage *image) override |
| bool | start (void) override |
| uint64_t | compress (grk_plugin_tile *tile) override |
| uint64_t | transcode (IStream *srcStream) |
| Public Member Functions inherited from grk::FileFormatJP2Family | |
| FileFormatJP2Family (IStream *stream) | |
| virtual | ~FileFormatJP2Family () |
| FileFormatJP2Family (const FileFormatJP2Family &)=delete | |
| FileFormatJP2Family & | operator= (const FileFormatJP2Family &)=delete |
| Public Member Functions inherited from grk::ICompressor | |
| virtual | ~ICompressor ()=default |
| virtual uint64_t | compressFrame (GrkImage *image, grk_plugin_tile *tile) |
| virtual bool | finalize (void) |
Protected Member Functions | |
| GrkImage * | getHeaderImage (void) override |
| uint8_t * | write_ihdr (uint32_t *p_nb_bytes_written) |
| uint8_t * | write_colr (uint32_t *p_nb_bytes_written) |
| Protected Member Functions inherited from grk::FileFormatJP2Family | |
| void | init (grk_decompress_parameters *param) |
| bool | readHeaderProcedure () |
| bool | readHeader (grk_header_info *header_info, GrkImage *headerImage) |
| grk_color * | getColour (void) |
| std::string | getBoxName (const Box &box) |
| const FindHandlerInfo | img_find_handler (uint32_t id) |
| Finds the BOX_FUNC related to given box id. | |
| uint32_t | read_asoc (AsocBox *parent, uint8_t **header_data, uint32_t *header_data_size, uint32_t asocSize) |
| bool | read_asoc (uint8_t *header_data, uint32_t header_data_size) |
| void | serializeAsoc (AsocBox *asoc, grk_asoc *serial_asocs, uint32_t *num_asocs, uint32_t level) |
| bool | read_box_header (Box *box, IStream *stream, uint32_t *bytesRead, bool codeStreamBoxWasRead) |
| bool | read_box_header (Box *box, uint8_t *p_data, uint32_t *bytesRead, uint64_t availableBytes) |
| uint8_t * | write_buffer (uint32_t boxId, Buffer8 *buffer, uint32_t *p_nb_bytes_written) |
| bool | write_ftyp (IStream *stream, uint32_t file_type) |
| bool | write_signature (IStream *stream, uint32_t sig) |
| bool | exec (std::vector< PROCEDURE_FUNC > *procs) |
| bool | read_jp2h (uint8_t *headerData, uint32_t headerSize) |
| Reads the Jpeg2000 file Header box - JP2 Header box. | |
| void | skip (uint8_t **headerData, uint32_t *headerSize, uint32_t skip) |
Protected Attributes | |
| CodeStreamCompress * | codeStream = nullptr |
| GrkImage * | inputImage_ = nullptr |
| Protected Attributes inherited from grk::FileFormatJP2Family | |
| std::vector< PROCEDURE_FUNC > * | procedure_list_ |
| list of execution procedures | |
| uint32_t | brand |
| uint32_t | minversion |
| uint32_t | numcl |
| uint32_t * | cl |
| 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 |
| ComponentInfo * | comps |
| bool | has_capture_resolution |
| double | capture_resolution [2] |
| bool | has_display_resolution |
| double | display_resolution [2] |
| Buffer8 | xml |
| Buffer8 | xml_boxes [JP2_MAX_NUM_XML_BOXES] |
| uint32_t | numXmlBoxes |
| bool | io_xml_ |
| std::string | xml_outfile_ |
| Buffer8 | ipr |
| UUIDBox | uuids [JP2_MAX_NUM_UUIDS] |
| uint32_t | numUuids |
| std::unordered_map< uint32_t, BOX_FUNC > | header |
| AsocBox | root_asoc |
| uint32_t | jp2_state |
| bool | headerError_ |
| bool | headerRead_ |
| std::stack< Box > | superBoxes_ |
| std::unordered_map< uint32_t, BOX_FUNC > | img_header |
| IStream * | stream_ |
Private Member Functions | |
| bool | end (void) |
| grk_color * | getColour (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_t * | write_res (uint32_t *p_nb_bytes_written) |
| uint8_t * | write_bpc (uint32_t *p_nb_bytes_written) |
| uint8_t * | write_component_mapping (uint32_t *p_nb_bytes_written) |
| uint8_t * | write_palette_clr (uint32_t *p_nb_bytes_written) |
| uint8_t * | write_channel_definition (uint32_t *p_nb_bytes_written) |
| bool | write_jp2h (void) |
| bool | write_ftyp (void) |
| bool | write_signature (void) |
| bool | write_uuids (void) |
| bool | write_jp2c (void) |
| bool | default_validation (void) |
| void | init_header_writing () |
| void | init_end_header_writing (void) |
| uint8_t * | write_xml (uint32_t *p_nb_bytes_written) |
| bool | write_xml_boxes (void) |
| bool | write_ipr (void) |
| bool | write_asoc_boxes (void) |
| bool | write_rreq (void) |
| bool | skip_jp2c (void) |
| uint32_t | calcAsocSize (AsocBox *asoc) |
| bool | writeAsocBox (IStream *stream, AsocBox *asoc) |
| void | buildAsocTree (const grk_asoc *flat, uint32_t count) |
| uint64_t | transcodeCodestream (IStream *srcStream, uint64_t csStart, uint64_t csLength) |
Private Attributes | |
| bool | needs_xl_jp2c_box_length = false |
| uint64_t | codestream_offset = 0 |
| bool | jpx_branding_ = false |
| bool | write_rreq_ = false |
| uint16_t | rreq_standard_features_ [8] = {} |
| uint8_t | num_rreq_standard_features_ = 0 |
| bool | geoboxes_after_jp2c_ = false |
| bool | transcode_mode_ = false |
| bool | write_tlm_transcode_ = false |
| bool | write_plt_transcode_ = false |
| bool | write_sop_transcode_ = false |
| bool | write_eph_transcode_ = false |
| uint16_t | max_layers_transcode_ = 0 |
| uint8_t | max_res_transcode_ = 0 |
| GRK_PROG_ORDER | transcode_prog_order_ = GRK_PROG_UNKNOWN |
| grk_stream_params | transcode_src_ {} |
|
explicit |
References codeStream, and grk::FileFormatJP2Family::FileFormatJP2Family().
Referenced by grk::FileFormatMJ2Compress::FileFormatMJ2Compress().
|
virtual |
References codeStream, grk::grk_unref(), and inputImage_.
|
private |
References buildAsocTree(), and grk::FileFormatJP2Family::root_asoc.
Referenced by buildAsocTree(), and init().
|
private |
References grk::Buffer< T, A >::buf(), calcAsocSize(), grk::AsocBox::children, grk::AsocBox::label, and grk::Buffer< T, A >::num_elts().
Referenced by calcAsocSize(), and writeAsocBox().
|
overridevirtual |
Implements grk::ICompressor.
Reimplemented in grk::FileFormatMJ2Compress.
References codeStream, and end().
|
private |
|
private |
References end(), grk::FileFormatJP2Family::exec(), init_end_header_writing(), and grk::FileFormatJP2Family::procedure_list_.
Referenced by compress(), end(), and transcode().
|
private |
Referenced by write_res_box().
|
private |
References inputImage_.
Referenced by init(), write_channel_definition(), write_colr(), write_component_mapping(), write_jp2h(), and write_palette_clr().
|
overrideprotectedvirtual |
Implements grk::FileFormatJP2Family.
References codeStream.
|
overridevirtual |
Implements grk::ICompressor.
Reimplemented in grk::FileFormatMJ2Compress.
References grk::FileFormatJP2Family::approx, grk::FileFormatJP2Family::bpc, grk::FileFormatJP2Family::brand, buildAsocTree(), grk::FileFormatJP2Family::C, grk::FileFormatJP2Family::capture_resolution, grk::FileFormatJP2Family::cl, codeStream, grk::FileFormatJP2Family::comps, grk::FileFormatJP2Family::display_resolution, grk::FileFormatJP2Family::enumcs, grk::EXIF_UUID, geoboxes_after_jp2c_, grk::GEOTIFF_UUID, getColour(), GRK_CBLKSTY_HT_ONLY, 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::grk_ref(), grk::grklog, grk::FileFormatJP2Family::h, grk::FileFormatJP2Family::has_capture_resolution, grk::FileFormatJP2Family::has_display_resolution, inputImage_, grk::FileFormatJP2Family::IPR, grk::FileFormatJP2Family::ipr, grk::IPTC_UUID, grk::JP2_JP2, grk::JP2_JPH, grk::JP2_JPX, jpx_branding_, max_layers_transcode_, max_res_transcode_, grk::FileFormatJP2Family::meth, grk::FileFormatJP2Family::minversion, grk::MycmsLogErrorHandlerFunction(), num_rreq_standard_features_, grk::FileFormatJP2Family::numcl, grk::FileFormatJP2Family::numcomps, grk::FileFormatJP2Family::numUuids, grk::FileFormatJP2Family::precedence, rreq_standard_features_, transcode_mode_, transcode_prog_order_, transcode_src_, grk::FileFormatJP2Family::UnkC, grk::FileFormatJP2Family::uuids, grk::FileFormatJP2Family::w, write_eph_transcode_, write_plt_transcode_, write_rreq_, write_sop_transcode_, write_tlm_transcode_, grk::FileFormatJP2Family::xml, and grk::XMP_UUID.
Referenced by grk::FileFormatMJ2Compress::init().
|
private |
References geoboxes_after_jp2c_, init_end_header_writing(), grk::FileFormatJP2Family::procedure_list_, write_asoc_boxes(), write_ipr(), write_jp2c(), write_uuids(), and write_xml_boxes().
Referenced by end(), and init_end_header_writing().
|
private |
References geoboxes_after_jp2c_, init_header_writing(), grk::FileFormatJP2Family::procedure_list_, skip_jp2c(), write_asoc_boxes(), write_ftyp(), write_ipr(), write_jp2h(), write_rreq(), write_rreq_, write_signature(), write_uuids(), and write_xml_boxes().
Referenced by init_header_writing(), and start().
|
private |
References codeStream, codestream_offset, needs_xl_jp2c_box_length, and skip_jp2c().
Referenced by init_header_writing(), and skip_jp2c().
|
overridevirtual |
Implements grk::ICompressor.
Reimplemented in grk::FileFormatMJ2Compress.
References codeStream, default_validation(), grk::FileFormatJP2Family::exec(), init_header_writing(), inputImage_, needs_xl_jp2c_box_length, grk::FileFormatJP2Family::procedure_list_, and transcode_mode_.
| uint64_t grk::FileFormatJP2Compress::transcode | ( | IStream * | srcStream | ) |
References codeStream, end(), GRK_PROG_UNKNOWN, grk::grklog, grk::JP2_JP2C, grk::Box::length, max_layers_transcode_, max_res_transcode_, grk::IStream::read(), grk::FileFormatJP2Family::read_box_header(), grk::IStream::seek(), grk::IStream::skip(), grk::IStream::tell(), transcode_prog_order_, transcodeCodestream(), grk::Box::type, write_eph_transcode_, write_plt_transcode_, write_sop_transcode_, and write_tlm_transcode_.
|
private |
References codeStream, grk::EOC, grk::FileFormatJP2Decompress::getCodingParams(), grk::Codec::getImpl(), grk::PLMarker::getTotalBytesWritten(), grk_decompress(), grk_decompress_init(), grk_decompress_read_header(), grk_object_unref(), GRK_PROG_UNKNOWN, grk::grklog, max_layers_transcode_, max_res_transcode_, grk::PLMarker::pushInit(), grk::PLMarker::pushPL(), grk::IStream::read(), grk::CodingParams::recordPacketLengths_, grk::IStream::seek(), grk::IStream::skip(), grk::SOC, grk::SOD, grk::SOT, grk::IStream::tell(), transcode_prog_order_, transcode_src_, write_eph_transcode_, write_plt_transcode_, and write_sop_transcode_.
Referenced by transcode().
|
private |
References codeStream, grk::FileFormatJP2Family::root_asoc, write_asoc_boxes(), and writeAsocBox().
Referenced by init_end_header_writing(), init_header_writing(), and write_asoc_boxes().
|
private |
References grk::FileFormatJP2Family::bpc, grk::FileFormatJP2Family::comps, grk::grk_calloc(), grk::grk_write(), grk::JP2_BPCC, and grk::FileFormatJP2Family::numcomps.
Referenced by write_jp2h().
|
private |
References getColour(), grk::grk_malloc(), grk::grk_write(), and grk::JP2_CDEF.
Referenced by write_jp2h().
|
protected |
|
private |
References getColour(), grk::grk_malloc(), grk::grk_write(), and grk::JP2_CMAP.
Referenced by write_jp2h().
|
private |
References codeStream, grk::JP2_FTYP, and grk::FileFormatJP2Family::write_ftyp().
Referenced by init_header_writing().
|
protected |
References grk::FileFormatJP2Family::bpc, grk::FileFormatJP2Family::C, grk::grk_calloc(), grk::grk_write(), grk::FileFormatJP2Family::h, grk::FileFormatJP2Family::IPR, grk::JP2_IHDR, grk::FileFormatJP2Family::numcomps, grk::FileFormatJP2Family::UnkC, and grk::FileFormatJP2Family::w.
Referenced by write_jp2h(), and grk::FileFormatMJ2Compress::write_smj2().
|
private |
References codeStream, grk::grk_free(), grk::FileFormatJP2Family::ipr, grk::JP2_JP2I, and grk::FileFormatJP2Family::write_buffer().
Referenced by init_end_header_writing(), and init_header_writing().
|
private |
References codeStream, codestream_offset, grk::grklog, grk::JP2_JP2C, and needs_xl_jp2c_box_length.
Referenced by init_end_header_writing().
|
private |
References grk::FileFormatJP2Family::bpc, grk::FileFormatJP2Family::capture_resolution, codeStream, grk::BoxWriteHandler::data_, grk::FileFormatJP2Family::display_resolution, getColour(), grk::grk_free(), grk::grklog, grk::BoxWriteHandler::handler, grk::FileFormatJP2Family::has_capture_resolution, grk::FileFormatJP2Family::has_display_resolution, inputImage_, grk::JP2_JP2H, write_bpc(), write_channel_definition(), write_colr(), write_component_mapping(), write_ihdr(), write_palette_clr(), and write_res().
Referenced by init_header_writing().
|
private |
References getColour(), grk::grk_malloc(), grk::grk_write(), and grk::JP2_PCLR.
Referenced by write_jp2h().
|
private |
|
private |
References find_cf(), GRK_RESOLUTION_BOX_SIZE, and grk::grk_write().
Referenced by write_res().
|
private |
References codeStream, grk::JP2_RREQ, num_rreq_standard_features_, rreq_standard_features_, write_rreq(), and write_rreq_.
Referenced by init_header_writing(), and write_rreq().
|
private |
References codeStream, grk::JP2_JP, and grk::FileFormatJP2Family::write_signature().
Referenced by init_header_writing().
|
private |
References codeStream, grk::JP2_UUID, grk::FileFormatJP2Family::numUuids, and grk::FileFormatJP2Family::uuids.
Referenced by init_end_header_writing(), and init_header_writing().
|
private |
References grk::JP2_XML, grk::FileFormatJP2Family::write_buffer(), and grk::FileFormatJP2Family::xml.
Referenced by write_xml_boxes().
|
private |
References grk::Buffer< T, A >::buf(), calcAsocSize(), grk::AsocBox::children, grk::JP2_ASOC, grk::JP2_LBL, grk::JP2_XML, grk::AsocBox::label, grk::Buffer< T, A >::num_elts(), grk::t1_t2::IStreamWriter::write(), writeAsocBox(), and grk::IStream::writeBytes().
Referenced by write_asoc_boxes(), and writeAsocBox().
|
protected |
Referenced by compress(), grk::FileFormatMJ2Compress::compress(), grk::FileFormatMJ2Compress::compressFrame(), default_validation(), FileFormatJP2Compress(), grk::FileFormatMJ2Compress::finalize(), getHeaderImage(), init(), skip_jp2c(), start(), grk::FileFormatMJ2Compress::start(), transcode(), transcodeCodestream(), write_asoc_boxes(), write_ftyp(), write_ipr(), write_jp2c(), write_jp2h(), grk::FileFormatMJ2Compress::write_mdat_finalize(), grk::FileFormatMJ2Compress::write_mdat_header(), grk::FileFormatMJ2Compress::write_mj2_ftyp(), grk::FileFormatMJ2Compress::write_mj2_signature(), grk::FileFormatMJ2Compress::write_moov(), write_rreq(), write_signature(), grk::FileFormatMJ2Compress::write_smj2(), grk::FileFormatMJ2Compress::write_tkhd(), write_uuids(), write_xml_boxes(), and ~FileFormatJP2Compress().
|
private |
Referenced by skip_jp2c(), and write_jp2c().
|
private |
Referenced by init(), init_end_header_writing(), and init_header_writing().
|
protected |
Referenced by getColour(), init(), start(), write_jp2h(), and ~FileFormatJP2Compress().
|
private |
Referenced by init().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by skip_jp2c(), start(), and write_jp2c().
|
private |
Referenced by init(), and write_rreq().
|
private |
Referenced by init(), and write_rreq().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by init(), and transcodeCodestream().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by init(), init_header_writing(), and write_rreq().
|
private |
Referenced by init(), transcode(), and transcodeCodestream().
|
private |
Referenced by init(), and transcode().