Grok
10.0.3
|
Packet iterator. More...
#include <PacketIter.h>
Public Member Functions | |
PacketIter () | |
~PacketIter () | |
void | init (PacketManager *packetMan, uint32_t pino, TileCodingParams *tcp, grk_rect32 tileBounds, bool compression, uint8_t max_res, uint64_t max_precincts, uint32_t *resolutionPrecinctGrid, uint32_t **precinctByComponent) |
void | printStaticState (void) |
void | printDynamicState (void) |
void | enableTilePartGeneration (uint32_t pino, bool first_poc_tile_part, uint32_t tppos) |
Modify the packet iterator for enabling tile part generation. More... | |
bool | genPrecinctInfoOPT () |
void | genPrecinctInfo () |
void | genPrecinctInfo (PiComp *comp, PiResolution *res, uint8_t resNumber) |
uint8_t * | get_include (uint16_t layerIndex) |
bool | update_include (void) |
void | destroy_include (void) |
bool | next (SparseBuffer *src) |
Modify the packet iterator to point to the next packet. More... | |
GRK_PROG_ORDER | getProgression (void) const |
uint16_t | getCompno (void) const |
uint8_t | getResno (void) const |
uint64_t | getPrecinctIndex (void) const |
uint16_t | getLayno (void) const |
Private Member Functions | |
void | update_dxy (void) |
bool | checkForRemainingValidProgression (int32_t prog, uint32_t pino, const char *progString) |
Check if there is a remaining valid progression order. More... | |
bool | genPrecinctY0Grid (ResPrecinctInfo *rpInfo) |
bool | genPrecinctX0Grid (ResPrecinctInfo *rpInfo) |
void | genPrecinctY0GridRPCL_OPT (ResPrecinctInfo *rpInfo) |
void | genPrecinctX0GridRPCL_OPT (ResPrecinctInfo *rpInfo) |
bool | genPrecinctX0GridPCRL_OPT (ResPrecinctInfo *rpInfo) |
bool | genPrecinctY0GridPCRL_OPT (ResPrecinctInfo *rpInfo) |
bool | precInfoCheck (ResPrecinctInfo *rpInfo) |
void | generatePrecinctIndex (void) |
bool | validatePrecinct (void) |
void | update_dxy_for_comp (PiComp *comp, bool updateActive) |
bool | isWholeTile (void) |
bool | next_cprl (SparseBuffer *src) |
Get next packet in component-precinct-resolution-layer order. More... | |
bool | next_cprlOPT (SparseBuffer *src) |
bool | next_pcrl (SparseBuffer *src) |
Get next packet in precinct-component-resolution-layer order. More... | |
bool | next_pcrlOPT (SparseBuffer *src) |
bool | next_lrcp (SparseBuffer *src) |
Get next packet in layer-resolution-component-precinct order. More... | |
bool | next_lrcpOPT (SparseBuffer *src) |
bool | next_rlcp (SparseBuffer *src) |
Get next packet in resolution-layer-component-precinct order. More... | |
bool | next_rlcpOPT (SparseBuffer *src) |
bool | next_rpcl (SparseBuffer *src) |
Get next packet in resolution-precinct-component-layer order. More... | |
bool | next_rpclOPT (SparseBuffer *src) |
bool | skipPackets (SparseBuffer *src, uint64_t numPackets) |
Private Attributes | |
uint16_t | compno |
uint8_t | resno |
uint64_t | precinctIndex |
uint16_t | layno |
grk_progression | prog |
uint16_t | numcomps |
PiComp * | comps |
uint64_t | x |
packet coordinates More... | |
uint64_t | y |
uint32_t | dx |
component sub-sampling More... | |
uint32_t | dy |
uint32_t | dxActive |
uint32_t | dyActive |
bool | incrementInner |
PacketManager * | packetManager |
uint8_t | maxNumDecompositionResolutions |
bool | singleProgression_ |
bool | compression_ |
ResPrecinctInfo * | precinctInfoOPT_ |
uint32_t | px0grid_ |
uint32_t | py0grid_ |
bool | skippedLeft_ |
Packet iterator.
grk::PacketIter::PacketIter | ( | ) |
References prog.
grk::PacketIter::~PacketIter | ( | ) |
References comps, and precinctInfoOPT_.
|
private |
Check if there is a remaining valid progression order.
References grk::PacketManager::getCodingParams(), grk::TileProcessor::getIndex(), grk::PacketManager::getTileProcessor(), GRK_LRCP, GRK_RLCP, packetManager, prog, and grk::CodingParams::tcps.
Referenced by enableTilePartGeneration().
void grk::PacketIter::destroy_include | ( | void | ) |
References grk::IncludeTracker::clear(), grk::PacketManager::getIncludeTracker(), and packetManager.
Referenced by grk::PacketManager::~PacketManager().
void grk::PacketIter::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 checkForRemainingValidProgression(), _grk_progression::compE, _grk_progression::compS, grk::CodeStreamCompress::convertProgressionOrder(), grk::FINAL_PASS, grk::PacketManager::getCodingParams(), grk::TileProcessor::getIndex(), grk::PacketManager::getT2Mode(), grk::PacketManager::getTileProcessor(), GRK_IS_CINEMA, GRK_IS_IMF, GRK_LRCP, GRK_RLCP, _grk_progression::layE, _grk_progression::layS, packetManager, _grk_progression::precE, _grk_progression::precS, prog, _grk_progression::progression, _grk_progression::resE, _grk_progression::resS, grk::CodingParams::tcps, _grk_progression::tx0, _grk_progression::tx1, _grk_progression::ty0, and _grk_progression::ty1.
|
private |
References compno, comps, precinctIndex, px0grid_, py0grid_, and resno.
Referenced by next_cprl(), next_pcrl(), and next_rpcl().
void grk::PacketIter::genPrecinctInfo | ( | ) |
References comps, genPrecinctInfoOPT(), numcomps, and grk::PiComp::resolutions.
Referenced by init().
void grk::PacketIter::genPrecinctInfo | ( | PiComp * | comp, |
PiResolution * | res, | ||
uint8_t | resNumber | ||
) |
References compression_, grk::PiComp::dx, grk::PiComp::dy, grk::PacketManager::getTileBounds(), grk::PacketManager::getTileProcessor(), grk::TileProcessor::getUnreducedTileWindow(), grk::ResPrecinctInfo::init(), isWholeTile(), grk::PiComp::numresolutions, packetManager, grk::ResPrecinctInfo::precHeightExp, grk::PiResolution::precHeightExp, grk::PiResolution::precinctGridHeight, grk::PiResolution::precinctGridWidth, grk::PiResolution::precinctInfo, grk::ResPrecinctInfo::precWidthExp, and grk::PiResolution::precWidthExp.
bool grk::PacketIter::genPrecinctInfoOPT | ( | void | ) |
References compno, compression_, comps, grk::PiComp::dx, grk::PiComp::dy, grk::PacketManager::getTileBounds(), grk::PacketManager::getTileProcessor(), grk::TileProcessor::getUnreducedTileWindow(), GRK_CPRL, GRK_LRCP, GRK_PCRL, GRK_RLCP, GRK_RPCL, isWholeTile(), numcomps, grk::PiComp::numresolutions, packetManager, precinctInfoOPT_, prog, _grk_progression::progression, resno, grk::PiComp::resolutions, and singleProgression_.
Referenced by genPrecinctInfo().
|
private |
References grk::ceildiv(), grk::ResPrecinctInfo::dxPRJ, grk::floordivpow2(), grk::PacketManager::getTileBounds(), packetManager, grk::ResPrecinctInfo::precWidthExp, grk::ResPrecinctInfo::precWidthPRJ, px0grid_, grk::ResPrecinctInfo::resInPrecGridX0, grk::ResPrecinctInfo::resOffsetX0PRJ, x, and grk::grk_rect< T >::x0.
Referenced by validatePrecinct().
|
private |
|
private |
References grk::ceildivpow2(), grk::ResPrecinctInfo::decompLevel_, grk::ResPrecinctInfo::precWidthExp, px0grid_, and x.
Referenced by next_rpclOPT().
|
private |
References grk::ceildiv(), grk::ResPrecinctInfo::dyPRJ, grk::floordivpow2(), grk::PacketManager::getTileBounds(), packetManager, grk::ResPrecinctInfo::precHeightExp, grk::ResPrecinctInfo::precHeightPRJ, py0grid_, grk::ResPrecinctInfo::resInPrecGridY0, grk::ResPrecinctInfo::resOffsetY0PRJ, y, and grk::grk_rect< T >::y0.
Referenced by validatePrecinct().
|
private |
|
private |
References grk::ceildivpow2(), grk::ResPrecinctInfo::decompLevel_, grk::ResPrecinctInfo::precHeightExp, py0grid_, and y.
Referenced by next_rpclOPT().
uint8_t * grk::PacketIter::get_include | ( | uint16_t | layerIndex | ) |
uint16_t grk::PacketIter::getCompno | ( | void | ) | const |
References compno.
Referenced by grk::T2Compress::compressPacket(), and grk::T2Compress::compressPacketSimulate().
uint16_t grk::PacketIter::getLayno | ( | void | ) | const |
References layno.
Referenced by grk::T2Compress::compressPacket(), and grk::T2Compress::compressPacketSimulate().
uint64_t grk::PacketIter::getPrecinctIndex | ( | void | ) | const |
References precinctIndex.
Referenced by grk::T2Compress::compressPacket(), and grk::T2Compress::compressPacketSimulate().
GRK_PROG_ORDER grk::PacketIter::getProgression | ( | void | ) | const |
References prog, and _grk_progression::progression.
uint8_t grk::PacketIter::getResno | ( | void | ) | const |
References resno.
Referenced by grk::T2Compress::compressPacket(), and grk::T2Compress::compressPacketSimulate().
void grk::PacketIter::init | ( | PacketManager * | packetMan, |
uint32_t | pino, | ||
TileCodingParams * | tcp, | ||
grk_rect32 | tileBounds, | ||
bool | compression, | ||
uint8_t | max_res, | ||
uint64_t | max_precincts, | ||
uint32_t * | resolutionPrecinctGrid, | ||
uint32_t ** | precinctByComponent | ||
) |
References _grk_progression::compE, compno, compression_, _grk_progression::compS, comps, genPrecinctInfo(), grk::PacketManager::getImage(), grk::TileProcessor::getMaxNumDecompressResolutions(), grk::PacketManager::getNumProgressions(), grk::TileProcessor::getTileCodingParams(), grk::PacketManager::getTileProcessor(), GRK_CPRL, GRK_LRCP, GRK_PCRL, GRK_RLCP, GRK_RPCL, grk::TileCodingParams::hasPoc(), _grk_progression::layE, _grk_progression::layS, maxNumDecompositionResolutions, numcomps, grk::TileCodingParams::numlayers, grk::TileCodingParams::numLayersToDecompress, grk::PiComp::numresolutions, packetManager, _grk_progression::precE, precinctInfoOPT_, _grk_progression::precS, grk::TileCodingParams::prg, prog, _grk_progression::progression, grk::TileCodingParams::progressionOrderChange, _grk_progression::resE, resno, _grk_progression::resS, singleProgression_, grk::TileCodingParams::tccps, _grk_progression::tx0, _grk_progression::tx1, _grk_progression::ty0, _grk_progression::ty1, update_dxy(), x, grk::grk_rect< T >::x0, grk::grk_rect< T >::x1, y, grk::grk_rect< T >::y0, and grk::grk_rect< T >::y1.
Referenced by grk::PacketManager::PacketManager().
|
private |
bool grk::PacketIter::next | ( | SparseBuffer * | src | ) |
Modify the packet iterator to point to the next packet.
References GRK_CPRL, GRK_LRCP, GRK_PCRL, GRK_RLCP, GRK_RPCL, next_cprl(), next_lrcp(), next_pcrl(), next_rlcp(), next_rpcl(), prog, and _grk_progression::progression.
|
private |
Get next packet in component-precinct-resolution-layer order.
References _grk_progression::compE, compno, comps, dx, dxActive, dy, dyActive, generatePrecinctIndex(), incrementInner, _grk_progression::layE, layno, _grk_progression::layS, next_cprlOPT(), precinctInfoOPT_, prog, _grk_progression::resE, resno, _grk_progression::resS, _grk_progression::tx0, _grk_progression::tx1, _grk_progression::ty0, _grk_progression::ty1, update_dxy_for_comp(), update_include(), validatePrecinct(), x, and y.
Referenced by next().
|
private |
References _grk_progression::compE, compno, comps, dx, dy, genPrecinctX0GridPCRL_OPT(), genPrecinctY0GridPCRL_OPT(), incrementInner, isWholeTile(), _grk_progression::layE, layno, _grk_progression::layS, precinctIndex, precinctInfoOPT_, precInfoCheck(), prog, px0grid_, py0grid_, _grk_progression::resE, resno, _grk_progression::resS, skipPackets(), _grk_progression::tx0, _grk_progression::ty0, x, and y.
Referenced by next_cprl().
|
private |
Get next packet in layer-resolution-component-precinct order.
References _grk_progression::compE, compno, _grk_progression::compS, comps, incrementInner, _grk_progression::layE, layno, next_lrcpOPT(), grk::PiComp::numresolutions, precinctIndex, precinctInfoOPT_, _grk_progression::precS, prog, _grk_progression::resE, resno, grk::PiComp::resolutions, _grk_progression::resS, and update_include().
Referenced by next().
|
private |
References _grk_progression::compE, compno, _grk_progression::compS, incrementInner, _grk_progression::layE, layno, precinctIndex, precinctInfoOPT_, precInfoCheck(), _grk_progression::precS, prog, _grk_progression::resE, resno, and _grk_progression::resS.
Referenced by next_lrcp().
|
private |
Get next packet in precinct-component-resolution-layer order.
References _grk_progression::compE, compno, _grk_progression::compS, dx, dxActive, dy, dyActive, generatePrecinctIndex(), grk::PacketManager::getTileProcessor(), grk::TileProcessor::getUnreducedTileWindow(), incrementInner, _grk_progression::layE, layno, _grk_progression::layS, next_pcrlOPT(), packetManager, precinctInfoOPT_, prog, _grk_progression::resE, resno, _grk_progression::resS, singleProgression_, _grk_progression::tx0, _grk_progression::tx1, _grk_progression::ty1, update_include(), validatePrecinct(), x, and y.
Referenced by next().
|
private |
References _grk_progression::compE, compno, _grk_progression::compS, comps, dx, dy, genPrecinctX0GridPCRL_OPT(), genPrecinctY0GridPCRL_OPT(), incrementInner, isWholeTile(), _grk_progression::layE, layno, _grk_progression::layS, precinctIndex, precinctInfoOPT_, precInfoCheck(), prog, px0grid_, py0grid_, _grk_progression::resE, resno, _grk_progression::resS, x, and y.
Referenced by next_pcrl().
|
private |
Get next packet in resolution-layer-component-precinct order.
References _grk_progression::compE, compno, _grk_progression::compS, comps, incrementInner, _grk_progression::layE, layno, _grk_progression::layS, next_rlcpOPT(), grk::PiComp::numresolutions, precinctIndex, precinctInfoOPT_, _grk_progression::precS, prog, _grk_progression::resE, resno, grk::PiComp::resolutions, and update_include().
Referenced by next().
|
private |
References _grk_progression::compE, compno, _grk_progression::compS, incrementInner, _grk_progression::layE, layno, _grk_progression::layS, precinctIndex, precinctInfoOPT_, precInfoCheck(), _grk_progression::precS, prog, _grk_progression::resE, and resno.
Referenced by next_rlcp().
|
private |
Get next packet in resolution-precinct-component-layer order.
References _grk_progression::compE, compno, _grk_progression::compS, comps, dx, dxActive, dy, dyActive, generatePrecinctIndex(), incrementInner, _grk_progression::layE, layno, _grk_progression::layS, next_rpclOPT(), precinctInfoOPT_, prog, _grk_progression::resE, resno, grk::PiComp::resolutions, _grk_progression::tx0, _grk_progression::tx1, _grk_progression::ty0, _grk_progression::ty1, update_include(), validatePrecinct(), x, and y.
Referenced by next().
|
private |
References _grk_progression::compE, compno, _grk_progression::compS, genPrecinctX0GridRPCL_OPT(), genPrecinctY0GridRPCL_OPT(), incrementInner, isWholeTile(), _grk_progression::layE, layno, _grk_progression::layS, maxNumDecompositionResolutions, precinctIndex, precinctInfoOPT_, precInfoCheck(), prog, px0grid_, py0grid_, _grk_progression::resE, resno, skipPackets(), skippedLeft_, x, and y.
Referenced by next_rpcl().
|
private |
References comps, grk::PiComp::numresolutions, resno, grk::PiComp::resolutions, and grk::ResPrecinctInfo::valid.
Referenced by next_cprlOPT(), next_lrcpOPT(), next_pcrlOPT(), next_rlcpOPT(), and next_rpclOPT().
void grk::PacketIter::printDynamicState | ( | void | ) |
References compno, grk::GRK_INFO(), layno, precinctIndex, precinctInfoOPT_, resno, x, and y.
void grk::PacketIter::printStaticState | ( | void | ) |
|
private |
|
private |
|
private |
References grk::PiComp::dx, dx, dxActive, grk::PiComp::dy, dy, dyActive, grk::PiComp::numresolutions, resno, grk::PiComp::resolutions, x, and y.
Referenced by next_cprl(), and update_dxy().
bool grk::PacketIter::update_include | ( | void | ) |
References compno, grk::PacketManager::getIncludeTracker(), layno, packetManager, precinctIndex, resno, singleProgression_, and grk::IncludeTracker::update().
Referenced by next_cprl(), next_lrcp(), next_pcrl(), next_rlcp(), and next_rpcl().
|
private |
References compno, compression_, comps, genPrecinctX0Grid(), genPrecinctY0Grid(), grk::PacketManager::getTileBounds(), grk::PacketManager::getTileProcessor(), grk::TileProcessor::getUnreducedTileWindow(), grk::ResPrecinctInfo::init(), isWholeTile(), packetManager, grk::ResPrecinctInfo::precHeightExp, precinctInfoOPT_, grk::ResPrecinctInfo::precWidthExp, and resno.
Referenced by next_cprl(), next_pcrl(), and next_rpcl().
|
private |
Referenced by generatePrecinctIndex(), genPrecinctInfoOPT(), getCompno(), init(), next_cprl(), next_cprlOPT(), next_lrcp(), next_lrcpOPT(), next_pcrl(), next_pcrlOPT(), next_rlcp(), next_rlcpOPT(), next_rpcl(), next_rpclOPT(), printDynamicState(), update_dxy(), update_include(), and validatePrecinct().
|
private |
Referenced by genPrecinctInfo(), genPrecinctInfoOPT(), init(), isWholeTile(), and validatePrecinct().
|
private |
|
private |
component sub-sampling
Referenced by next_cprl(), next_cprlOPT(), next_pcrl(), next_pcrlOPT(), next_rpcl(), update_dxy(), and update_dxy_for_comp().
|
private |
Referenced by next_cprl(), next_pcrl(), next_rpcl(), update_dxy(), and update_dxy_for_comp().
|
private |
Referenced by next_cprl(), next_cprlOPT(), next_pcrl(), next_pcrlOPT(), next_rpcl(), update_dxy(), and update_dxy_for_comp().
|
private |
Referenced by next_cprl(), next_pcrl(), next_rpcl(), update_dxy(), and update_dxy_for_comp().
|
private |
Referenced by next_cprl(), next_cprlOPT(), next_lrcp(), next_lrcpOPT(), next_pcrl(), next_pcrlOPT(), next_rlcp(), next_rlcpOPT(), next_rpcl(), and next_rpclOPT().
|
private |
Referenced by getLayno(), next_cprl(), next_cprlOPT(), next_lrcp(), next_lrcpOPT(), next_pcrl(), next_pcrlOPT(), next_rlcp(), next_rlcpOPT(), next_rpcl(), next_rpclOPT(), printDynamicState(), and update_include().
|
private |
Referenced by init(), and next_rpclOPT().
|
private |
Referenced by genPrecinctInfo(), genPrecinctInfoOPT(), init(), and update_dxy().
|
private |
|
private |
|
private |
|
private |
Referenced by checkForRemainingValidProgression(), enableTilePartGeneration(), genPrecinctInfoOPT(), getProgression(), init(), next(), next_cprl(), next_cprlOPT(), next_lrcp(), next_lrcpOPT(), next_pcrl(), next_pcrlOPT(), next_rlcp(), next_rlcpOPT(), next_rpcl(), next_rpclOPT(), PacketIter(), and printStaticState().
|
private |
|
private |
|
private |
Referenced by generatePrecinctIndex(), genPrecinctInfoOPT(), get_include(), getResno(), init(), next_cprl(), next_cprlOPT(), next_lrcp(), next_lrcpOPT(), next_pcrl(), next_pcrlOPT(), next_rlcp(), next_rlcpOPT(), next_rpcl(), next_rpclOPT(), precInfoCheck(), printDynamicState(), printStaticState(), update_dxy_for_comp(), update_include(), and validatePrecinct().
|
private |
Referenced by genPrecinctInfoOPT(), init(), next_pcrl(), and update_include().
|
private |
Referenced by next_rpclOPT().
|
private |
packet coordinates
Referenced by genPrecinctX0Grid(), genPrecinctX0GridPCRL_OPT(), genPrecinctX0GridRPCL_OPT(), init(), next_cprl(), next_cprlOPT(), next_pcrl(), next_pcrlOPT(), next_rpcl(), next_rpclOPT(), printDynamicState(), update_dxy(), and update_dxy_for_comp().
|
private |