Grok 10.0.5
FileFormat.h File Reference

The JPEG 2000 file format Reader/Writer (JP2) More...

#include <string>

Go to the source code of this file.

Classes

struct  grk::grk::FileFormatBox
 
struct  grk::grk::ComponentInfo
 
struct  grk::grk::AsocBox
 Association box (defined in ITU 15444-2 Annex M 11.1 ) More...
 
struct  grk::grk::UUIDBox
 
class  grk::grk::FileFormat
 JPEG 2000 file format reader/writer. More...
 

Namespaces

namespace  grk
 Copyright (C) 2016-2023 Grok Image Compression Inc.
 

Macros

#define JP2_JP   0x6a502020
 JPEG 2000 signature box.
 
#define JP2_FTYP   0x66747970
 File type box.
 
#define JP2_JP2H   0x6a703268
 JP2 header box (super-box)
 
#define JP2_IHDR   0x69686472
 Image header box.
 
#define JP2_COLR   0x636f6c72
 Colour specification box.
 
#define JP2_JP2C   0x6a703263
 Contiguous code stream box.
 
#define JP2_PCLR   0x70636c72
 Palette box.
 
#define JP2_CMAP   0x636d6170
 Component Mapping box.
 
#define JP2_CDEF   0x63646566
 Channel Definition box.
 
#define JP2_DTBL   0x6474626c
 Data Reference box.
 
#define JP2_BPCC   0x62706363
 Bits per component box.
 
#define JP2_JP2   0x6a703220
 File type fields.
 
#define JP2_RES   0x72657320
 Resolution box (super-box)
 
#define JP2_CAPTURE_RES   0x72657363
 Capture resolution box.
 
#define JP2_DISPLAY_RES   0x72657364
 Display resolution box.
 
#define JP2_JP2I   0x6a703269
 Intellectual property box.
 
#define JP2_XML   0x786d6c20
 XML box.
 
#define JP2_UUID   0x75756964
 UUID box.
 
#define JP2_UINF   0x75696e66
 UUID info box (super-box)
 
#define JP2_ULST   0x756c7374
 UUID list box.
 
#define JP2_URL   0x75726c20
 Data entry URL box.
 
#define JP2_ASOC   0x61736f63
 Associated data box.
 
#define JP2_LBL   0x6c626c20
 Label box.
 
#define JP2_MAX_NUM_UUIDS   128
 
#define GRK_BOX_SIZE   1024
 
#define GRK_RESOLUTION_BOX_SIZE   (4 + 4 + 10)
 

Enumerations

enum  grk::JP2_STATE {
  grk::JP2_STATE_NONE = 0x0 , grk::JP2_STATE_SIGNATURE = 0x1 , grk::JP2_STATE_FILE_TYPE = 0x2 , grk::JP2_STATE_HEADER = 0x4 ,
  grk::JP2_STATE_CODESTREAM = 0x8 , grk::JP2_STATE_END_CODESTREAM = 0x10 , grk::JP2_STATE_UNKNOWN = 0x7fffffff
}
 

Variables

const uint8_t grk::IPTC_UUID [16]
 
const uint8_t grk::XMP_UUID [16]
 
uint64_t length
 
uint32_t type
 
uint8_t bpc
 
std::string label
 
std::vector< AsocBox * > children
 
uint8_t uuid [16]
 
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 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
 
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
 

Detailed Description

The JPEG 2000 file format Reader/Writer (JP2)

Macro Definition Documentation

◆ GRK_BOX_SIZE

#define GRK_BOX_SIZE   1024

◆ GRK_RESOLUTION_BOX_SIZE

#define GRK_RESOLUTION_BOX_SIZE   (4 + 4 + 10)

◆ JP2_ASOC

#define JP2_ASOC   0x61736f63

Associated data box.

◆ JP2_BPCC

#define JP2_BPCC   0x62706363

Bits per component box.

◆ JP2_CAPTURE_RES

#define JP2_CAPTURE_RES   0x72657363

Capture resolution box.

◆ JP2_CDEF

#define JP2_CDEF   0x63646566

Channel Definition box.

◆ JP2_CMAP

#define JP2_CMAP   0x636d6170

Component Mapping box.

◆ JP2_COLR

#define JP2_COLR   0x636f6c72

Colour specification box.

◆ JP2_DISPLAY_RES

#define JP2_DISPLAY_RES   0x72657364

Display resolution box.

