Grok 10.0.5
CodingParams.h File Reference
#include "Quantizer.h"

Go to the source code of this file.

Classes

struct  grk::grk::TileComponentCodingParams
 Tile-component coding parameters. More...
 
struct  grk::grk::grk_mct_data
 MCT data. More...
 
struct  grk::grk::grk_simple_mcc_decorrelation_data
 MCC decorrelation data. More...
 
struct  grk::grk::TileCodingParams
 Tile coding parameters : this structure is used to store coding/decoding parameters common to all tiles (information like COD, COC in main header) More...
 
struct  grk::grk::EncodingParams
 
struct  grk::grk::DecodingParams
 
struct  grk::grk::CodingParams
 Coding parameters. More...
 
struct  grk::grk::DecompressorState
 
struct  grk::grk::CompressorState
 

Namespaces

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

Enumerations

enum  grk::J2K_MCT_ELEMENT_TYPE { grk::MCT_TYPE_INT16 = 0 , grk::MCT_TYPE_INT32 = 1 , grk::MCT_TYPE_FLOAT = 2 , grk::MCT_TYPE_DOUBLE = 3 }
 Type of elements storing in the MCT data. More...
 
enum  grk::J2K_MCT_ARRAY_TYPE { grk::MCT_TYPE_DEPENDENCY = 0 , grk::MCT_TYPE_DECORRELATION = 1 , grk::MCT_TYPE_OFFSET = 2 }
 Type of MCT array. More...
 
enum  grk::DECOMPRESS_STATE {
  grk::DECOMPRESS_STATE_NONE = 0x0000 , grk::DECOMPRESS_STATE_MH_SOC = 0x0001 , grk::DECOMPRESS_STATE_MH_SIZ = 0x0002 , grk::DECOMPRESS_STATE_MH = 0x0004 ,
  grk::DECOMPRESS_STATE_TPH = 0x0008 , grk::DECOMPRESS_STATE_TPH_SOT = 0x0010 , grk::DECOMPRESS_STATE_DATA = 0x0020 , grk::DECOMPRESS_STATE_EOC = 0x0040 ,
  grk::DECOMPRESS_STATE_NO_EOC = 0x0080
}
 Status of decoding process when decoding main header or tile header. More...
 

Variables

uint8_t csty
 coding style
 
uint8_t numresolutions
 number of resolutions
 
uint8_t cblkw
 log2(code-blocks width)
 
uint8_t cblkh
 log2(code-blocks height)
 
uint8_t cblk_sty
 code-block mode
 
uint8_t qmfbid
 discrete wavelet transform identifier
 
bool quantizationMarkerSet
 
bool fromQCC
 
bool fromTileHeader
 
uint8_t qntsty
 quantisation style
 
grk_stepsize stepsizes [GRK_J2K_MAXBANDS]
 stepsizes used for quantization
 
uint8_t numStepSizes
 
uint8_t numgbits
 number of guard bits
 
uint8_t roishift
 Region Of Interest shift.
 
uint32_t precWidthExp [GRK_J2K_MAXRLVLS]
 precinct width (power of 2 exponent, < 16)
 
uint32_t precHeightExp [GRK_J2K_MAXRLVLS]
 precinct height (power of 2 exponent, < 16)
 
int32_t dc_level_shift_
 the dc_level_shift
 
J2K_MCT_ELEMENT_TYPE element_type_
 
J2K_MCT_ARRAY_TYPE array_type_
 
uint32_t index_
 
uint8_t * data_
 
uint32_t data_size_
 
uint32_t nb_comps_
 
grk_mct_data * decorrelation_array_
 
grk_mct_data * offset_array_
 
uint32_t is_irreversible_
 
GRK_PROG_ORDER prg
 progression order
 
uint16_t numlayers
 number of layers
 
uint16_t numLayersToDecompress
 
uint8_t mct
 multi-component transform identifier
 
double rates [maxCompressLayersGRK]
 rates of layers
 
uint32_t numpocs
 number of progression order changes
 
grk_progression progressionOrderChange [GRK_J2K_MAXRLVLS]
 progression order changes
 
uint32_t ppt_markers_count
 number of ppt markers (reserved size)
 
grk_ppx * ppt_markers
 ppt markers data (table indexed by Zppt)
 
uint8_t * ppt_data
 packet header store there for future use in t2_decode_packet
 
uint8_t * ppt_buffer
 used to keep a track of the allocated memory
 
size_t ppt_data_size
 Number of bytes stored inside ppt_data.
 
