Grok 20.3.2
grk::TileProcessor Struct Reference

#include <TileProcessor.h>

Inheritance diagram for grk::TileProcessor:
grk::ITileProcessor grk::TileProcessorCompress

Public Member Functions

 TileProcessor (uint16_t index, TileCodingParams *tcp, CodeStream *codeStream, IStream *stream, bool isCompressor, uint32_t tileCacheStrategy)
 Constructs a TileProcessor.
virtual ~TileProcessor () override
 Destroys a TileProcessor.
void setProcessors (MarkerParser *parser) override
 Sets the marker parser for processing.
virtual bool init (void) override
 Initializes a TileProcessor.
void setStream (IStream *stream, bool ownsStream) override
 Sets the stream for input/output operations.
bool decompressWithTLM (const std::shared_ptr< TPFetchSeq > &tilePartFetchSeq, CoderPool *streamPool, Rect32 unreducedImageBounds, std::function< void()> post, TileFutureManager &futures) override
 Decompresses the tile using Tile Length Markers (TLM).
bool decompressPrepareWithTLM (const std::shared_ptr< TPFetchSeq > &tilePartFetchSeq) override
 Prepares for decompression using Tile Length Markers (TLM).
bool doPostT1 (void) override
 Performs post T1 processing.
void prepareForDecompression (void) override
 Prepares for decompression.
bool parseTilePart (std::vector< std::unique_ptr< MarkerParser > > *parsers, IStream *bifurcatedStream, uint16_t mainMarkerId, TilePartInfo tilePartInfo) override
 Parses tile part.
bool decompressFromCachedTileParts () override
 Parse tile-part packets using cached SOT offsets from tilePartSeq_, without re-reading SOT markers.
bool readSOT (IStream *stream, uint8_t *headerData, uint16_t headerSize, TilePartInfo &tilePartInfo, bool needToReadIndexAndLength) override
 Reads SOT marker.
void scheduleAndRunDecompress (CoderPool *coderPool, Rect32 unreducedImageBounds, std::function< void()> post, TileFutureManager &futures) override
 Schedule T2/T1 decompression.
void post_decompressT2T1 (GrkImage *scratch) override
 Performs post T2+T1 processing.
bool differentialUpdate (Rect32 unreducedImageBounds) override
 Updates differential decompress state.
GrkImagegetImage (void) override
 Gets the tile GrkImage.
void setImage (GrkImage *img) override
 Gets the tile GrkImage.
Rect32 getUnreducedTileWindow (void) override
 Get the Unreduced Tile Window object.
TileCodingParamsgetTCP (void) override
uint8_t getMaxNumDecompressResolutions (void) override
 Get the Max Num Decompress Resolutions object.
IStreamgetStream (void) override
 Get the Stream object.
uint16_t getIndex (void) const override
 Get the Index object.
void incrementIndex (void) override
 Increments the tile index.
TilegetTile (void) override
 Get the Tile object.
grk_progression_state getProgressionState () override
 Gets the progression state.
CodecSchedulergetScheduler (void) override
 Get the Scheduler object.
bool isCompressor (void) override
uint64_t getNumProcessedPackets (void) override
 Get the Num Processed Packets object.
void incNumProcessedPackets (void) override
 Increments the number of processed packets by 1.
void incNumProcessedPackets (uint64_t numPackets) override
void incNumReadDataPackets (void) override
 Increments the number of read data packets by 1.
uint32_t getTileCacheStrategy (void) override
 Gets the Tile Cache Strategy object.
grk_plugin_tilegetCurrentPluginTile (void) const override
 Gets the Current Plugin Tile object.
void setCurrentPluginTile (grk_plugin_tile *tile) override
 Set the Current Plugin Tile object.
CodingParamsgetCodingParams (void) override
 Get the Coding Params object.
GrkImagegetHeaderImage (void) override
 Get the Header Image object.
std::shared_ptr< PacketLengthCache< uint32_t > > getPacketLengthCache (void) override
 Get the Packet Length Cache object.
bool needsMctDecompress (uint16_t compno) override
bool needsMctDecompress (void) override
bool shouldDecodeComponent (uint16_t compno) override
 Check if a component should be decoded based on user selection.
MctgetMCT (void) override
 gets Mct
void release (void) override
 Releases resources - image and tile.
