39 #define BufferLen (BufferSize/WordWidth)
40 #define CodeBufferLen BufferSize
58 #if defined(WIN32) || defined(WINCE) || defined(WIN64)
59 #pragma warning( suppress : 4351 )
71 bool IsCompletelyRead()
const {
return m_valuePos >= m_header.rbh.bufferSize; }
77 void BitplaneDecode();
85 UINT32 ComposeBitplane(UINT32 bufferSize, DataT planeMask, UINT32* sigBits, UINT32* refBits, UINT32* signBits);
86 UINT32 ComposeBitplaneRLD(UINT32 bufferSize, DataT planeMask, UINT32 sigPos, UINT32* refBits);
87 UINT32 ComposeBitplaneRLD(UINT32 bufferSize, DataT planeMask, UINT32* sigBits, UINT32* refBits, UINT32 signPos);
88 void SetBitAtPos(UINT32 pos, DataT planeMask) { (m_value[pos] >= 0) ? m_value[pos] |= planeMask : m_value[pos] -= planeMask; }
89 void SetSign(UINT32 pos,
bool sign) { m_value[pos] = -m_value[pos]*sign + m_value[pos]*(!sign); }
107 PGFPostHeader& postHeader, UINT32*& levelLength, UINT64& userDataPos,
108 bool useOMP,
bool skipUserData) THROW_;
125 void Partition(
CSubband* band,
int quantParam,
int width,
int height,
int startPos,
int pitch) THROW_;
152 void Skip(UINT64 offset) THROW_;
183 #ifdef __PGFROISUPPORT__
204 void ReadMacroBlock(CMacroBlock* block) THROW_;
208 UINT64 m_streamSizeEstimation;
209 UINT32 m_encodedHeaderLength;
211 CMacroBlock **m_macroBlocks;
212 int m_currentBlockIndex;
214 int m_macroBlocksAvailable;
215 CMacroBlock *m_currentBlock;
217 #ifdef __PGFROISUPPORT__
222 #endif //PGF_DECODER_H
PGF decoder.
Definition: Decoder.h:46
~CDecoder()
Destructor.
Definition: Decoder.cpp:216
virtual void SetPos(short posMode, INT64 posOff)=0
void DequantizeValue(CSubband *band, UINT32 bandPos, int quantParam) THROW_
Definition: Decoder.cpp:447
#define BufferSize
must be a multiple of WordWidth
Definition: PGFtypes.h:77
Abstract stream base class.
Definition: PGFstream.h:39
CDecoder(CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, UINT32 *&levelLength, UINT64 &userDataPos, bool useOMP, bool skipUserData) THROW_
Definition: Decoder.cpp:73
bool MacroBlocksAvailable() const
Definition: Decoder.h:181
UINT32 GetEncodedHeaderLength() const
Definition: Decoder.h:139
void SkipTileBuffer() THROW_
Definition: Decoder.cpp:578
Wavelet channel class.
Definition: Subband.h:42
void Skip(UINT64 offset) THROW_
Definition: Decoder.cpp:434
void SetStreamPosToData() THROW_
Reset stream position to beginning of data block.
Definition: Decoder.h:147
void DecodeTileBuffer() THROW_
Definition: Decoder.cpp:462
void SetStreamPosToStart() THROW_
Reset stream position to beginning of PGF pre-header.
Definition: Decoder.h:143
PGF wavelet subband class.
void DecodeBuffer() THROW_
Definition: Decoder.cpp:479
void DecodeInterleaved(CWaveletTransform *wtChannel, int level, int quantParam) THROW_
Definition: Decoder.cpp:318
PGF bit-stream operations.
void Partition(CSubband *band, int quantParam, int width, int height, int startPos, int pitch) THROW_
Definition: Decoder.cpp:251
#define CodeBufferLen
number of words in code buffer (CodeBufferLen > BufferLen)
Definition: Decoder.h:40
CPGFStream * GetStream()
Definition: Decoder.h:177
UINT32 ReadEncodedData(UINT8 *target, UINT32 len) const THROW_
Definition: Decoder.cpp:231
void SetROI()
Enables region of interest (ROI) status.
Definition: Decoder.h:196