| libpgf
    7.21.2
    PGF - Progressive Graphics File | 
PGF decoder. More...
#include <Decoder.h>
| Classes | |
| class | CMacroBlock | 
| A macro block is a decoding unit of fixed size (uncoded)  More... | |
| Public Member Functions | |
| CDecoder (CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, UINT32 *&levelLength, UINT64 &userDataPos, bool useOMP, UINT32 userDataPolicy) | |
| ~CDecoder () | |
| Destructor.  More... | |
| void | Partition (CSubband *band, int quantParam, int width, int height, int startPos, int pitch) | 
| void | DecodeInterleaved (CWaveletTransform *wtChannel, int level, int quantParam) | 
| UINT32 | GetEncodedHeaderLength () const | 
| void | SetStreamPosToStart () | 
| Resets stream position to beginning of PGF pre-header.  More... | |
| void | SetStreamPosToData () | 
| Resets stream position to beginning of data block.  More... | |
| void | Skip (UINT64 offset) | 
| void | DequantizeValue (CSubband *band, UINT32 bandPos, int quantParam) | 
| UINT32 | ReadEncodedData (UINT8 *target, UINT32 len) const | 
| void | DecodeBuffer () | 
| CPGFStream * | GetStream () | 
| void | GetNextMacroBlock () | 
| Private Member Functions | |
| void | ReadMacroBlock (CMacroBlock *block) | 
| throws IOException  More... | |
| Private Attributes | |
| CPGFStream * | m_stream | 
| input PGF stream  More... | |
| UINT64 | m_startPos | 
| stream position at the beginning of the PGF pre-header  More... | |
| UINT64 | m_streamSizeEstimation | 
| estimation of stream size  More... | |
| UINT32 | m_encodedHeaderLength | 
| stream offset from startPos to the beginning of the data part (highest level)  More... | |
| CMacroBlock ** | m_macroBlocks | 
| array of macroblocks  More... | |
| int | m_currentBlockIndex | 
| index of current macro block  More... | |
| int | m_macroBlockLen | 
| array length  More... | |
| int | m_macroBlocksAvailable | 
| number of decoded macro blocks (including currently used macro block)  More... | |
| CMacroBlock * | m_currentBlock | 
| current macro block (used by main thread)  More... | |
| CDecoder::CDecoder | ( | CPGFStream * | stream, | 
| PGFPreHeader & | preHeader, | ||
| PGFHeader & | header, | ||
| PGFPostHeader & | postHeader, | ||
| UINT32 *& | levelLength, | ||
| UINT64 & | userDataPos, | ||
| bool | useOMP, | ||
| UINT32 | userDataPolicy | ||
| ) | 
Constructor: Read pre-header, header, and levelLength at current stream position. It might throw an IOException.
| stream | A PGF stream | 
| preHeader | [out] A PGF pre-header | 
| header | [out] A PGF header | 
| postHeader | [out] A PGF post-header | 
| levelLength | The location of the levelLength array. The array is allocated in this method. The caller has to delete this array. | 
| userDataPos | The stream position of the user data (metadata) | 
| useOMP | If true, then the decoder will use multi-threading based on openMP | 
| userDataPolicy | Policy of user data (meta-data) handling while reading PGF headers. | 
Constructor Read pre-header, header, and levelLength It might throw an IOException.
| stream | A PGF stream | 
| preHeader | [out] A PGF pre-header | 
| header | [out] A PGF header | 
| postHeader | [out] A PGF post-header | 
| levelLength | The location of the levelLength array. The array is allocated in this method. The caller has to delete this array. | 
| userDataPos | The stream position of the user data (metadata) | 
| useOMP | If true, then the decoder will use multi-threading based on openMP | 
| userDataPolicy | Policy of user data (meta-data) handling while reading PGF headers. | 
Definition at line 73 of file Decoder.cpp.
| CDecoder::~CDecoder | ( | ) | 
Destructor.
Definition at line 231 of file Decoder.cpp.
| void CDecoder::DecodeBuffer | ( | ) | 
Reads next block(s) from stream and decodes them It might throw an IOException.
Definition at line 494 of file Decoder.cpp.
| void CDecoder::DecodeInterleaved | ( | CWaveletTransform * | wtChannel, | 
| int | level, | ||
| int | quantParam | ||
| ) | 
Deccoding and dequantization of HL and LH subband (interleaved) using partitioning scheme. Partitioning scheme: The plane is partitioned in squares of side length InterBlockSize. It might throw an IOException.
| wtChannel | A wavelet transform channel containing the HL and HL band | 
| level | Wavelet transform level | 
| quantParam | Dequantization value | 
Definition at line 333 of file Decoder.cpp.
| void CDecoder::DequantizeValue | ( | CSubband * | band, | 
| UINT32 | bandPos, | ||
| int | quantParam | ||
| ) | 
Dequantization of a single value at given position in subband. It might throw an IOException.
| band | A subband | 
| bandPos | A valid position in subband band | 
| quantParam | The quantization parameter | 
Dequantization of a single value at given position in subband. If encoded data is available, then stores dequantized band value into buffer m_value at position m_valuePos. Otherwise reads encoded data block and decodes it. It might throw an IOException.
| band | A subband | 
| bandPos | A valid position in subband band | 
| quantParam | The quantization parameter | 
Definition at line 462 of file Decoder.cpp.
| 
 | inline | 
Returns the length of all encoded headers in bytes.
Definition at line 136 of file Decoder.h.
| void CDecoder::GetNextMacroBlock | ( | ) | 
Gets next macro block It might throw an IOException.
Definition at line 477 of file Decoder.cpp.
| 
 | inline | 
| void CDecoder::Partition | ( | CSubband * | band, | 
| int | quantParam, | ||
| int | width, | ||
| int | height, | ||
| int | startPos, | ||
| int | pitch | ||
| ) | 
Unpartitions a rectangular region of a given subband. Partitioning scheme: The plane is partitioned in squares of side length LinBlockSize. Read wavelet coefficients from the output buffer of a macro block. It might throw an IOException.
| band | A subband | 
| quantParam | Dequantization value | 
| width | The width of the rectangle | 
| height | The height of the rectangle | 
| startPos | The relative subband position of the top left corner of the rectangular region | 
| pitch | The number of bytes in row of the subband | 
Definition at line 266 of file Decoder.cpp.
| UINT32 CDecoder::ReadEncodedData | ( | UINT8 * | target, | 
| UINT32 | len | ||
| ) | const | 
Copies data from the open stream to a target buffer. It might throw an IOException.
| target | The target buffer | 
| len | The number of bytes to read | 
Definition at line 246 of file Decoder.cpp.
| 
 | private | 
throws IOException
Definition at line 535 of file Decoder.cpp.
| 
 | inline | 
Resets stream position to beginning of data block.
Definition at line 144 of file Decoder.h.
| 
 | inline | 
Resets stream position to beginning of PGF pre-header.
Definition at line 140 of file Decoder.h.
| void CDecoder::Skip | ( | UINT64 | offset | ) | 
Skips a given number of bytes in the open stream. It might throw an IOException.
Definition at line 449 of file Decoder.cpp.
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private | 
| 
 | private |