void release (uint32_t strategy) override
 release select resources
void releaseForSwath () override
 Unconditionally releases both image and tile data (swath consumer path).
bool readPLT (uint8_t *headerData, uint16_t headerSize) override
 Reads a PLT marker (Packet length, tile-part header).
bool allSOTMarkersParsed () override
 Checks if tile is completely parsed.
bool hasUnparsedTileParts () override
 True when we know for certain that tile parts are missing.
void setTruncated (void) override
 Sets processor to truncated if not all tile parts have been parsed.
bool hasError (void) override
 Checks if an error has occurred.
bool isInitialized (void) override
 Checks if the processor is initialized.
bool isBestEffortDecompressed (void) override
 Check if tile was decompressed on a best-effort basis (may have been truncated or errored).
void setBestEffortDecompressed (void) override
bool scheduledForDecompression (void) override
void resetSOTParsing () override
 Reset SOT parsing state so the tile can be re-parsed from the codestream.
bool reinitForReDecompress (void) override
 Reinitialize for re-decompression after LRU eviction.
bool isStripOutputWritten () const override
 Check if strip-mode output was written directly (bypass multi-tile band callback).
Public Member Functions inherited from grk::ITileProcessor
virtual ~ITileProcessor ()=default
 Destroys the TileProcessor.

Protected Attributes

GrkImageheaderImage_ = nullptr
 header GrkImage
grk_plugin_tilecurrent_plugin_tile_ = nullptr
 grk_plugin_tile
CodingParamscp_ = nullptr
 CodingParams
std::shared_ptr< PacketLengthCache< uint32_t > > packetLengthCache_
 PacketLengthCache
Tiletile_ = nullptr
 Tile
uint16_t tileIndex_ = 0
 index of tile being currently compressed/decompressed
TileCodingParamstcp_ = nullptr
 TileCodingParams
IStreamstream_ = nullptr
 IStream
Mctmct_ = nullptr
 MCT
CodecSchedulerscheduler_ = nullptr
 CodecScheduler
SchedulerFreebyrdschedulerFreebyrd_ = nullptr
 SchedulerFreebyrd — strip-based decompression via freebyrd pool

Private Member Functions

void prepareConcurrentParsing (void)
void deallocBuffers ()
 deallocate buffers
bool createDecompressTileComponentWindows (void)
 Create a Tile Window Buffers object.
void decompress_synch_plugin_with_host (void)

Private Attributes

std::vector< tf::Task > blockTasks_
bool initialized_ = false
std::atomic< bool > success_ = true
bool concurrentFlowsStale_ = false
std::unique_ptr< FlowComponentrootFlow_
std::unique_ptr< FlowComponenttileHeaderParseFlow_
std::unique_ptr< FlowComponentprepareFlow_
std::vector< std::unique_ptr< FlowComponent > > staleParsing_
std::unique_ptr< FlowComponentt2ParseFlow_
std::unique_ptr< FlowComponentallocAndScheduleFlow_
std::unique_ptr< FlowComponentpostDecompressFlow_
MarkerParsermarkerParser_ = nullptr
 MarkerParser
uint64_t numProcessedPackets_ = 0
 number of packets processed
std::atomic< uint64_t > numReadDataPackets_ = 0
 number of data packets read
TilePartInfo tilePartInfo_
uint64_t startPos_ = 0
uint8_t numSOTsParsed_ = 0
 number of SOT markers parsed
bool truncated_ = false
 true if one of this tile's tile parts is truncated
bool bestEffortDecompressed_ = false
 true if tile was decompressed on a best-effort basis (may have been truncated or errored).
bool scheduledForDecompression_ = false
GrkImageimage_ = nullptr
 GrkImage for this tile
bool isCompressor_
 true if tile will be compressed
Rect32 unreducedImageWindow_
 unreduced image window
uint32_t tileCacheStrategy_ = 0
 tile cache strategy
std::shared_ptr< TPFetchSeqtilePartFetchSeq_
TPSeq tilePartSeq_
std::vector< uint8_t > threadTilePart_
std::mutex pltMutex_
grk_io_band_callback ioBandCallback_ = nullptr
void * ioBandUserData_ = nullptr
bool stripOutputWritten_ = false

Constructor & Destructor Documentation

◆ TileProcessor()

grk::TileProcessor::TileProcessor ( uint16_t index,
TileCodingParams * tcp,
CodeStream * codeStream,
IStream * stream,
bool isCompressor,
uint32_t tileCacheStrategy )

◆ ~TileProcessor()

grk::TileProcessor::~TileProcessor ( )
overridevirtual

Member Function Documentation

◆ allSOTMarkersParsed()

bool grk::TileProcessor::allSOTMarkersParsed ( void )
overridevirtual

Checks if tile is completely parsed.

If the tile is truncated, then it is considered completely parsed.

Returns
true if completely parsed, otherwise false

Implements grk::ITileProcessor.

References numSOTsParsed_, tcp_, and truncated_.

Referenced by decompressPrepareWithTLM().

◆ createDecompressTileComponentWindows()

bool grk::TileProcessor::createDecompressTileComponentWindows ( void )
private

Create a Tile Window Buffers object.

Returns
true if successful

References cp_, grk_get_data_type(), GRK_INT_16, headerImage_, initialized_, needsMctDecompress(), tcp_, tile_, and unreducedImageWindow_.

Referenced by differentialUpdate(), and scheduleAndRunDecompress().

◆ deallocBuffers()

void grk::TileProcessor::deallocBuffers ( )
private

deallocate buffers

References tile_.

Referenced by post_decompressT2T1().

◆ decompress_synch_plugin_with_host()

void grk::TileProcessor::decompress_synch_plugin_with_host ( void )
private

!!! plugin still uses stepsize/2

References current_plugin_tile_, GRK_BIBO_EXTRA_BITS, grk::grklog, headerImage_, and tile_.

Referenced by scheduleAndRunDecompress().

◆ decompressFromCachedTileParts()

bool grk::TileProcessor::decompressFromCachedTileParts ( )
overridevirtual

Parse tile-part packets using cached SOT offsets from tilePartSeq_, without re-reading SOT markers.

Used on second decode for tiles whose SOTs were already parsed on the first pass.

Returns
true if successful

Implements grk::ITileProcessor.

References getStream(), markerParser_, parseTilePart(), prepareForDecompression(), grk::TilePartInfo::remainingTilePartBytes_, grk::sotMarkerSegmentLen, grk::TilePartInfo::tilePart_, grk::TilePartInfo::tilePartLength_, tilePartSeq_, and truncated_.

◆ decompressPrepareWithTLM()

bool grk::TileProcessor::decompressPrepareWithTLM ( const std::shared_ptr< TPFetchSeq > & tilePartFetchSeq)
overridevirtual

Prepares for decompression using Tile Length Markers (TLM).

Parameters
tilePartFetchSeqSequence for fetching tile parts
Returns
true if preparation succeeds, false otherwise

Implements grk::ITileProcessor.

References allSOTMarkersParsed(), getStream(), grk::grklog, markerParser_, parseTilePart(), prepareForDecompression(), setStream(), grk::IStream::tell(), tileIndex_, tilePartFetchSeq_, tilePartInfo_, and truncated_.

Referenced by decompressWithTLM().

◆ decompressWithTLM()

bool grk::TileProcessor::decompressWithTLM ( const std::shared_ptr< TPFetchSeq > & tilePartFetchSeq,
CoderPool * streamPool,
Rect32 unreducedImageBounds,
std::function< void()> post,
TileFutureManager & futures )
overridevirtual

Decompresses the tile using Tile Length Markers (TLM).

Parameters
tilePartFetchSeqSequence for fetching tile parts
streamPoolPool of coders for streaming
unreducedImageBoundsBounds of the unreduced image
postPost-decompression callback function
futuresManager for tile futures
Returns
true if decompression succeeds, false otherwise

Implements grk::ITileProcessor.

References decompressPrepareWithTLM(), and scheduleAndRunDecompress().

◆ differentialUpdate()

bool grk::TileProcessor::differentialUpdate ( Rect32 unreducedImageBounds)
overridevirtual

Updates differential decompress state.

Parameters
unreducedImageBounds
Returns
true
false

Implements grk::ITileProcessor.

References cp_, createDecompressTileComponentWindows(), tcp_, tile_, and unreducedImageWindow_.

◆ doPostT1()

bool grk::TileProcessor::doPostT1 ( void )
overridevirtual

Performs post T1 processing.

Returns
true if successful

Implements grk::ITileProcessor.

