• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

CDecoder Class Reference

PGF decoder class. More...

#include <Decoder.h>

List of all members.

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.

Author:
C. Stamm, R. Spuler

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]

Return the length of all encoded headers in bytes.

Returns:
The length of all encoded headers in bytes

Definition at line 86 of file Decoder.h.

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]

Reset stream position to beginning of PGF pre header.

Definition at line 94 of file Decoder.h.

void CDecoder::SetStreamPosToStart (  )  [inline]

Reset stream position to beginning of PGF pre header.

Definition at line 90 of file Decoder.h.

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]

Definition at line 160 of file Decoder.h.

UINT32 CDecoder::m_codeBuffer[BufferSize] [protected]

Definition at line 153 of file Decoder.h.

UINT32 CDecoder::m_codePos [protected]

Definition at line 158 of file Decoder.h.

UINT32 CDecoder::m_encodedHeaderLength [protected]

Definition at line 150 of file Decoder.h.

UINT32 CDecoder::m_sigFlagVector[BufferLen] [protected]

Definition at line 155 of file Decoder.h.

UINT64 CDecoder::m_startPos [protected]

Definition at line 149 of file Decoder.h.

CPGFStream* CDecoder::m_stream [protected]

Definition at line 148 of file Decoder.h.

DataT CDecoder::m_value[BufferSize] [protected]

Definition at line 152 of file Decoder.h.

UINT32 CDecoder::m_valuePos [protected]

Definition at line 157 of file Decoder.h.


The documentation for this class was generated from the following files:
  • Decoder.h
  • Decoder.cpp

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal