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

#include <PacketManager.h>

Public Member Functions

 PacketManager (bool compression, GrkImage *img, CodingParams *cparams, uint16_t tilenumber, J2K_T2_MODE t2_mode, TileProcessor *tileProc)
 
virtual ~PacketManager ()
 
PacketItergetPacketIter (uint32_t poc) const
 
void enableTilePartGeneration (uint32_t pino, bool first_poc_tile_part, uint32_t tppos)
 Modify the packet iterator for enabling tile part generation.
 
IncludeTrackergetIncludeTracker (void)
 
uint32_t getNumProgressions (void)
 
TileProcessorgetTileProcessor (void)
 
GrkImagegetImage ()
 
grk_rect32 getTileBounds (void)
 
CodingParamsgetCodingParams (void)
 
J2K_T2_MODE getT2Mode (void)
 

Static Public Member Functions

static void updateCompressParams (const GrkImage *p_image, CodingParams *p_cp, uint16_t tile_no)
 Updates the compressing parameters of the codec.
 

Static Private Member Functions

static void updateCompressTcpProgressions (CodingParams *p_cp, uint16_t num_comps, uint16_t tileno, grk_rect32 tileBounds, uint64_t max_precincts, uint8_t max_res, uint32_t dx_min, uint32_t dy_min, bool poc)
 Updates the coding parameters.
 
static void getParams (const GrkImage *image, const CodingParams *p_cp, uint16_t tileno, grk_rect32 *tileBounds, uint32_t *dx_min, uint32_t *dy_min, uint64_t *precincts, uint64_t *max_precincts, uint8_t *max_res, uint32_t **precinctByComponent)
 Get the compression parameters needed to update the coding parameters and all the pocs.
 

Private Attributes

GrkImageimage
 
CodingParamscp
 
uint16_t tileno
 
IncludeTrackerincludeTracker
 
PacketIterpi_
 
J2K_T2_MODE t2Mode
 
TileProcessortileProcessor
 
grk_rect32 tileBounds_
 

Constructor & Destructor Documentation

◆ PacketManager()

grk::PacketManager::PacketManager ( bool compression,
GrkImage * img,
CodingParams * cparams,
uint16_t tilenumber,
J2K_T2_MODE t2_mode,
TileProcessor * tileProc )

◆ ~PacketManager()

grk::PacketManager::~PacketManager ( )
virtual

Member Function Documentation

◆ enableTilePartGeneration()

void grk::PacketManager::enableTilePartGeneration ( uint32_t pino,
bool first_poc_tile_part,
uint32_t tppos )

Modify the packet iterator for enabling tile part generation.

Parameters
pinopacket iterator number
first_poc_tile_parttrue for first POC tile part
tpposThe position of the tile part flag in the progression order

References enableTilePartGeneration(), grk::grk_read(), and pi_.

Referenced by grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketsSimulate(), and enableTilePartGeneration().

◆ getCodingParams()

CodingParams * grk::PacketManager::getCodingParams ( void )

◆ getImage()

GrkImage * grk::PacketManager::getImage ( )

References image.

◆ getIncludeTracker()

IncludeTracker * grk::PacketManager::getIncludeTracker ( void )

◆ getNumProgressions()

uint32_t grk::PacketManager::getNumProgressions ( void )

References cp, grk::CodingParams::tcps, and tileno.

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

◆ getPacketIter()

PacketIter * grk::PacketManager::getPacketIter ( uint32_t poc) const

◆ getParams()

void grk::PacketManager::getParams ( const GrkImage * image,
const CodingParams * p_cp,
uint16_t tileno,
grk_rect32 * tileBounds,
uint32_t * dx_min,
uint32_t * dy_min,
uint64_t * precincts,
uint64_t * max_precincts,
uint8_t * max_res,
uint32_t ** precinctByComponent )
staticprivate

Get the compression parameters needed to update the coding parameters and all the pocs.

The precinct widths, heights, dx and dy for each component at each resolution will be stored as well. the last parameter of the function should be an array of pointers of size nb components, each pointer leading to an area of size 4 * max_res. The data is stored inside this area with the following pattern : dx_compi_res0 , dy_compi_res0 , w_compi_res0, h_compi_res0 , dx_compi_res1 , dy_compi_res1 , w_compi_res1, h_compi_res1 , ...

Parameters
p_imagethe image being encoded.
p_cpthe coding parameters.
tilenothe tile index of the tile being encoded.
tileBoundstile bounds
max_precinctsmaximum number of precincts for all the bands of the tile
max_resmaximum number of resolutions for all the poc inside the tile.
dx_minminimum dx of all the components of all the resolutions for the tile.
dy_minminimum dy of all the components of all the resolutions for the tile.
precinctByComponentstores log2 precinct grid dimensions by component

References _grk_image::comps, grk::floordivpow2(), GRK_J2K_MAXRLVLS, grk::grk_read(), image, _grk_image::numcomps, and tileno.

Referenced by PacketManager(), and updateCompressParams().

◆ getT2Mode()

J2K_T2_MODE grk::PacketManager::getT2Mode ( void )

◆ getTileBounds()

grk_rect32 grk::PacketManager::getTileBounds ( void )

◆ getTileProcessor()

TileProcessor * grk::PacketManager::getTileProcessor ( void )

◆ updateCompressParams()

void grk::PacketManager::updateCompressParams ( const GrkImage * p_image,
CodingParams * p_cp,
uint16_t tile_no )
static

Updates the compressing parameters of the codec.

Parameters
p_imagethe image being encoded.
p_cpthe coding parameters.
tile_noindex of the tile being encoded.

References getParams(), grk::grk_read(), image, _grk_image::numcomps, tileno, and updateCompressTcpProgressions().

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

◆ updateCompressTcpProgressions()

void grk::PacketManager::updateCompressTcpProgressions ( CodingParams * p_cp,
uint16_t num_comps,
uint16_t tileno,
grk_rect32 tileBounds,
uint64_t max_precincts,
uint8_t max_res,
uint32_t dx_min,
uint32_t dy_min,
bool poc )
staticprivate

Updates the coding parameters.

Parameters
p_cpthe coding parameters to modify
num_compsthe number of components
tilenothe tile index being concerned.
tileBoundstile bounds
max_precinctsthe maximum number of precincts for all the bands of the tile
max_resthe maximum number of resolutions for all the poc inside the tile.
dx_minthe minimum dx of all the components of all the resolutions for the tile.
dy_minthe minimum dy of all the components of all the resolutions for the tile.

References grk::grk_read(), and tileno.

Referenced by PacketManager(), and updateCompressParams().

Member Data Documentation

◆ cp

CodingParams* grk::PacketManager::cp
private

◆ image

GrkImage* grk::PacketManager::image
private

◆ includeTracker

IncludeTracker* grk::PacketManager::includeTracker
private

◆ pi_

PacketIter* grk::PacketManager::pi_
private

◆ t2Mode

J2K_T2_MODE grk::PacketManager::t2Mode
private

Referenced by getT2Mode().

◆ tileBounds_

grk_rect32 grk::PacketManager::tileBounds_
private

Referenced by getTileBounds(), and PacketManager().

◆ tileno

uint16_t grk::PacketManager::tileno
private

◆ tileProcessor

TileProcessor* grk::PacketManager::tileProcessor
private

Referenced by getTileProcessor().


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