References current_plugin_tile_, and GRK_DECODE_POST_T1.

Referenced by post_decompressT2T1().

◆ getCodingParams()

CodingParams * grk::TileProcessor::getCodingParams ( void )
overridevirtual

Get the Coding Params object.

Returns
CodingParams*

Implements grk::ITileProcessor.

References cp_.

Referenced by readPLT(), TileProcessor(), and grk::TileProcessorCompress::TileProcessorCompress().

◆ getCurrentPluginTile()

grk_plugin_tile * grk::TileProcessor::getCurrentPluginTile ( void ) const
overridevirtual

Gets the Current Plugin Tile object.

Returns
grk_plugin_tile*

Implements grk::ITileProcessor.

References current_plugin_tile_.

Referenced by TileProcessor().

◆ getHeaderImage()

GrkImage * grk::TileProcessor::getHeaderImage ( void )
overridevirtual

Get the Header Image object.

Returns
GrkImage*

Implements grk::ITileProcessor.

References headerImage_.

Referenced by TileProcessor().

◆ getImage()

GrkImage * grk::TileProcessor::getImage ( void )
overridevirtual

Gets the tile GrkImage.

Returns
GrkImage*

Implements grk::ITileProcessor.

References image_.

◆ getIndex()

uint16_t grk::TileProcessor::getIndex ( void ) const
overridevirtual

Get the Index object.

Returns
uint16_t

Implements grk::ITileProcessor.

References tileIndex_.

◆ getMaxNumDecompressResolutions()

uint8_t grk::TileProcessor::getMaxNumDecompressResolutions ( void )
overridevirtual

Get the Max Num Decompress Resolutions object.

Returns
uint8_t

Implements grk::ITileProcessor.

References cp_, tcp_, and tile_.

◆ getMCT()

Mct * grk::TileProcessor::getMCT ( void )
overridevirtual

gets Mct

Returns
Mct*

Implements grk::ITileProcessor.

References mct_.

◆ getNumProcessedPackets()

uint64_t grk::TileProcessor::getNumProcessedPackets ( void )
overridevirtual

Get the Num Processed Packets object.

Returns
uint64_t

Implements grk::ITileProcessor.

References numProcessedPackets_.

◆ getPacketLengthCache()

std::shared_ptr< PacketLengthCache< uint32_t > > grk::TileProcessor::getPacketLengthCache ( void )
overridevirtual

Get the Packet Length Cache object.

Returns
std::shared_ptr<PacketLengthCache<uint32_t>>

Implements grk::ITileProcessor.

References packetLengthCache_.

Referenced by readPLT().

◆ getProgressionState()

grk_progression_state grk::TileProcessor::getProgressionState ( )
overridevirtual

Gets the progression state.

Returns
The progression state

Implements grk::ITileProcessor.

References tile_, and tileIndex_.

◆ getScheduler()

CodecScheduler * grk::TileProcessor::getScheduler ( void )
overridevirtual

Get the Scheduler object.

Returns
CodecScheduler*

Implements grk::ITileProcessor.

References scheduler_.

◆ getStream()

IStream * grk::TileProcessor::getStream ( void )
overridevirtual

Get the Stream object.

Returns
IStream*

Implements grk::ITileProcessor.

References markerParser_, and stream_.

Referenced by decompressFromCachedTileParts(), decompressPrepareWithTLM(), readSOT(), scheduleAndRunDecompress(), and setProcessors().

◆ getTCP()

TileCodingParams * grk::TileProcessor::getTCP ( void )
overridevirtual
Returns
TileCodingParams*

Implements grk::ITileProcessor.

References tcp_.

Referenced by grk::TileProcessorCompress::init(), and readSOT().

◆ getTile()

Tile * grk::TileProcessor::getTile ( void )
overridevirtual

Get the Tile object.

Returns
Tile*

Implements grk::ITileProcessor.

References tile_.

Referenced by scheduleAndRunDecompress().

◆ getTileCacheStrategy()

uint32_t grk::TileProcessor::getTileCacheStrategy ( void )
overridevirtual

Gets the Tile Cache Strategy object.

Returns
uint32_t

Implements grk::ITileProcessor.

References tileCacheStrategy_.

◆ getUnreducedTileWindow()

Rect32 grk::TileProcessor::getUnreducedTileWindow ( void )
overridevirtual

