52#pragma warning( suppress : 4351 )
77 uint32_t
ComposeBitplane(uint32_t bufferSize,
DataT planeMask, uint32_t* sigBits, uint32_t* refBits, uint32_t* signBits);
79 uint32_t
ComposeBitplaneRLD(uint32_t bufferSize,
DataT planeMask, uint32_t* sigBits, uint32_t* refBits, uint32_t signPos);
99 PGFPostHeader& postHeader, uint32_t*& levelLength, uint64_t& userDataPos,
100 bool useOMP, uint32_t userDataPolicy);
117 void Partition(
CSubband* band,
int quantParam,
int width,
int height,
int startPos,
int pitch);
144 void Skip(uint64_t offset);
176#ifdef __PGFROISUPPORT__
181 void SkipTileBuffer();
185 void SetROI() { m_roi =
true; }
206#ifdef __PGFROISUPPORT__
PGF wavelet subband class.
A macro block is a decoding unit of fixed size (uncoded).
DataT m_value[BufferSize]
output buffer of values with index m_valuePos
uint32_t ComposeBitplane(uint32_t bufferSize, DataT planeMask, uint32_t *sigBits, uint32_t *refBits, uint32_t *signBits)
bool m_sigFlagVector[BufferSize+1]
uint32_t m_valuePos
current position in m_value
ROIBlockHeader m_header
block header
void SetBitAtPos(uint32_t pos, DataT planeMask)
CMacroBlock()
Constructor: Initializes new macro block.
void SetSign(uint32_t pos, bool sign)
uint32_t m_codeBuffer[CodeBufferLen]
input buffer for encoded bitstream
uint32_t ComposeBitplaneRLD(uint32_t bufferSize, DataT planeMask, uint32_t sigPos, uint32_t *refBits)
bool IsCompletelyRead() const
int m_macroBlocksAvailable
number of decoded macro blocks (including currently used macro block)
CMacroBlock ** m_macroBlocks
array of macroblocks
void Skip(uint64_t offset)
void Partition(CSubband *band, int quantParam, int width, int height, int startPos, int pitch)
int m_currentBlockIndex
index of current macro block
int m_macroBlockLen
array length
uint32_t ReadEncodedData(uint8_t *target, uint32_t len) const
CPGFStream * m_stream
input PGF stream
void SetStreamPosToData()
Resets stream position to beginning of data block.
void ReadMacroBlock(CMacroBlock *block)
throws IOException
void DequantizeValue(CSubband *band, uint32_t bandPos, int quantParam)
uint64_t m_streamSizeEstimation
estimation of stream size
void DecodeInterleaved(CWaveletTransform *wtChannel, int level, int quantParam)
uint32_t m_encodedHeaderLength
stream offset from startPos to the beginning of the data part (highest level)
uint64_t m_startPos
stream position at the beginning of the PGF pre-header
CMacroBlock * m_currentBlock
current macro block (used by main thread)
CDecoder(CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, uint32_t *&levelLength, uint64_t &userDataPos, bool useOMP, uint32_t userDataPolicy)
uint32_t GetEncodedHeaderLength() const
void SetStreamPosToStart()
Resets stream position to beginning of PGF pre-header.
Abstract stream base class.
virtual void SetPos(short posMode, int64_t posOff)=0
constexpr uint32_t CodeBufferLen
number of words in code buffer (CodeBufferLen > BufferLen)
constexpr uint32_t BufferSize
must be a multiple of WordWidth, BufferSize <= UINT16_MAX