size_t ppt_len
 size of ppt_data
 
double distortion [maxCompressLayersGRK]
 fixed_quality
 
uint32_t main_qcd_qntsty
 
uint32_t main_qcd_numStepSizes
 
TileComponentCodingParams * tccps
 tile-component coding parameters
 
uint8_t tilePartCounter_
 
uint8_t numTileParts_
 number of tile parts for the tile.
 
SparseBuffer * compressedTileData_
 
double * mct_norms
 compressing norms
 
float * mct_decoding_matrix_
 the mct decoding matrix
 
float * mct_coding_matrix_
 the mct coding matrix
 
grk_mct_data * mct_records_
 mct records
 
uint32_t nb_mct_records_
 the number of mct records.
 
uint32_t nb_max_mct_records_
 the max number of mct records.
 
grk_simple_mcc_decorrelation_data * mcc_records_
 mcc records
 
uint32_t nb_mcc_records_
 the number of mct records.
 
uint32_t nb_max_mcc_records_
 the max number of mct records.
 
bool cod
 If cod == true --> there was a COD marker for the present tile.
 
bool ppt
 If ppt == true --> there was a PPT marker for the present tile.
 
Quantizer * qcd_
 
bool ht_
 
size_t max_comp_size_
 Maximum rate for each component.
 
uint32_t newTilePartProgressionPosition
 Position of tile part flag in progression order.
 
uint8_t newTilePartProgressionDivider_
 Flag determining tile part generation.
 
bool allocationByRateDistortion_
 allocation by rate/distortion
 
bool allocationByFixedQuality_
 allocation by fixed_quality
 
bool enableTilePartGeneration_
 Enabling Tile part generation.
 
bool writePLT
 
bool writeTLM
 
uint32_t rateControlAlgorithm
 
uint8_t reduce_
 if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decompressed to the full resolution
 
uint16_t layer_
 if != 0, then only the first "layer" layers are decompressed; if == 0 or not used, all the quality layers are decompressed
 
uint32_t randomAccessFlags_
 
uint16_t grk::CodingParams::rsiz
 Rsiz.
 
uint32_t grk::CodingParams::pcap
 
uint16_t grk::CodingParams::ccap [32]
 
uint32_t grk::CodingParams::tx0
 XTOsiz.
 
uint32_t grk::CodingParams::ty0
 YTOsiz.
 
uint32_t grk::CodingParams::t_width
 XTsiz.
 
uint32_t grk::CodingParams::t_height
 YTsiz.
 
size_t grk::CodingParams::num_comments
 comments
 
char * grk::CodingParams::comment [GRK_NUM_COMMENTS_SUPPORTED]
 
uint16_t grk::CodingParams::comment_len [GRK_NUM_COMMENTS_SUPPORTED]
 
bool grk::CodingParams::isBinaryComment [GRK_NUM_COMMENTS_SUPPORTED]
 
uint16_t grk::CodingParams::t_grid_width
 number of tiles in width
 
uint16_t grk::CodingParams::t_grid_height
 number of tiles in height
 
PPMMarker * grk::CodingParams::ppm_marker
 
TileCodingParams * grk::CodingParams::tcps
 tile coding parameters
 
union { 
 
   DecodingParams   grk::CodingParams::dec_ 
 