Get the Unreduced Tile Window object.

Returns
Rect32

Implements grk::ITileProcessor.

References tile_, and unreducedImageWindow_.

◆ hasError()

bool grk::TileProcessor::hasError ( void )
overridevirtual

Checks if an error has occurred.

Returns
true if error, false otherwise

Implements grk::ITileProcessor.

References success_.

Referenced by parseTilePart(), prepareForDecompression(), and scheduleAndRunDecompress().

◆ hasUnparsedTileParts()

bool grk::TileProcessor::hasUnparsedTileParts ( )
overridevirtual

True when we know for certain that tile parts are missing.

Returns true only when the SOT marker explicitly signalled a tile-part count (TNsot > 0) and fewer parts have been parsed so far. When TNsot is 0 (unspecified), we cannot tell whether parts are missing, so this returns false— callers should not assume the tile is incomplete.

Implements grk::ITileProcessor.

References numSOTsParsed_, tcp_, and truncated_.

◆ incNumProcessedPackets() [1/2]

void grk::TileProcessor::incNumProcessedPackets ( uint64_t numPackets)
overridevirtual
Parameters
numPackets

Implements grk::ITileProcessor.

References numProcessedPackets_.

◆ incNumProcessedPackets() [2/2]

void grk::TileProcessor::incNumProcessedPackets ( void )
overridevirtual

Increments the number of processed packets by 1.

Implements grk::ITileProcessor.

References numProcessedPackets_.

◆ incNumReadDataPackets()

void grk::TileProcessor::incNumReadDataPackets ( void )
overridevirtual

Increments the number of read data packets by 1.

Implements grk::ITileProcessor.

References numReadDataPackets_.

◆ incrementIndex()

void grk::TileProcessor::incrementIndex ( void )
overridevirtual

Increments the tile index.

Implements grk::ITileProcessor.

References tileIndex_.

◆ init()

◆ isBestEffortDecompressed()

bool grk::TileProcessor::isBestEffortDecompressed ( void )
overridevirtual

Check if tile was decompressed on a best-effort basis (may have been truncated or errored).

Such tiles should not be re-decompressed on codec reuse.

Implements grk::ITileProcessor.

References bestEffortDecompressed_.

◆ isCompressor()

bool grk::TileProcessor::isCompressor ( void )
overridevirtual
Returns
true
false

Implements grk::ITileProcessor.

References isCompressor_.

Referenced by init(), and TileProcessor().

◆ isInitialized()

bool grk::TileProcessor::isInitialized ( void )
overridevirtual

Checks if the processor is initialized.

Returns
true if initialized, false otherwise

Implements grk::ITileProcessor.

References initialized_.

◆ isStripOutputWritten()

bool grk::TileProcessor::isStripOutputWritten ( ) const
inlineoverridevirtual

Check if strip-mode output was written directly (bypass multi-tile band callback).

Implements grk::ITileProcessor.

References stripOutputWritten_.

◆ needsMctDecompress() [1/2]

bool grk::TileProcessor::needsMctDecompress ( uint16_t compno)
overridevirtual
Parameters
compno
Returns
true
false

Implements grk::ITileProcessor.

References needsMctDecompress().

◆ needsMctDecompress() [2/2]

◆ parseTilePart()

bool grk::TileProcessor::parseTilePart ( std::vector< std::unique_ptr< MarkerParser > > * parsers,
IStream * bifurcatedStream,
uint16_t mainMarkerId,
TilePartInfo tilePartInfo )
overridevirtual

◆ post_decompressT2T1()

void grk::TileProcessor::post_decompressT2T1 ( GrkImage * scratch)
overridevirtual

◆ prepareConcurrentParsing()

void grk::TileProcessor::prepareConcurrentParsing ( void )
private

◆ prepareForDecompression()

void grk::TileProcessor::prepareForDecompression ( void )
overridevirtual

Prepares for decompression.

If this fails, then TileProcessor doesn't get initialized.

Implements grk::ITileProcessor.

References grk::grklog, hasError(), init(), prepareFlow_, scheduledForDecompression_, success_, tcp_, and tileIndex_.

Referenced by decompressFromCachedTileParts(), and decompressPrepareWithTLM().

◆ readPLT()

bool grk::TileProcessor::readPLT ( uint8_t * headerData,
uint16_t headerSize )
overridevirtual

