Grok 20.3.2
grk::CodingParams Struct Reference

Coding parameters. More...

#include <CodingParams.h>

Classes

struct  RecordedPacketInfo

Public Member Functions

 CodingParams ()
 ~CodingParams ()
Rect32 getTileBounds (Rect32 imageBounds, uint16_t tile_x, uint16_t tile_y) const
bool readCom (uint8_t *headerData, uint16_t headerSize)
 Reads a COM marker (comments).
uint8_t getNumTilePartsFromTLM (uint16_t tileIndex) const noexcept
 Gets the number of tile parts for a given tile index from TLM marker.
bool hasTLM (void) const noexcept
void init (grk_decompress_parameters *parameters, std::unique_ptr< TileCache > &tileCache)

Public Attributes

uint16_t rsiz_
uint32_t pcap_
 Rsiz.
uint16_t ccap_ [32]
uint32_t tx0_
uint32_t ty0_
 XTOsiz.
uint32_t t_width_
 YTOsiz.
uint32_t t_height_
 XTsiz.
std::mutex commentMutex
 YTsiz.
size_t numComments_
char * comment_ [GRK_NUM_COMMENTS_SUPPORTED]
 comments
uint16_t commentLength_ [GRK_NUM_COMMENTS_SUPPORTED]
bool isBinaryComment_ [GRK_NUM_COMMENTS_SUPPORTED]
uint16_t t_grid_width_
uint16_t t_grid_height_
 number of tiles in width
double dw_x0 = 0
 number of tiles in height
double dw_x1 = 0
double dw_y0 = 0
double dw_y1 = 0
std::unique_ptr< PPMMarkerppmMarkers_
TileCodingParamsPool tcps_
union { 
   DecodingParams   dec_ 
   EncodingParams   enc_ 
codingParams_
 default tile coding parameters
std::vector< uint16_t > compsToDecompress_
 Component indices to decode during decompression.
std::unique_ptr< TLMMarkertlmMarkers_
std::unique_ptr< PLMarkerplmMarkers_
bool asynchronous_
bool simulate_synchronous_
grk_decompress_callback decompressCallback_
void * decompressCallbackUserData_
bool recordPacketLengths_ = false
std::vector< std::vector< RecordedPacketInfo > > recordedPacketInfo_

Detailed Description

Coding parameters.

Constructor & Destructor Documentation

◆ CodingParams()

◆ ~CodingParams()

grk::CodingParams::~CodingParams ( )

References comment_, and numComments_.

Member Function Documentation

◆ getNumTilePartsFromTLM()

uint8_t grk::CodingParams::getNumTilePartsFromTLM ( uint16_t tileIndex) const
noexcept

Gets the number of tile parts for a given tile index from TLM marker.

Parameters
tileIndexIndex of the tile
Returns
Number of tile parts, or 0 if invalid

References hasTLM(), and tlmMarkers_.

◆ getTileBounds()

Rect32 grk::CodingParams::getTileBounds ( Rect32 imageBounds,
uint16_t tile_x,
uint16_t tile_y ) const

◆ hasTLM()

bool grk::CodingParams::hasTLM ( void ) const
noexcept

References tlmMarkers_.

Referenced by getNumTilePartsFromTLM().

◆ init()

void grk::CodingParams::init ( grk_decompress_parameters * parameters,
std::unique_ptr< TileCache > & tileCache )

◆ readCom()

bool grk::CodingParams::readCom ( uint8_t * headerData,
uint16_t headerSize )

Reads a COM marker (comments).

Parameters
headerDataheader data
headerSizesize of header data
Returns
true if successful

References comment_, commentLength_, commentMutex, GRK_NUM_COMMENTS_SUPPORTED, grk::grk_read(), grk::grklog, isBinaryComment_, and numComments_.

Member Data Documentation

◆ asynchronous_

bool grk::CodingParams::asynchronous_

Referenced by CodingParams(), and init().

◆ ccap_

uint16_t grk::CodingParams::ccap_[32]

Referenced by CodingParams().

◆ [union]

union { ... } grk::CodingParams::codingParams_

default tile coding parameters

Referenced by CodingParams(), init(), and grk::GrkImage::postReadHeader().

◆ comment_

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

comments

Referenced by CodingParams(), readCom(), and ~CodingParams().

◆ commentLength_

uint16_t grk::CodingParams::commentLength_[GRK_NUM_COMMENTS_SUPPORTED]

Referenced by CodingParams(), and readCom().

◆ commentMutex

std::mutex grk::CodingParams::commentMutex

YTsiz.

Referenced by readCom().

◆ compsToDecompress_

std::vector<uint16_t> grk::CodingParams::compsToDecompress_

Component indices to decode during decompression.

Empty = decode all.

Referenced by init().

◆ dec_

DecodingParams grk::CodingParams::dec_

◆ decompressCallback_

grk_decompress_callback grk::CodingParams::decompressCallback_

Referenced by CodingParams(), and init().

◆ decompressCallbackUserData_

void* grk::CodingParams::decompressCallbackUserData_

Referenced by CodingParams(), and init().

◆ dw_x0

double grk::CodingParams::dw_x0 = 0

number of tiles in height

Referenced by init().

◆ dw_x1

double grk::CodingParams::dw_x1 = 0

Referenced by init().

◆ dw_y0

double grk::CodingParams::dw_y0 = 0

Referenced by init().

◆ dw_y1

double grk::CodingParams::dw_y1 = 0

Referenced by init().

◆ enc_

EncodingParams grk::CodingParams::enc_

◆ isBinaryComment_

bool grk::CodingParams::isBinaryComment_[GRK_NUM_COMMENTS_SUPPORTED]

Referenced by CodingParams(), and readCom().

◆ numComments_

size_t grk::CodingParams::numComments_

◆ pcap_

uint32_t grk::CodingParams::pcap_

Rsiz.

Referenced by CodingParams().

◆ plmMarkers_

std::unique_ptr<PLMarker> grk::CodingParams::plmMarkers_

◆ ppmMarkers_

std::unique_ptr<PPMMarker> grk::CodingParams::ppmMarkers_

◆ recordedPacketInfo_

std::vector<std::vector<RecordedPacketInfo> > grk::CodingParams::recordedPacketInfo_

◆ recordPacketLengths_

bool grk::CodingParams::recordPacketLengths_ = false

◆ rsiz_

uint16_t grk::CodingParams::rsiz_

Referenced by CodingParams().

◆ simulate_synchronous_

bool grk::CodingParams::simulate_synchronous_

Referenced by CodingParams(), and init().

◆ t_grid_height_

uint16_t grk::CodingParams::t_grid_height_

number of tiles in width

Referenced by CodingParams(), and grk::PacketManager::getParams().

◆ t_grid_width_

uint16_t grk::CodingParams::t_grid_width_

◆ t_height_

uint32_t grk::CodingParams::t_height_

◆ t_width_

uint32_t grk::CodingParams::t_width_

◆ tcps_

TileCodingParamsPool grk::CodingParams::tcps_

◆ tlmMarkers_

std::unique_ptr<TLMMarker> grk::CodingParams::tlmMarkers_

Referenced by getNumTilePartsFromTLM(), and hasTLM().

◆ tx0_

uint32_t grk::CodingParams::tx0_

Referenced by CodingParams(), and getTileBounds().

◆ ty0_

uint32_t grk::CodingParams::ty0_

XTOsiz.

Referenced by CodingParams(), and getTileBounds().


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