PGF decoder.
More...
#include <Decoder.h>
|
| CDecoder (CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, UINT32 *&levelLength, UINT64 &userDataPos, bool useOMP, bool skipUserData) THROW_ |
|
| ~CDecoder () |
| Destructor.
|
|
void | Partition (CSubband *band, int quantParam, int width, int height, int startPos, int pitch) THROW_ |
|
void | DecodeInterleaved (CWaveletTransform *wtChannel, int level, int quantParam) THROW_ |
|
UINT32 | GetEncodedHeaderLength () const |
|
void | SetStreamPosToStart () THROW_ |
| Reset stream position to beginning of PGF pre-header.
|
|
void | SetStreamPosToData () THROW_ |
| Reset stream position to beginning of data block.
|
|
void | Skip (UINT64 offset) THROW_ |
|
void | DequantizeValue (CSubband *band, UINT32 bandPos, int quantParam) THROW_ |
|
UINT32 | ReadEncodedData (UINT8 *target, UINT32 len) const THROW_ |
|
void | DecodeBuffer () THROW_ |
|
CPGFStream * | GetStream () |
|
bool | MacroBlocksAvailable () const |
|
void | DecodeTileBuffer () THROW_ |
|
void | SkipTileBuffer () THROW_ |
|
void | SetROI () |
| Enables region of interest (ROI) status.
|
|
PGF decoder.
PGF decoder class.
- Author
- C. Stamm, R. Spuler
Constructor: Read pre-header, header, and levelLength at current stream position. It might throw an IOException.
- Parameters
-
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 |
skipUserData | If true, then user data is not read. In case of available user data, the file position is still returned in userDataPos. |
Constructor Read pre-header, header, and levelLength It might throw an IOException.
- Parameters
-
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 |
skipUserData | If true, then user data is not read. In case of available user data, the file position is still returned in userDataPos. |
void CDecoder::DecodeBuffer |
( |
| ) |
|
Reads stream and decodes tile buffer It might throw an IOException.
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.
- Parameters
-
wtChannel | A wavelet transform channel containing the HL and HL band |
level | Wavelet transform level |
quantParam | Dequantization value |
void CDecoder::DecodeTileBuffer |
( |
| ) |
|
Reads stream and decodes tile buffer It might throw an IOException.
void CDecoder::DequantizeValue |
( |
CSubband * |
band, |
|
|
UINT32 |
bandPos, |
|
|
int |
quantParam |
|
) |
| |
Dequantization of a single value at given position in subband. It might throw an IOException.
- Parameters
-
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.
- Parameters
-
band | A subband |
bandPos | A valid position in subband band |
quantParam | The quantization parameter |
UINT32 CDecoder::GetEncodedHeaderLength |
( |
| ) |
const |
|
inline |
Return the length of all encoded headers in bytes.
- Returns
- The length of all encoded headers in bytes
bool CDecoder::MacroBlocksAvailable |
( |
| ) |
const |
|
inline |
- Returns
- True if decoded macro blocks are available for processing
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.
- Parameters
-
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 |
UINT32 CDecoder::ReadEncodedData |
( |
UINT8 * |
target, |
|
|
UINT32 |
len |
|
) |
| const |
Copies data from the open stream to a target buffer. It might throw an IOException.
- Parameters
-
target | The target buffer |
len | The number of bytes to read |
- Returns
- The number of bytes copied to the target buffer
void CDecoder::Skip |
( |
UINT64 |
offset | ) |
|
Skip a given number of bytes in the open stream. It might throw an IOException.
void CDecoder::SkipTileBuffer |
( |
| ) |
|
Resets stream position to next tile. It might throw an IOException.
The documentation for this class was generated from the following files:
- /Users/ale/src/Scribus/scribus/third_party/pgf/Decoder.h
- /Users/ale/src/Scribus/scribus/third_party/pgf/Decoder.cpp