Reads a PLT marker (Packet length, tile-part header).

Parameters
headerDataheader data
headerSizesize of header data
Returns
true if successful

Implements grk::ITileProcessor.

References getCodingParams(), getPacketLengthCache(), GRK_RANDOM_ACCESS_PLT, pltMutex_, threadTilePart_, and TFSingleton::workerId().

Referenced by setProcessors().

◆ readSOT()

bool grk::TileProcessor::readSOT ( IStream * stream,
uint8_t * headerData,
uint16_t headerSize,
TilePartInfo & tilePartInfo,
bool needToReadIndexAndLength )
overridevirtual

◆ reinitForReDecompress()

bool grk::TileProcessor::reinitForReDecompress ( void )
overridevirtual

Reinitialize for re-decompression after LRU eviction.

Recreates the Tile structure and re-runs init() so that the T2+T1 pipeline can be re-executed from cached packet data.

Returns
true if successful

Implements grk::ITileProcessor.

References headerImage_, init(), initialized_, scheduledForDecompression_, tcp_, and tile_.

◆ release() [1/2]

void grk::TileProcessor::release ( uint32_t strategy)
overridevirtual

release select resources

Parameters
strategytile cache strategy

Implements grk::ITileProcessor.

References GRK_TILE_CACHE_ALL, GRK_TILE_CACHE_LRU, GRK_TILE_CACHE_NONE, grk::grk_unref(), image_, tile_, and tilePartFetchSeq_.

◆ release() [2/2]

void grk::TileProcessor::release ( void )
overridevirtual

Releases resources - image and tile.

Implements grk::ITileProcessor.

References release(), and tileCacheStrategy_.

Referenced by release(), and ~TileProcessor().

◆ releaseForSwath()

void grk::TileProcessor::releaseForSwath ( )
overridevirtual

Unconditionally releases both image and tile data (swath consumer path).

Implements grk::ITileProcessor.

References GRK_TILE_CACHE_IMAGE, grk::grk_unref(), image_, tile_, and tileCacheStrategy_.

◆ resetSOTParsing()

void grk::TileProcessor::resetSOTParsing ( )
overridevirtual

Reset SOT parsing state so the tile can be re-parsed from the codestream.

Implements grk::ITileProcessor.

References numSOTsParsed_, scheduledForDecompression_, tcp_, and tilePartSeq_.

◆ scheduleAndRunDecompress()

◆ scheduledForDecompression()

bool grk::TileProcessor::scheduledForDecompression ( void )
overridevirtual

◆ setBestEffortDecompressed()

void grk::TileProcessor::setBestEffortDecompressed ( void )
overridevirtual

◆ setCurrentPluginTile()

void grk::TileProcessor::setCurrentPluginTile ( grk_plugin_tile * tile)
overridevirtual

Set the Current Plugin Tile object.

Parameters
tile

Implements grk::ITileProcessor.

References current_plugin_tile_.

◆ setImage()

void grk::TileProcessor::setImage ( GrkImage * img)
overridevirtual

Gets the tile GrkImage.

Parameters
imgGrkImage

Implements grk::ITileProcessor.

References grk::grk_unref(), and image_.

◆ setProcessors()

void grk::TileProcessor::setProcessors ( MarkerParser * parser)
overridevirtual

◆ setStream()

void grk::TileProcessor::setStream ( IStream * stream,
bool ownsStream )
overridevirtual

Sets the stream for input/output operations.

Parameters
streamThe stream to set
ownsStreamTrue if the processor owns the stream and should manage its lifetime

Implements grk::ITileProcessor.

References markerParser_, and stream_.

Referenced by decompressPrepareWithTLM(), and TileProcessor().

◆ setTruncated()

void grk::TileProcessor::setTruncated ( void )
overridevirtual

Sets processor to truncated if not all tile parts have been parsed.

Implements grk::ITileProcessor.

References numSOTsParsed_, tcp_, and truncated_.

◆ shouldDecodeComponent()

bool grk::TileProcessor::shouldDecodeComponent ( uint16_t compno)
overridevirtual

Check if a component should be decoded based on user selection.

When MCT=1 is active and any of components 0-2 is requested, all three are decoded.

Parameters
compno0-based component index
Returns
true if the component should be decoded

