|
Grok 20.3.2
|
#include <PacketManager.h>
Public Member Functions | |
| PacketManager (bool compression, GrkImage *img, CodingParams *cparams, uint16_t tilenumber, T2_MODE t2_mode, ITileProcessor *tileProc) | |
| virtual | ~PacketManager () |
| PacketIter * | getPacketIter (uint32_t poc) const |
| void | enable_tile_part_generation (uint32_t prog_iter_num, bool first_poc_tile_part, uint8_t newTilePartProgressionPosition) |
| Modify the packet iterator for enabling tile part generation. | |
| IncludeTracker * | getIncludeTracker (void) |
| uint32_t | getNumProgressions (void) |
| ITileProcessor * | getTileProcessor (void) |
| GrkImage * | getImage () |
| Rect32 | getTileBounds (void) |
| CodingParams * | getCodingParams (void) |
| T2_MODE | getT2Mode (void) |
Static Public Member Functions | |
| static void | updateCompressParams (const GrkImage *image, CodingParams *p_cp, TileCodingParams *tcp, uint16_t tile_no) |
| Updates the compressing parameters of the codec. | |
Static Private Member Functions | |
| static void | updateCompressTcpProgressions (TileCodingParams *tcp, uint16_t num_comps, 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, CodingParams *p_cp, TileCodingParams *tcp, uint16_t tileno, Rect32 *tileBounds, uint32_t *dx_min, uint32_t *dy_min, IncludeTracker *includeTracker, uint64_t *max_precincts, uint8_t *max_res, uint32_t **componentPrecinctInfo) |
| Get the compression parameters needed to update the coding parameters and all the pocs. | |
Private Attributes | |
| GrkImage * | image_ |
| CodingParams * | cp_ |
| uint16_t | tileIndex_ |
| IncludeTracker * | includeTracker_ |
| PacketIter * | pi_ |
| T2_MODE | t2Mode_ |
| ITileProcessor * | tileProcessor_ |
| Rect32 | tileBounds_ |
| grk::PacketManager::PacketManager | ( | bool | compression, |
| GrkImage * | img, | ||
| CodingParams * | cparams, | ||
| uint16_t | tilenumber, | ||
| T2_MODE | t2_mode, | ||
| ITileProcessor * | tileProc ) |
|
virtual |
References includeTracker_, and pi_.
| void grk::PacketManager::enable_tile_part_generation | ( | uint32_t | prog_iter_num, |
| bool | first_poc_tile_part, | ||
| uint8_t | newTilePartProgressionPosition ) |
Modify the packet iterator for enabling tile part generation.
| prog_iter_num | packet iterator number |
| first_poc_tile_part | true for first POC tile part |
| newTilePartProgressionPosition | The position of the tile part flag in the progression order |
References enable_tile_part_generation(), and pi_.
Referenced by grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketsSimulate(), and enable_tile_part_generation().
| CodingParams * grk::PacketManager::getCodingParams | ( | void | ) |
References cp_.
| GrkImage * grk::PacketManager::getImage | ( | ) |
References image_.
Referenced by grk::PacketIter::init().
| IncludeTracker * grk::PacketManager::getIncludeTracker | ( | void | ) |
References includeTracker_.
| uint32_t grk::PacketManager::getNumProgressions | ( | void | ) |
References tileProcessor_.
| PacketIter * grk::PacketManager::getPacketIter | ( | uint32_t | poc | ) | const |
References pi_.
Referenced by grk::T2Compress::compressPackets(), grk::T2Compress::compressPacketsSimulate(), and grk::T2Decompress::parsePackets().
|
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 , ...
| image | the image being encoded. |
| p_cp | the coding parameters. |
| tileno | the tile index of the tile being encoded. |
| tileBounds | tile bounds |
| 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. |
| precincts | array of precincts |
| 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. |
| componentPrecinctInfo | stores precinct exponents and precinct grid dimensions for each component |
References grk::ceildivpow2(), grk::floordivpow2(), grk::GrkImage::getBounds(), grk::CodingParams::getTileBounds(), grk::IncludeTracker::resetNumPrecinctsPerRes(), grk::Rect< T >::scaleDownCeil(), grk::CodingParams::t_grid_height_, grk::CodingParams::t_grid_width_, grk::TileCodingParams::tccps_, and grk::IncludeTracker::updateNumPrecinctsPerRes().
Referenced by PacketManager(), and updateCompressParams().
| Rect32 grk::PacketManager::getTileBounds | ( | void | ) |
References tileBounds_.
| ITileProcessor * grk::PacketManager::getTileProcessor | ( | void | ) |
References tileProcessor_.
|
static |
Updates the compressing parameters of the codec.
| image | the image being encoded. |
| p_cp | the coding parameters. |
| tile_no | index of the tile being encoded. |
References getParams(), grk::TileCodingParams::hasPoc(), and updateCompressTcpProgressions().
Referenced by grk::CodeStreamCompress::getNumTileParts().
|
staticprivate |
Updates the coding parameters.
| tcp | TileCodingParams |
| num_comps | the number of components |
| 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. |
| poc | true if there is a progressio order change |
References grk::TileCodingParams::getNumProgressions(), grk::TileCodingParams::numLayers_, grk::TileCodingParams::prg_, grk::TileCodingParams::progressionOrderChange_, grk::Rect< T >::x0, grk::Rect< T >::x1, grk::Rect< T >::y0, and grk::Rect< T >::y1.
Referenced by PacketManager(), and updateCompressParams().
|
private |
Referenced by getCodingParams(), and PacketManager().
|
private |
Referenced by getImage(), and PacketManager().
|
private |
Referenced by getIncludeTracker(), PacketManager(), and ~PacketManager().
|
private |
Referenced by enable_tile_part_generation(), getPacketIter(), PacketManager(), and ~PacketManager().
|
private |
Referenced by getT2Mode(), and PacketManager().
|
private |
Referenced by getTileBounds(), and PacketManager().
|
private |
Referenced by PacketManager().
|
private |
Referenced by getNumProgressions(), getTileProcessor(), and PacketManager().