◆ JP2_DTBL

#define JP2_DTBL   0x6474626c

Data Reference box.

◆ JP2_FTYP

#define JP2_FTYP   0x66747970

File type box.

◆ JP2_IHDR

#define JP2_IHDR   0x69686472

Image header box.

◆ JP2_JP

#define JP2_JP   0x6a502020

JPEG 2000 signature box.

◆ JP2_JP2

#define JP2_JP2   0x6a703220

File type fields.

◆ JP2_JP2C

#define JP2_JP2C   0x6a703263

Contiguous code stream box.

◆ JP2_JP2H

#define JP2_JP2H   0x6a703268

JP2 header box (super-box)

◆ JP2_JP2I

#define JP2_JP2I   0x6a703269

Intellectual property box.

◆ JP2_LBL

#define JP2_LBL   0x6c626c20

Label box.

◆ JP2_MAX_NUM_UUIDS

#define JP2_MAX_NUM_UUIDS   128

◆ JP2_PCLR

#define JP2_PCLR   0x70636c72

Palette box.

◆ JP2_RES

#define JP2_RES   0x72657320

Resolution box (super-box)

◆ JP2_UINF

#define JP2_UINF   0x75696e66

UUID info box (super-box)

◆ JP2_ULST

#define JP2_ULST   0x756c7374

UUID list box.

◆ JP2_URL

#define JP2_URL   0x75726c20

Data entry URL box.

◆ JP2_UUID

#define JP2_UUID   0x75756964

UUID box.

◆ JP2_XML

#define JP2_XML   0x786d6c20

XML box.

Variable Documentation

◆ approx

◆ bpc

◆ brand

◆ C

◆ capture_resolution

◆ children

std::vector<AsocBox*> children

◆ cl

◆ comps

ComponentInfo* comps
protected

Referenced by grk::grk::GrkImage::all_components_data_free(), grk::grk::GrkImage::allComponentsSanityCheck(), grk::grk::GrkImage::allocCompositeData(), grk::grk::GrkImage::apply_channel_definition(), grk::grk::GrkImage::apply_palette_clr(), grk::grk::GrkImage::applyICC(), grk::grk::GrkImage::cieLabToRGB(), grk::grk::GrkImage::color_cmyk_to_rgb(), grk::grk::GrkImage::color_esycc_to_rgb(), grk::grk::GrkImage::color_sycc_to_rgb(), grk::grk::GrkImage::componentsEqual(), grk::grk::GrkImage::compositeInterleaved(), grk::grk::GrkImage::compositeInterleaved(), grk::grk::GrkImage::compositePlanar(), grk::grk::GrkImage::convertPrecision(), grk::grk::GrkImage::copyHeader(), grk::grk::FileFormatCompress::default_validation(), grk::grk::GrkImage::execUpsample(), grk::grk::GrkImage::generateCompositeBounds(), grk::grk::PacketIter::generatePrecinctIndex(), grk::grk::PacketIter::genPrecinctInfo(), grk::grk::PacketIter::genPrecinctInfoOPT(), grk::grk::GrkImage::greyToRGB(), grk::grk::PacketTracker::index(), grk::grk::FileFormatCompress::init(), grk::grk::PacketIter::init(), grk::grk::PacketTracker::is_packet_encoded(), grk::grk::GrkImage::isOpacity(), grk::grk::GrkImage::isSubsampled(), grk::grk::PacketIter::next_cprl(), grk::grk::PacketIter::next_cprlOPT(), grk::grk::PacketIter::next_lrcp(), grk::grk::PacketIter::next_pcrlOPT(), grk::grk::PacketIter::next_rlcp(), grk::grk::PacketIter::next_rpcl(), grk::grk::PacketTracker::packet_encoded(), grk::grk::GrkImage::postReadHeader(), grk::grk::PacketIter::precInfoCheck(), grk::grk::GrkImage::print(), grk::grk::PacketIter::printStaticState(), grk::grk::FileFormatDecompress::read_bpc(), grk::grk::FileFormatDecompress::read_ihdr(), grk::grk::GrkImage::subsampleAndReduce(), grk::grk::GrkImage::supportsStripCache(), grk::grk::GrkImage::sycc420_to_rgb(), grk::grk::GrkImage::sycc422_to_rgb(), grk::grk::GrkImage::sycc444_to_rgb(), grk::grk::Tile::Tile(), grk::grk::GrkImage::transferDataFrom(), grk::grk::GrkImage::transferDataTo(), grk::grk::PacketIter::update_dxy(), grk::grk::GrkImage::validateColourSpace(), grk::grk::GrkImage::validateICC(), grk::grk::PacketIter::validatePrecinct(), grk::grk::GrkImage::validateZeroed(), grk::grk::FileFormatCompress::write_bpc(), grk::grk::FileFormat::~FileFormat(), grk::grk::GrkImage::~GrkImage(), grk::grk::PacketIter::~PacketIter(), and grk::grk::Tile::~Tile().