   EncodingParams   grk::CodingParams::enc_ 
 
grk::CodingParams::coding_params_ 
 
TileLengthMarkersgrk::CodingParams::tlm_markers
 
PLMarkerMgrgrk::CodingParams::plm_markers
 
bool grk::CodingParams::wholeTileDecompress_
 
TileCodingParams * default_tcp_
 
TileSet tilesToDecompress_
 
uint64_t lastSotReadPosition
 Position of the last SOT marker read.
 
bool lastTilePartInCodeStream
 Indicate that the current tile-part is assumed to be the last tile part of the code stream.
 
uint16_t state_
 Decoder state: used to indicate in which part of the code stream the decompressor is (main header, tile header, end)
 
uint16_t total_tile_parts_
 Total num of tile parts in whole image = num tiles* num tileparts in each tile.
 

Variable Documentation

◆ allocationByFixedQuality_

bool allocationByFixedQuality_

allocation by fixed_quality

◆ allocationByRateDistortion_

bool allocationByRateDistortion_

allocation by rate/distortion

◆ array_type_

J2K_MCT_ARRAY_TYPE array_type_

◆ cblk_sty

uint8_t cblk_sty

code-block mode

Referenced by grk::grk::PacketParser::initSegment().

◆ cblkh

uint8_t cblkh

log2(code-blocks height)

◆ cblkw

uint8_t cblkw

log2(code-blocks width)

◆ ccap

uint16_t grk::CodingParams::ccap[32]

◆ cod

bool cod

If cod == true --> there was a COD marker for the present tile.

Referenced by grk::grk::TileCodingParams::copy().

◆ [union]

union { ... } grk::CodingParams::coding_params_

◆ comment

char* grk::CodingParams::comment[GRK_NUM_COMMENTS_SUPPORTED]

◆ comment_len

uint16_t grk::CodingParams::comment_len[GRK_NUM_COMMENTS_SUPPORTED]

◆ compressedTileData_

SparseBuffer* compressedTileData_

◆ csty

uint8_t csty

coding style

◆ data_

◆ data_size_

uint32_t data_size_

◆ dc_level_shift_

int32_t dc_level_shift_

the dc_level_shift

◆ dec_

DecodingParams grk::CodingParams::dec_

◆ decorrelation_array_

grk_mct_data* decorrelation_array_

◆ default_tcp_

TileCodingParams* default_tcp_

◆ distortion

double distortion[maxCompressLayersGRK]

◆ element_type_

J2K_MCT_ELEMENT_TYPE element_type_

◆ enableTilePartGeneration_

bool enableTilePartGeneration_

Enabling Tile part generation.

◆ enc_

EncodingParams grk::CodingParams::enc_

◆ fromQCC

◆ fromTileHeader

bool fromTileHeader

◆ ht_

◆ index_

uint32_t index_

◆ is_irreversible_

uint32_t is_irreversible_

◆ isBinaryComment

bool grk::CodingParams::isBinaryComment[GRK_NUM_COMMENTS_SUPPORTED]

◆ lastSotReadPosition

uint64_t lastSotReadPosition

Position of the last SOT marker read.

◆ lastTilePartInCodeStream

bool lastTilePartInCodeStream

Indicate that the current tile-part is assumed to be the last tile part of the code stream.

This is useful in the case when PSot is equal to zero. The SOT length will be computed in the SOD reader function.

Referenced by grk::grk::TileProcessor::setTilePartDataLength().

◆ layer_

uint16_t layer_

if != 0, then only the first "layer" layers are decompressed; if == 0 or not used, all the quality layers are decompressed

◆ main_qcd_numStepSizes

uint32_t main_qcd_numStepSizes

◆ main_qcd_qntsty

uint32_t main_qcd_qntsty

◆ max_comp_size_

size_t max_comp_size_

Maximum rate for each component.

If == 0, component size limitation is not considered

◆ mcc_records_

grk_simple_mcc_decorrelation_data* mcc_records_

◆ mct

uint8_t mct

multi-component transform identifier

◆ mct_coding_matrix_

float* mct_coding_matrix_

the mct coding matrix

Referenced by grk::grk::TileCodingParams::~TileCodingParams().

◆ mct_decoding_matrix_

float* mct_decoding_matrix_

◆ mct_norms

◆ mct_records_

grk_mct_data* mct_records_

◆ nb_comps_

uint32_t nb_comps_

◆ nb_max_mcc_records_

uint32_t nb_max_mcc_records_

the max number of mct records.

Referenced by grk::grk::TileCodingParams::copy().

◆ nb_max_mct_records_

uint32_t nb_max_mct_records_

the max number of mct records.

Referenced by grk::grk::TileCodingParams::copy().

◆ nb_mcc_records_

uint32_t nb_mcc_records_

the number of mct records.

◆ nb_mct_records_

uint32_t nb_mct_records_

the number of mct records.

Referenced by grk::grk::TileCodingParams::~TileCodingParams().

◆ newTilePartProgressionDivider_

uint8_t newTilePartProgressionDivider_

Flag determining tile part generation.

◆ newTilePartProgressionPosition

◆ num_comments

size_t grk::CodingParams::num_comments

comments

◆ numgbits

uint8_t numgbits

number of guard bits

Referenced by grk::grk::CodeStreamCompress::init().

◆ numlayers

◆ numLayersToDecompress

uint16_t numLayersToDecompress

◆ numpocs

uint32_t numpocs

number of progression order changes

Referenced by grk::grk::TileCodingParams::getNumProgressions(), and grk::grk::TileCodingParams::hasPoc().

◆ numresolutions

◆ numStepSizes

uint8_t numStepSizes

◆ numTileParts_

uint8_t numTileParts_

number of tile parts for the tile.

◆ offset_array_

grk_mct_data* offset_array_

◆ pcap

uint32_t grk::CodingParams::pcap

◆ plm_markers

PLMarkerMgr* grk::CodingParams::plm_markers

◆ ppm_marker

PPMMarker* grk::CodingParams::ppm_marker

◆ ppt

bool ppt

If ppt == true --> there was a PPT marker for the present tile.

Referenced by grk::grk::TileCodingParams::copy().

◆ ppt_buffer

uint8_t* ppt_buffer

used to keep a track of the allocated memory

Referenced by grk::grk::TileCodingParams::~TileCodingParams().

◆ ppt_data

uint8_t* ppt_data

packet header store there for future use in t2_decode_packet

Referenced by grk::grk::TileCodingParams::copy().

◆ ppt_data_size

size_t ppt_data_size

Number of bytes stored inside ppt_data.

Referenced by grk::grk::CodeStreamDecompress::merge_ppt().

◆ ppt_len

size_t ppt_len

size of ppt_data

◆ ppt_markers

grk_ppx* ppt_markers

ppt markers data (table indexed by Zppt)

Referenced by grk::grk::TileCodingParams::~TileCodingParams().

◆ ppt_markers_count

uint32_t ppt_markers_count

number of ppt markers (reserved size)

Referenced by grk::grk::TileCodingParams::~TileCodingParams().

◆ precHeightExp

◆ precWidthExp

◆ prg

progression order

◆ progressionOrderChange

grk_progression progressionOrderChange[GRK_J2K_MAXRLVLS]

progression order changes

Referenced by grk::grk::TileCodingParams::TileCodingParams().

◆ qcd_

◆ qmfbid

uint8_t qmfbid

discrete wavelet transform identifier

Referenced by grk::grk::WaveletFwdImpl::compress(), grk::grk::T1::compress_cblk(), and grk::grk::T1::getwmsedec().

◆ qntsty

uint8_t qntsty

quantisation style

Referenced by grk::grk::CodeStreamDecompress::read_SQcd_SQcc().

◆ quantizationMarkerSet

bool quantizationMarkerSet

◆ randomAccessFlags_

uint32_t randomAccessFlags_

◆ rateControlAlgorithm

uint32_t rateControlAlgorithm

◆ rates

double rates[maxCompressLayersGRK]

◆ reduce_

uint8_t reduce_

if != 0, then original dimension divided by 2^(reduce); if == 0 or not used, image is decompressed to the full resolution

◆ roishift

uint8_t roishift

Region Of Interest shift.

◆ rsiz

uint16_t grk::CodingParams::rsiz

Rsiz.

◆ state_

uint16_t state_
private

Decoder state: used to indicate in which part of the code stream the decompressor is (main header, tile header, end)

Referenced by grk::grk::DecompressorState::andState(), grk::grk::DecompressorState::getState(), grk::grk::DecompressorState::orState(), and grk::grk::DecompressorState::setState().

◆ stepsizes

grk_stepsize stepsizes[GRK_J2K_MAXBANDS]

stepsizes used for quantization

◆ t_grid_height

uint16_t grk::CodingParams::t_grid_height

number of tiles in height

◆ t_grid_width

uint16_t grk::CodingParams::t_grid_width

number of tiles in width

◆ t_height

uint32_t grk::CodingParams::t_height

YTsiz.

◆ t_width

uint32_t grk::CodingParams::t_width

XTsiz.

◆ tccps

TileComponentCodingParams* tccps

tile-component coding parameters

Referenced by grk::grk::TileCodingParams::copy(), and grk::grk::TileCodingParams::~TileCodingParams().

◆ tcps

TileCodingParams* grk::CodingParams::tcps

tile coding parameters

◆ tilePartCounter_

◆ tilesToDecompress_

◆ tlm_markers

TileLengthMarkers* grk::CodingParams::tlm_markers

◆ total_tile_parts_

uint16_t total_tile_parts_

Total num of tile parts in whole image = num tiles* num tileparts in each tile.

used in TLMmarker

◆ tx0

uint32_t grk::CodingParams::tx0

XTOsiz.

◆ ty0

uint32_t grk::CodingParams::ty0

YTOsiz.

◆ wholeTileDecompress_

bool grk::CodingParams::wholeTileDecompress_

◆ writePLT

bool writePLT

◆ writeTLM

bool writeTLM