|
Grok 20.3.2
|
Interface for managing tile compression/decompression. More...
#include <ITileProcessor.h>
Public Member Functions | |
| virtual | ~ITileProcessor ()=default |
| Destroys the TileProcessor. | |
| virtual void | setProcessors (MarkerParser *parser)=0 |
| Sets the marker parser for processing. | |
| virtual bool | init (void)=0 |
| Initializes the TileProcessor. | |
| virtual void | setStream (IStream *stream, bool ownsStream)=0 |
| Sets the stream for input/output operations. | |
| virtual bool | decompressWithTLM (const std::shared_ptr< TPFetchSeq > &tilePartFetchSeq, CoderPool *streamPool, Rect32 unreducedImageBounds, std::function< void()> post, TileFutureManager &futures)=0 |
| Decompresses the tile using Tile Length Markers (TLM). | |
| virtual bool | decompressPrepareWithTLM (const std::shared_ptr< TPFetchSeq > &tilePartFetchSeq)=0 |
| Prepares for decompression using Tile Length Markers (TLM). | |
| virtual bool | doPostT1 (void)=0 |
| Performs post-T1 processing. | |
| virtual void | prepareForDecompression (void)=0 |
| Prepares the processor for decompression. | |
| virtual bool | parseTilePart (std::vector< std::unique_ptr< MarkerParser > > *parsers, IStream *bifurcatedStream, uint16_t mainMarkerId, TilePartInfo tilePartInfo)=0 |
| Parses a tile part. | |
| virtual bool | decompressFromCachedTileParts ()=0 |
| Parse tile-part packets using cached SOT offsets from tilePartSeq_, without re-reading SOT markers. | |
| virtual bool | readSOT (IStream *stream, uint8_t *headerData, uint16_t headerSize, TilePartInfo &tilePartInfo, bool needToReadIndexAndLength)=0 |
| Reads the Start of Tile (SOT) marker. | |
| virtual void | scheduleAndRunDecompress (CoderPool *coderPool, Rect32 unreducedImageBounds, std::function< void()> post, TileFutureManager &futures)=0 |
| Schedules T2/T1 decompression tasks. | |
| virtual void | post_decompressT2T1 (GrkImage *scratch)=0 |
| Performs post-T2+T1 decompression processing. | |
| virtual bool | differentialUpdate (Rect32 unreducedImageBounds)=0 |
| Updates the differential decompression state. | |
| virtual GrkImage * | getImage (void)=0 |
| Gets the associated GrkImage for the tile. | |
| virtual void | setImage (GrkImage *img)=0 |
| Sets the associated GrkImage for the tile. | |
| virtual Rect32 | getUnreducedTileWindow (void)=0 |
| Gets the unreduced tile window. | |
| virtual TileCodingParams * | getTCP (void)=0 |
| Gets the Tile Coding Parameters (TCP). | |
| virtual uint8_t | getMaxNumDecompressResolutions (void)=0 |
| Gets the maximum number of decompress resolutions. | |
| virtual IStream * | getStream (void)=0 |
| Gets the associated stream. | |
| virtual uint16_t | getIndex (void) const =0 |
| Gets the tile index. | |
| virtual void | incrementIndex (void)=0 |
| Increments the tile index. | |
| virtual Tile * | getTile (void)=0 |
| Gets the associated Tile. | |
| virtual grk_progression_state | getProgressionState ()=0 |
| Gets the progression state. | |
| virtual CodecScheduler * | getScheduler (void)=0 |
| Gets the codec scheduler. | |
| virtual bool | isCompressor (void)=0 |
| Checks if the processor is in compressor mode. | |
| virtual uint64_t | getNumProcessedPackets (void)=0 |
| Gets the number of processed packets. | |
| virtual void | incNumProcessedPackets (void)=0 |
| Increments the number of processed packets by 1. | |
| virtual void | incNumProcessedPackets (uint64_t numPackets)=0 |
| Increments the number of processed packets by a specified amount. | |
| virtual void | incNumReadDataPackets (void)=0 |
| Increments the number of read data packets by 1. | |
| virtual uint32_t | getTileCacheStrategy (void)=0 |
| Gets the tile cache strategy. | |
| virtual grk_plugin_tile * | getCurrentPluginTile (void) const =0 |
| Gets the current plugin tile. | |
| virtual void | setCurrentPluginTile (grk_plugin_tile *tile)=0 |
| Sets the current plugin tile. | |
| virtual CodingParams * | getCodingParams (void)=0 |
| Gets the coding parameters. | |
| virtual GrkImage * | getHeaderImage (void)=0 |
| Gets the header image. | |
| virtual std::shared_ptr< PacketLengthCache< uint32_t > > | getPacketLengthCache (void)=0 |
| Gets the packet length cache. | |
| virtual bool | needsMctDecompress (uint16_t compno)=0 |
| Checks if MCT decompression is needed for a specific component. | |
| virtual bool | needsMctDecompress (void)=0 |
| Checks if MCT decompression is needed overall. | |
| virtual bool | shouldDecodeComponent (uint16_t compno)=0 |
| Check if a component should be decoded based on user selection. | |
| virtual Mct * | getMCT (void)=0 |
| Gets the MCT (Multi-Component Transform) object. | |
| virtual void | release (void)=0 |
| Releases all resources (image and tile). | |
| virtual void | release (uint32_t strategy)=0 |
| Releases select resources based on strategy. | |
| virtual void | releaseForSwath ()=0 |
| Unconditionally releases both image and tile data (swath consumer path). | |
| virtual bool | readPLT (uint8_t *headerData, uint16_t headerSize)=0 |
| Reads a PLT marker (Packet length, tile-part header). | |
| virtual bool | allSOTMarkersParsed ()=0 |
| Checks if all SOT markers for the tile are parsed. | |
| virtual bool | hasUnparsedTileParts ()=0 |
| True when we know for certain that tile parts are missing. | |
| virtual void | resetSOTParsing ()=0 |
| Reset SOT parsing state so the tile can be re-parsed from the codestream. | |
| virtual void | setTruncated (void)=0 |
| Sets the processor to truncated state if not all tile parts are parsed. | |
| virtual bool | hasError (void)=0 |
| Checks if an error has occurred. | |
| virtual bool | isInitialized (void)=0 |
| Checks if the processor is initialized. | |
| virtual bool | isBestEffortDecompressed (void)=0 |
| Check if tile was decompressed on a best-effort basis (may have been truncated or errored). | |
| virtual void | setBestEffortDecompressed (void)=0 |
| virtual bool | scheduledForDecompression (void)=0 |
| virtual bool | reinitForReDecompress (void)=0 |
| Reinitialize for re-decompression after LRU eviction. | |
| virtual bool | isStripOutputWritten () const =0 |
| Check if strip-mode output was written directly (bypass multi-tile band callback). | |
Interface for managing tile compression/decompression.
|
virtualdefault |
Destroys the TileProcessor.
|
pure virtual |
Checks if all SOT markers for the tile are parsed.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::decompressTileImpl().
|
pure virtual |
Parse tile-part packets using cached SOT offsets from tilePartSeq_, without re-reading SOT markers.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::decompressTileImpl().
|
pure virtual |
Prepares for decompression using Tile Length Markers (TLM).
| tilePartFetchSeq | Sequence for fetching tile parts |
Implemented in grk::TileProcessor.
|
pure virtual |
Decompresses the tile using Tile Length Markers (TLM).
| tilePartFetchSeq | Sequence for fetching tile parts |
| streamPool | Pool of coders for streaming |
| unreducedImageBounds | Bounds of the unreduced image |
| post | Post-decompression callback function |
| futures | Manager for tile futures |
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::decompressTileImpl(), and grk::CodeStreamDecompress::genDecompressTileTLMTask().
|
pure virtual |
Updates the differential decompression state.
| unreducedImageBounds | Bounds of the unreduced image |
Implemented in grk::TileProcessor.
|
pure virtual |
Performs post-T1 processing.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Gets the coding parameters.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Gets the current plugin tile.
Implemented in grk::TileProcessor.
Referenced by grk::compress_synch_with_plugin().
|
pure virtual |
Gets the header image.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Gets the associated GrkImage for the tile.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postMultiTile().
|
pure virtual |
Gets the tile index.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postMultiTile(), grk::CodeStreamDecompress::postSingleTile(), grk::CodeStreamDecompress::schedule(), grk::CodeStreamDecompress::sequentialParseAndSchedule(), grk::SOTMarker::write(), grk::CodeStreamCompress::writeTilePart(), and grk::CodeStreamCompress::writeTileParts().
|
pure virtual |
Gets the maximum number of decompress resolutions.
Implemented in grk::TileProcessor.
|
pure virtual |
Gets the MCT (Multi-Component Transform) object.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Gets the number of processed packets.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::decompressTileImpl().
|
pure virtual |
Gets the packet length cache.
Implemented in grk::TileProcessor.
|
pure virtual |
|
pure virtual |
Gets the codec scheduler.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Gets the associated stream.
Implemented in grk::TileProcessor.
Referenced by grk::SOTMarker::write().
|
pure virtual |
Gets the Tile Coding Parameters (TCP).
Implemented in grk::TileProcessor.
Referenced by grk::PacketManager::PacketManager(), grk::DecompressScheduler::scheduleT1(), grk::DecompressSchedulerExcalibur::scheduleT1(), and grk::SOTMarker::write().
|
pure virtual |
Gets the associated Tile.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1(), and grk::DecompressSchedulerExcalibur::scheduleT1().
|
pure virtual |
Gets the tile cache strategy.
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1(), and grk::DecompressSchedulerExcalibur::scheduleT1().
|
pure virtual |
Gets the unreduced tile window.
Implemented in grk::TileProcessor.
|
pure virtual |
Checks if an error has occurred.
Implemented in grk::TileProcessor.
|
pure virtual |
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.
Implemented in grk::TileProcessor.
|
pure virtual |
Increments the number of processed packets by a specified amount.
| numPackets | Number of packets to add |
Implemented in grk::TileProcessor.
|
pure virtual |
Increments the number of processed packets by 1.
Implemented in grk::TileProcessor.
|
pure virtual |
Increments the number of read data packets by 1.
Implemented in grk::TileProcessor.
|
pure virtual |
Increments the tile index.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamCompress::writeTileParts().
|
pure virtual |
Initializes the TileProcessor.
Implemented in grk::TileProcessor, and grk::TileProcessorCompress.
|
pure virtual |
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.
Implemented in grk::TileProcessor.
|
pure virtual |
Checks if the processor is in compressor mode.
Implemented in grk::TileProcessor.
|
pure virtual |
Checks if the processor is initialized.
Implemented in grk::TileProcessor.
|
pure virtual |
Check if strip-mode output was written directly (bypass multi-tile band callback).
Implemented in grk::TileProcessor.
|
pure virtual |
Checks if MCT decompression is needed for a specific component.
| compno | Component number |
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().
|
pure virtual |
Checks if MCT decompression is needed overall.
Implemented in grk::TileProcessor.
|
pure virtual |
Parses a tile part.
| parsers | Vector of unique marker parsers |
| bifurcatedStream | Bifurcated stream for reading |
| mainMarkerId | ID of the main marker |
| tilePartInfo | Information about the tile part |
Implemented in grk::TileProcessor.
|
pure virtual |
Performs post-T2+T1 decompression processing.
| scratch | Scratch image for processing |
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postMultiTile(), and grk::CodeStreamDecompress::postSingleTile().
|
pure virtual |
Prepares the processor for decompression.
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::sequentialParseAndSchedule().
|
pure virtual |
Reads a PLT marker (Packet length, tile-part header).
| headerData | Header data buffer |
| headerSize | Size of the header data |
Implemented in grk::TileProcessor.
|
pure virtual |
Reads the Start of Tile (SOT) marker.
| stream | Input stream |
| headerData | Header data buffer |
| headerSize | Size of the header data |
| tilePartInfo | Reference to tile part information (updated on success) |
| needToReadIndexAndLength | True if index and length need to be read |
Implemented in grk::TileProcessor.
|
pure virtual |
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.
Implemented in grk::TileProcessor.
|
pure virtual |
Releases select resources based on strategy.
| strategy | Tile cache strategy |
Implemented in grk::TileProcessor.
|
pure virtual |
Releases all resources (image and tile).
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postMultiTile().
|
pure virtual |
Unconditionally releases both image and tile data (swath consumer path).
Implemented in grk::TileProcessor.
|
pure virtual |
Reset SOT parsing state so the tile can be re-parsed from the codestream.
Implemented in grk::TileProcessor.
|
pure virtual |
Schedules T2/T1 decompression tasks.
| coderPool | Pool of coders |
| unreducedImageBounds | Bounds of the unreduced image |
| post | Post-scheduling callback function |
| futures | Manager for tile futures |
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::schedule().
|
pure virtual |
Implemented in grk::TileProcessor.
|
pure virtual |
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postMultiTile().
|
pure virtual |
Sets the current plugin tile.
| tile | Pointer to the grk_plugin_tile to set |
Implemented in grk::TileProcessor.
|
pure virtual |
Sets the associated GrkImage for the tile.
| img | Pointer to the GrkImage to set |
Implemented in grk::TileProcessor.
Referenced by grk::CodeStreamDecompress::postSingleTile().
|
pure virtual |
Sets the marker parser for processing.
| parser | The marker parser to set |
Implemented in grk::TileProcessor.
|
pure virtual |
Sets the stream for input/output operations.
| stream | The stream to set |
| ownsStream | True if the processor owns the stream and should manage its lifetime |
Implemented in grk::TileProcessor.
|
pure virtual |
Sets the processor to truncated state if not all tile parts are parsed.
Implemented in grk::TileProcessor.
|
pure virtual |
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.
| compno | 0-based component index |
Implemented in grk::TileProcessor.
Referenced by grk::DecompressScheduler::scheduleT1().