Grok 20.3.2
grk::ITileProcessorCompress Struct Referenceabstract

Interface for managing tile compression. More...

#include <ITileProcessorCompress.h>

Inheritance diagram for grk::ITileProcessorCompress:
grk::ITileProcessor grk::TileProcessorCompress

Public Member Functions

virtual ~ITileProcessorCompress ()=default
 Destroys the TileProcessorCompress.
virtual PacketTrackergetPacketTracker (void)=0
 Gets the packet tracker.
virtual bool preCompressTile (size_t thread_id)=0
 Pre-compresses the tile (compression-only preparation).
virtual bool canWritePocMarker (void)=0
 Checks whether a POC marker can be written for this tile.
virtual bool writeTilePartT2 (uint32_t *tileBytesWritten)=0
 Writes the T2 part of the current tile part.
virtual bool doCompress (void)=0
 Performs the full tile compression (T1 + T2 + rate allocation).
virtual bool ingestUncompressedData (uint8_t *p_src, uint64_t src_length)=0
 Ingests uncompressed image data into the tile.
virtual bool needsRateControl (void)=0
 Checks whether rate control is required for this tile.
virtual uint32_t getPreCalculatedTileLen (void)=0
 Gets the pre-calculated tile length (for rate control optimization).
virtual bool canPreCalculateTileLen (void)=0
 Checks whether the tile length can be pre-calculated.
virtual void setFirstPocTilePart (bool res)=0
 Sets whether this tile part is the first POC tile part.
virtual void setProgIterNum (uint32_t num)=0
 Sets the current progression iterator number.
virtual uint8_t getTilePartCounter (void) const =0
 Gets the current tile-part counter.
virtual void incTilePartCounter (void)=0
 Increments the tile-part counter.
Public Member Functions inherited from grk::ITileProcessor
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 GrkImagegetImage (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 TileCodingParamsgetTCP (void)=0
 Gets the Tile Coding Parameters (TCP).
virtual uint8_t getMaxNumDecompressResolutions (void)=0
 Gets the maximum number of decompress resolutions.
virtual IStreamgetStream (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 TilegetTile (void)=0
 Gets the associated Tile.
virtual grk_progression_state getProgressionState ()=0
 Gets the progression state.
virtual CodecSchedulergetScheduler (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_tilegetCurrentPluginTile (void) const =0
 Gets the current plugin tile.
virtual void setCurrentPluginTile (grk_plugin_tile *tile)=0
 Sets the current plugin tile.
virtual CodingParamsgetCodingParams (void)=0
 Gets the coding parameters.
virtual GrkImagegetHeaderImage (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 MctgetMCT (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).

Detailed Description

Interface for managing tile compression.

Constructor & Destructor Documentation

◆ ~ITileProcessorCompress()

virtual grk::ITileProcessorCompress::~ITileProcessorCompress ( )
virtualdefault

Destroys the TileProcessorCompress.

Member Function Documentation

◆ canPreCalculateTileLen()

virtual bool grk::ITileProcessorCompress::canPreCalculateTileLen ( void )
pure virtual

Checks whether the tile length can be pre-calculated.

Returns
true if pre-calculation is possible, false otherwise

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTilePart().

◆ canWritePocMarker()

virtual bool grk::ITileProcessorCompress::canWritePocMarker ( void )
pure virtual

Checks whether a POC marker can be written for this tile.

Returns
true if POC marker is allowed, false otherwise

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTilePart().

◆ doCompress()

virtual bool grk::ITileProcessorCompress::doCompress ( void )
pure virtual

Performs the full tile compression (T1 + T2 + rate allocation).

Returns
true if compression succeeds, false otherwise

Implemented in grk::TileProcessorCompress.

◆ getPacketTracker()

virtual PacketTracker * grk::ITileProcessorCompress::getPacketTracker ( void )
pure virtual

Gets the packet tracker.

Returns
Pointer to the PacketTracker

Implemented in grk::TileProcessorCompress.

◆ getPreCalculatedTileLen()

virtual uint32_t grk::ITileProcessorCompress::getPreCalculatedTileLen ( void )
pure virtual

Gets the pre-calculated tile length (for rate control optimization).

Returns
pre-calculated tile length in bytes

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTilePart().

◆ getTilePartCounter()

virtual uint8_t grk::ITileProcessorCompress::getTilePartCounter ( void ) const
pure virtual

Gets the current tile-part counter.

Returns
current tile-part counter value

Implemented in grk::TileProcessorCompress.

Referenced by grk::SOTMarker::write(), and grk::CodeStreamCompress::writeTileParts().

◆ incTilePartCounter()

virtual void grk::ITileProcessorCompress::incTilePartCounter ( void )
pure virtual

Increments the tile-part counter.

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTilePart().

◆ ingestUncompressedData()

virtual bool grk::ITileProcessorCompress::ingestUncompressedData ( uint8_t * p_src,
uint64_t src_length )
pure virtual

Ingests uncompressed image data into the tile.

Parameters
p_srcpointer to source uncompressed data
src_lengthlength of the source data in bytes
Returns
true if ingestion succeeds, false otherwise

Implemented in grk::TileProcessorCompress.

◆ needsRateControl()

virtual bool grk::ITileProcessorCompress::needsRateControl ( void )
pure virtual

Checks whether rate control is required for this tile.

Returns
true if rate control is needed, false otherwise

Implemented in grk::TileProcessorCompress.

Referenced by grk::compress_synch_with_plugin().

◆ preCompressTile()

virtual bool grk::ITileProcessorCompress::preCompressTile ( size_t thread_id)
pure virtual

Pre-compresses the tile (compression-only preparation).

Parameters
thread_idID of the thread performing the pre-compression
Returns
true if pre-compression succeeds, false otherwise

Implemented in grk::TileProcessorCompress.

◆ setFirstPocTilePart()

virtual void grk::ITileProcessorCompress::setFirstPocTilePart ( bool res)
pure virtual

Sets whether this tile part is the first POC tile part.

Parameters
restrue for first POC tile part, false otherwise

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTileParts().

◆ setProgIterNum()

virtual void grk::ITileProcessorCompress::setProgIterNum ( uint32_t num)
pure virtual

Sets the current progression iterator number.

Parameters
numnew progression iterator value

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTileParts().

◆ writeTilePartT2()

virtual bool grk::ITileProcessorCompress::writeTilePartT2 ( uint32_t * tileBytesWritten)
pure virtual

Writes the T2 part of the current tile part.

Parameters
tileBytesWritten[out] number of bytes written for this tile part
Returns
true if writing succeeds, false otherwise

Implemented in grk::TileProcessorCompress.

Referenced by grk::CodeStreamCompress::writeTilePart().


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