Signal/Geometry Processing Library (SPL)  1.1.24
SPL::MDecoder Class Reference

The M-Coder (binary) arithmetic decoder class. More...

#include <mCoder.hpp>

Inherits SPL::MCoder.

Public Member Functions

 MDecoder (int numContexts=0, InputBitStream *in=0)
 Create a decoder with the specified number of contexts that reads input from the given bit stream. More...
 
 ~MDecoder ()
 Destroy a decoder. More...
 
void setNumContexts (int numContexts)
 Set the number of contexts. More...
 
int getNumContexts () const
 Get the number of contexts. More...
 
void setInput (InputBitStream *in)
 Set the input bit stream (i.e., the bit stream from which encoded data is to be read). More...
 
InputBitStreamgetInput () const
 Get the input bit stream (i.e., the bit stream from which encoded data is to be read). More...
 
void clearContexts ()
 Clear the state of all of the contexts. More...
 
long getBitCount () const
 Get the number of bits read so far. More...
 
long getSymCount () const
 Get the number of symbols decoded so far. More...
 
int start ()
 Prepare to decode an arithmetic code word. More...
 
int terminate ()
 Terminate the arithmetic code word. More...
 
int decodeRegular (int contextId)
 Decode a symbol in the specified context. More...
 
int decodeBypass ()
 Decode a symbol in bypass mode (i.e., assuming both symbols are equiprobable). More...
 
void dump (std::ostream &out) const
 Dump the internal state information for the decoder to a stream (for debugging). More...
 

Static Public Member Functions

static void setDebugLevel (int debugLevel)
 Set the debug level. More...
 
static void setDebugStream (std::ostream &debugStream)
 Set the stream to use for debugging output. More...
 
static std::ostream & getDebugStream ()
 Get the stream used for debugging output. More...
 

Detailed Description

The M-Coder (binary) arithmetic decoder class.

Constructor & Destructor Documentation

SPL::MDecoder::MDecoder ( int  numContexts = 0,
InputBitStream in = 0 
)

Create a decoder with the specified number of contexts that reads input from the given bit stream.

SPL::MDecoder::~MDecoder ( )

Destroy a decoder.

Member Function Documentation

void SPL::MDecoder::clearContexts ( )

Clear the state of all of the contexts.

int SPL::MDecoder::decodeBypass ( )

Decode a symbol in bypass mode (i.e., assuming both symbols are equiprobable).

int SPL::MDecoder::decodeRegular ( int  contextId)

Decode a symbol in the specified context.

void SPL::MDecoder::dump ( std::ostream &  out) const

Dump the internal state information for the decoder to a stream (for debugging).

std::ostream & SPL::MDecoder::getDebugStream ( )
static

Get the stream used for debugging output.

void SPL::MDecoder::setDebugLevel ( int  debugLevel)
static

Set the debug level.

void SPL::MDecoder::setDebugStream ( std::ostream &  debugStream)
static

Set the stream to use for debugging output.

void SPL::MDecoder::setNumContexts ( int  numContexts)

Set the number of contexts.

int SPL::MDecoder::start ( )

Prepare to decode an arithmetic code word.

Note: This function must be called before attempting to decode any symbols.

int SPL::MDecoder::terminate ( )

Terminate the arithmetic code word.


The documentation for this class was generated from the following files: