digikam
CDecoder Class Reference
PGF decoder class. More...
#include <Decoder.h>
Public Member Functions | |
| CDecoder (CPGFStream *stream, PGFPreHeader &preHeader, PGFHeader &header, PGFPostHeader &postHeader, UINT32 *&levelLength) THROW_ | |
| CDecoder (CPGFStream *stream=NULL) | |
| ~CDecoder () | |
| void | DecodeInterleaved (CWaveletTransform *wtChannel, int level, int quantParam) THROW_ |
| void | DequantizeValue (CSubband *band, UINT32 bandPos, int quantParam) |
| UINT32 | GetEncodedHeaderLength () const |
| void | Partition (CSubband *band, int quantParam, int width, int height, int startPos, int pitch) THROW_ |
| UINT32 | ReadEncodedData (UINT8 *target, UINT32 len) const THROW_ |
| void | SetStreamPosToData () THROW_ |
| void | SetStreamPosToStart () THROW_ |
| void | Skip (UINT64 offset) THROW_ |
Protected Attributes | |
| bool | m_bufferIsAvailable |
| UINT32 | m_codeBuffer [BufferSize] |
| UINT32 | m_codePos |
| UINT32 | m_encodedHeaderLength |
| UINT32 | m_sigFlagVector [BufferLen] |
| UINT64 | m_startPos |
| CPGFStream * | m_stream |
| DataT | m_value [BufferSize] |
| UINT32 | m_valuePos |
Detailed Description
PGF decoder class.
Definition at line 40 of file Decoder.h.
Constructor & Destructor Documentation
| CDecoder::CDecoder | ( | CPGFStream * | stream = NULL |
) |
Constructor: Initialize PGF stream and buffer position.
- Parameters:
-
stream A PGF stream or NULL
Definition at line 57 of file Decoder.cpp.
| CDecoder::CDecoder | ( | CPGFStream * | stream, | |
| PGFPreHeader & | preHeader, | |||
| PGFHeader & | header, | |||
| PGFPostHeader & | postHeader, | |||
| UINT32 *& | levelLength | |||
| ) |
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.
Definition at line 69 of file Decoder.cpp.
| CDecoder::~CDecoder | ( | ) |
Destructor.
Definition at line 166 of file Decoder.cpp.
Member Function Documentation
| 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
Definition at line 263 of file Decoder.cpp.
| void CDecoder::DequantizeValue | ( | CSubband * | band, | |
| UINT32 | bandPos, | |||
| int | quantParam | |||
| ) |
Dequantization of a single value at given position in subband.
- Parameters:
-
band A subband bandPos A valid position in subband band quantParam The quantization parameter
If encoded data is available, then stores dequantized band value into buffer m_value at position m_valuePos. Otherwise reads encoded data buffer and decodes it.
- Parameters:
-
band A subband bandPos A valid position in subband band quantParam The quantization parameter
Definition at line 392 of file Decoder.cpp.
| UINT32 CDecoder::GetEncodedHeaderLength | ( | ) | const [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. Write wavelet coefficients into buffer. 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 buffer position of the top left corner of the rectangular region pitch The number of bytes in row of the subband
Definition at line 195 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.
- Parameters:
-
target The target buffer len The number of bytes to read
- Returns:
- The number of bytes copied to the target buffer
Definition at line 175 of file Decoder.cpp.
| void CDecoder::SetStreamPosToData | ( | ) | [inline] |
| void CDecoder::SetStreamPosToStart | ( | ) | [inline] |
| void CDecoder::Skip | ( | UINT64 | offset | ) |
Skip a given number of bytes in the open stream.
It might throw an IOException.
Definition at line 380 of file Decoder.cpp.
Member Data Documentation
bool CDecoder::m_bufferIsAvailable [protected] |
UINT32 CDecoder::m_codeBuffer[BufferSize] [protected] |
UINT32 CDecoder::m_codePos [protected] |
UINT32 CDecoder::m_encodedHeaderLength [protected] |
UINT32 CDecoder::m_sigFlagVector[BufferLen] [protected] |
UINT64 CDecoder::m_startPos [protected] |
CPGFStream* CDecoder::m_stream [protected] |
DataT CDecoder::m_value[BufferSize] [protected] |
UINT32 CDecoder::m_valuePos [protected] |
The documentation for this class was generated from the following files:
KDE 4.4 API Reference