39 #define BufferLen (BufferSize/WordWidth) 40 #define CodeBufferLen BufferSize 58 #pragma warning( suppress : 4351 )
83 UINT32
ComposeBitplane(UINT32 bufferSize,
DataT planeMask, UINT32* sigBits, UINT32* refBits, UINT32* signBits);
85 UINT32
ComposeBitplaneRLD(UINT32 bufferSize,
DataT planeMask, UINT32* sigBits, UINT32* refBits, UINT32 signPos);
86 void SetBitAtPos(UINT32 pos,
DataT planeMask) { (m_value[pos] >= 0) ? m_value[pos] |= planeMask : m_value[pos] -= planeMask; }
87 void SetSign(UINT32 pos,
bool sign) { m_value[pos] = -m_value[pos]*sign + m_value[pos]*(!sign); }
105 PGFPostHeader& postHeader, UINT32*& levelLength, UINT64& userDataPos,
106 bool useOMP,
bool skipUserData) THROW_;
123 void Partition(
CSubband* band,
int quantParam,
int width,
int height,
int startPos,
int pitch) THROW_;
150 void Skip(UINT64 offset) THROW_;
181 #ifdef __PGFROISUPPORT__ 182 void DecodeTileBuffer() THROW_;
190 void SkipTileBuffer() THROW_;
194 void SetROI() { m_roi =
true; }
215 #ifdef __PGFROISUPPORT__ 220 #endif //PGF_DECODER_H
UINT32 ComposeBitplane(UINT32 bufferSize, DataT planeMask, UINT32 *sigBits, UINT32 *refBits, UINT32 *signBits)
CMacroBlock ** m_macroBlocks
array of macroblocks
Abstract stream base class.
void DecodeInterleaved(CWaveletTransform *wtChannel, int level, int quantParam) THROW_
UINT32 ReadEncodedData(UINT8 *target, UINT32 len) const THROW_
void SetBitAtPos(UINT32 pos, DataT planeMask)
UINT32 m_valuePos
current position in m_value
void ReadMacroBlock(CMacroBlock *block) THROW_
throws IOException
#define BufferSize
must be a multiple of WordWidth
void Partition(CSubband *band, int quantParam, int width, int height, int startPos, int pitch) THROW_
virtual void SetPos(short posMode, INT64 posOff)=0
UINT32 GetEncodedHeaderLength() const
PGF wavelet subband class.
UINT32 m_encodedHeaderLength
stream offset from startPos to the beginning of the data part (highest level)
void SetStreamPosToData() THROW_
Reset stream position to beginning of data block.
int m_macroBlockLen
array length
DataT m_value[BufferSize]
output buffer of values with index m_valuePos
void DequantizeValue(CSubband *band, UINT32 bandPos, int quantParam) THROW_
void SetSign(UINT32 pos, bool sign)
int m_currentBlockIndex
index of current macro block
CMacroBlock * m_currentBlock
current macro block (used by main thread)
bool IsCompletelyRead() const
A macro block is a decoding unit of fixed size (uncoded)
CPGFStream * m_stream
input PGF stream
int m_macroBlocksAvailable
number of decoded macro blocks (including currently used macro block)
UINT64 m_startPos
stream position at the beginning of the PGF pre-header
void DecodeBuffer() THROW_
UINT32 ComposeBitplaneRLD(UINT32 bufferSize, DataT planeMask, UINT32 sigPos, UINT32 *refBits)
bool MacroBlocksAvailable() const
CDecoder(CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, UINT32 *&levelLength, UINT64 &userDataPos, bool useOMP, bool skipUserData) THROW_
void Skip(UINT64 offset) THROW_
UINT64 m_streamSizeEstimation
estimation of stream size
ROIBlockHeader m_header
block header
#define CodeBufferLen
number of words in code buffer (CodeBufferLen > BufferLen)
bool m_sigFlagVector[BufferSize+1]
void SetStreamPosToStart() THROW_
Reset stream position to beginning of PGF pre-header.
UINT32 m_codeBuffer[CodeBufferLen]
input buffer for encoded bitstream