◆ display_resolution

◆ enumcs

◆ h

◆ has_capture_resolution

◆ has_display_resolution

◆ IPR

◆ label

std::string label

◆ length

uint64_t length

◆ meth

◆ minversion

◆ numcl

◆ numcomps

uint16_t numcomps
protected

Referenced by grk::grk::GrkImage::all_components_data_free(), grk::grk::GrkImage::allComponentsSanityCheck(), grk::grk::GrkImage::allocCompositeData(), grk::grk::GrkImage::apply_channel_definition(), grk::grk::GrkImage::apply_palette_clr(), grk::grk::GrkImage::applyICC(), grk::grk::GrkImage::check_color(), grk::grk::GrkImage::cieLabToRGB(), grk::grk::GrkImage::color_cmyk_to_rgb(), grk::grk::GrkImage::color_esycc_to_rgb(), grk::grk::GrkImage::color_sycc_to_rgb(), grk::grk::GrkImage::componentsEqual(), grk::grk::GrkImage::convertPrecision(), grk::grk::GrkImage::convertToRGB(), grk::grk::GrkImage::copyHeader(), grk::grk::FileFormatCompress::default_validation(), grk::grk::CodeStreamDecompress::dump(), grk::grk::CodeStreamDecompress::dump_MH_info(), grk::grk::CodeStreamDecompress::dump_tile_info(), grk::grk::GrkImage::execUpsample(), grk::grk::PacketIter::genPrecinctInfo(), grk::grk::PacketIter::genPrecinctInfoOPT(), grk::grk::PacketTracker::get_buffer_len(), grk::grk::CodeStreamCompress::get_SPCod_SPCoc_size(), grk::grk::CodeStreamCompress::get_SQcd_SQcc_size(), grk::grk::GrkImage::greyToRGB(), grk::grk::FileFormatCompress::init(), grk::grk::PacketIter::init(), grk::grk::PacketTracker::init(), grk::grk::GrkImage::isOpacity(), grk::grk::GrkImage::isSubsampled(), grk::grk::GrkImage::postReadHeader(), grk::grk::GrkImage::print(), grk::grk::FileFormatDecompress::read_bpc(), grk::grk::CodeStreamDecompress::read_cbd(), grk::grk::FileFormatDecompress::read_ihdr(), grk::grk::CodeStreamDecompress::read_qcc(), grk::grk::CodeStreamDecompress::read_SPCod_SPCoc(), grk::grk::CodeStreamDecompress::read_SQcd_SQcc(), grk::grk::GrkImage::subsampleAndReduce(), grk::grk::GrkImage::supportsStripCache(), grk::grk::GrkImage::sycc422_to_rgb(), grk::grk::GrkImage::sycc444_to_rgb(), grk::grk::Tile::Tile(), grk::grk::GrkImage::transferDataFrom(), grk::grk::GrkImage::transferDataTo(), grk::grk::PacketIter::update_dxy(), grk::grk::GrkImage::validateColourSpace(), grk::grk::GrkImage::validateICC(), grk::grk::GrkImage::validateZeroed(), grk::grk::FileFormatCompress::write_bpc(), grk::grk::CodeStreamCompress::write_cbd(), grk::grk::FileFormatCompress::write_ihdr(), grk::grk::CodeStreamCompress::write_qcc(), grk::grk::CodeStreamCompress::write_regions(), grk::grk::CodeStreamCompress::write_SPCod_SPCoc(), and grk::grk::CodeStreamCompress::write_SQcd_SQcc().

◆ numUuids

◆ precedence

◆ procedure_list_

std::vector<PROCEDURE_FUNC>* procedure_list_
protected

list of execution procedures

◆ type

◆ UnkC

◆ uuid

◆ uuids

◆ validation_list_

std::vector<PROCEDURE_FUNC>* validation_list_
protected

list of validation procedures

◆ w

◆ xml