Grok 12.0.1
|
#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 () |
PacketIter * | getPacketIter (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. | |
IncludeTracker * | getIncludeTracker (void) |
uint32_t | getNumProgressions (void) |
TileProcessor * | getTileProcessor (void) |
GrkImage * | getImage () |
grk_rect32 | getTileBounds (void) |
CodingParams * | getCodingParams (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 | |
GrkImage * | image |
CodingParams * | cp |
uint16_t | tileno |
IncludeTracker * | includeTracker |
PacketIter * | pi_ |
J2K_T2_MODE | t2Mode |
TileProcessor * | tileProcessor |
grk_rect32 | tileBounds_ |
grk::PacketManager::PacketManager | ( | bool | compression, |
GrkImage * | img, | ||
CodingParams * | cparams, | ||
uint16_t | tilenumber, | ||
J2K_T2_MODE | t2_mode, | ||
TileProcessor * | tileProc ) |
References cp, grk::FINAL_PASS, getParams(), GRK_IS_CINEMA, GRK_J2K_MAXRLVLS, grk::grk_read(), image, includeTracker, grk::PacketIter::init(), _grk_image::numcomps, grk::TileCodingParams::numpocs, grk::IncludeTracker::numPrecinctsPerRes, pi_, grk::CodingParams::rsiz, grk::CodingParams::t_grid_height, grk::CodingParams::tcps, tileBounds_, tileno, and updateCompressTcpProgressions().
|
virtual |
References grk::PacketIter::destroy_include(), includeTracker, and pi_.
void grk::PacketManager::enableTilePartGeneration | ( | uint32_t | pino, |
bool | first_poc_tile_part, | ||
uint32_t | tppos ) |
Modify the packet iterator for enabling tile part generation.
pino | packet iterator number |
first_poc_tile_part | true for first POC tile part |
tppos | The 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().
CodingParams * grk::PacketManager::getCodingParams | ( | void | ) |
References cp.
Referenced by grk::PacketIter::checkForRemainingValidProgression(), and grk::PacketIter::enableTilePartGeneration().
IncludeTracker * grk::PacketManager::getIncludeTracker | ( | void | ) |
References includeTracker.
Referenced by grk::PacketIter::destroy_include(), grk::PacketIter::get_include(), and grk::PacketIter::update_include().
References cp, grk::CodingParams::tcps, and tileno.
Referenced by grk::PacketIter::init().
PacketIter * grk::PacketManager::getPacketIter | ( | uint32_t | poc | ) | const |
References grk::grk_read(), and pi_.
Referenced by grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketsSimulate(), and grk::T2Decompress::decompressPackets().
|
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 , ...
p_image | the image being encoded. |
p_cp | the coding parameters. |
tileno | the tile index of the tile being encoded. |
tileBounds | tile bounds |
max_precincts | maximum number of precincts for all the bands of the tile |
max_res | maximum number of resolutions for all the poc inside the tile. |
dx_min | minimum dx of all the components of all the resolutions for the tile. |
dy_min | minimum dy of all the components of all the resolutions for the tile. |
precinctByComponent | stores 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().
J2K_T2_MODE grk::PacketManager::getT2Mode | ( | void | ) |
References t2Mode.
Referenced by grk::PacketIter::enableTilePartGeneration().
grk_rect32 grk::PacketManager::getTileBounds | ( | void | ) |
References tileBounds_.
Referenced by grk::PacketIter::genPrecinctInfo(), grk::PacketIter::genPrecinctX0Grid(), grk::PacketIter::genPrecinctY0Grid(), and grk::PacketIter::validatePrecinct().
TileProcessor * grk::PacketManager::getTileProcessor | ( | void | ) |
References tileProcessor.
Referenced by grk::PacketIter::checkForRemainingValidProgression(), grk::PacketIter::enableTilePartGeneration(), grk::PacketIter::genPrecinctInfo(), grk::PacketIter::init(), grk::PacketIter::isWholeTile(), grk::PacketIter::next_pcrl(), grk::PacketIter::skipPackets(), and grk::PacketIter::validatePrecinct().
|
static |
Updates the compressing parameters of the codec.
p_image | the image being encoded. |
p_cp | the coding parameters. |
tile_no | index of the tile being encoded. |
References getParams(), grk::grk_read(), image, _grk_image::numcomps, tileno, and updateCompressTcpProgressions().
Referenced by grk::CodeStreamCompress::getNumTileParts().
|
staticprivate |
Updates the coding parameters.
p_cp | the coding parameters to modify |
num_comps | the number of components |
tileno | the tile index being concerned. |
tileBounds | tile bounds |
max_precincts | the maximum number of precincts for all the bands of the tile |
max_res | the maximum number of resolutions for all the poc inside the tile. |
dx_min | the minimum dx of all the components of all the resolutions for the tile. |
dy_min | the minimum dy of all the components of all the resolutions for the tile. |
References grk::grk_read(), and tileno.
Referenced by PacketManager(), and updateCompressParams().
|
private |
Referenced by getCodingParams(), getNumProgressions(), and PacketManager().
|
private |
Referenced by getImage(), getParams(), PacketManager(), and updateCompressParams().
|
private |
Referenced by getIncludeTracker(), PacketManager(), and ~PacketManager().
|
private |
Referenced by enableTilePartGeneration(), getPacketIter(), PacketManager(), and ~PacketManager().
|
private |
Referenced by getT2Mode().
|
private |
Referenced by getTileBounds(), and PacketManager().
|
private |
Referenced by getNumProgressions(), getParams(), PacketManager(), updateCompressParams(), and updateCompressTcpProgressions().
|
private |
Referenced by getTileProcessor().