Implements grk::ITileProcessor.

References cp_, and needsMctDecompress().

Referenced by scheduleAndRunDecompress().

Member Data Documentation

◆ allocAndScheduleFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::allocAndScheduleFlow_
private

◆ bestEffortDecompressed_

bool grk::TileProcessor::bestEffortDecompressed_ = false
private

true if tile was decompressed on a best-effort basis (may have been truncated or errored).

Not re-decompressed on codec reuse.

Referenced by isBestEffortDecompressed(), and setBestEffortDecompressed().

◆ blockTasks_

std::vector<tf::Task> grk::TileProcessor::blockTasks_
private

◆ concurrentFlowsStale_

bool grk::TileProcessor::concurrentFlowsStale_ = false
private

◆ cp_

◆ current_plugin_tile_

◆ headerImage_

◆ image_

GrkImage* grk::TileProcessor::image_ = nullptr
private

◆ initialized_

bool grk::TileProcessor::initialized_ = false
private

◆ ioBandCallback_

grk_io_band_callback grk::TileProcessor::ioBandCallback_ = nullptr
private

◆ ioBandUserData_

void* grk::TileProcessor::ioBandUserData_ = nullptr
private

◆ isCompressor_

bool grk::TileProcessor::isCompressor_
private

true if tile will be compressed

Referenced by init(), isCompressor(), TileProcessor(), and ~TileProcessor().

◆ markerParser_

◆ mct_

◆ numProcessedPackets_

uint64_t grk::TileProcessor::numProcessedPackets_ = 0
private

◆ numReadDataPackets_

std::atomic<uint64_t> grk::TileProcessor::numReadDataPackets_ = 0
private

number of data packets read

Referenced by incNumReadDataPackets(), and scheduleAndRunDecompress().

◆ numSOTsParsed_

uint8_t grk::TileProcessor::numSOTsParsed_ = 0
private

number of SOT markers parsed

Referenced by allSOTMarkersParsed(), hasUnparsedTileParts(), readSOT(), resetSOTParsing(), and setTruncated().

◆ packetLengthCache_

◆ pltMutex_

std::mutex grk::TileProcessor::pltMutex_
private

Referenced by readPLT().

◆ postDecompressFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::postDecompressFlow_
private

◆ prepareFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::prepareFlow_
private

◆ rootFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::rootFlow_
private

◆ scheduledForDecompression_

bool grk::TileProcessor::scheduledForDecompression_ = false
private

◆ scheduler_

◆ schedulerFreebyrd_

SchedulerFreebyrd* grk::TileProcessor::schedulerFreebyrd_ = nullptr
protected

SchedulerFreebyrd — strip-based decompression via freebyrd pool

Referenced by post_decompressT2T1(), scheduleAndRunDecompress(), and ~TileProcessor().

◆ staleParsing_

std::vector<std::unique_ptr<FlowComponent> > grk::TileProcessor::staleParsing_
private

◆ startPos_

uint64_t grk::TileProcessor::startPos_ = 0
private

◆ stream_

◆ stripOutputWritten_

bool grk::TileProcessor::stripOutputWritten_ = false
private

◆ success_

std::atomic<bool> grk::TileProcessor::success_ = true
private

◆ t2ParseFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::t2ParseFlow_
private

◆ tcp_

◆ threadTilePart_

std::vector<uint8_t> grk::TileProcessor::threadTilePart_
private

◆ tile_

◆ tileCacheStrategy_

uint32_t grk::TileProcessor::tileCacheStrategy_ = 0
private

tile cache strategy

Referenced by getTileCacheStrategy(), release(), releaseForSwath(), and TileProcessor().

◆ tileHeaderParseFlow_

std::unique_ptr<FlowComponent> grk::TileProcessor::tileHeaderParseFlow_
private

◆ tileIndex_

◆ tilePartFetchSeq_

std::shared_ptr<TPFetchSeq> grk::TileProcessor::tilePartFetchSeq_
private

◆ tilePartInfo_

TilePartInfo grk::TileProcessor::tilePartInfo_
private

◆ tilePartSeq_

TPSeq grk::TileProcessor::tilePartSeq_
private

◆ truncated_

bool grk::TileProcessor::truncated_ = false
private

◆ unreducedImageWindow_

Rect32 grk::TileProcessor::unreducedImageWindow_
private

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