Dirac - A Video Codec

Created by the British Broadcasting Corporation.


dirac::ArithCodec< T >::Context Class Reference

A class for binary contexts. More...

#include <arith_codec.h>

Collaboration diagram for dirac::ArithCodec< T >::Context:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Attributes


Detailed Description

template<class T>
class dirac::ArithCodec< T >::Context

A class for binary contexts. Stores probabilities for 0 and 1 in terms of counts of numbers of occurrences, and also as Triples partitioning the interval [0,1) into two parts [0,p) and [p,1).


Constructor & Destructor Documentation

template<class T>
dirac::ArithCodec< T >::Context::Context  )  [inline]
 

Default constructor initialises counts to 1 each of 0 and 1.

template<class T>
dirac::ArithCodec< T >::Context::Context int  cnt0,
int  cnt1
[inline]
 

Constructor initialises the counts to those set.

template<class T>
dirac::ArithCodec< T >::Context::Context const Context cpy  )  [inline]
 

template<class T>
dirac::ArithCodec< T >::Context::~Context  )  [inline]
 


Member Function Documentation

template<class T>
calc_t dirac::ArithCodec< T >::Context::GetCount0  )  const [inline]
 

template<class T>
calc_t dirac::ArithCodec< T >::Context::GetCount1  )  const [inline]
 

template<class T>
const ProbInterval& dirac::ArithCodec< T >::Context::GetProbInterval const bool  symbol  )  const [inline]
 

template<class T>
bool dirac::ArithCodec< T >::Context::GetSymbol const calc_t  num,
const calc_t  factor,
ProbInterval prob_val
const [inline]
 

Given a number, return the corresponding symbol and triple.

template<class T>
void dirac::ArithCodec< T >::Context::HalveCounts  )  [inline]
 

template<class T>
void dirac::ArithCodec< T >::Context::IncrCount const bool  symbol  )  [inline]
 

Increment the count of symbol by 1.

Parameters:
symbol the symbol whose count is to be incremented (false=0, true=1)

template<class T>
Context& dirac::ArithCodec< T >::Context::operator= const Context rhs  )  [inline]
 

template<class T>
void dirac::ArithCodec< T >::Context::SetCounts const int  cnt0,
const int  cnt1
[inline]
 

Sets the counts, and then the triples to reflect the counts.

template<class T>
void dirac::ArithCodec< T >::Context::SetRanges  )  [inline]
 

template<class T>
calc_t dirac::ArithCodec< T >::Context::Weight  )  const [inline]
 


Member Data Documentation

template<class T>
calc_t dirac::ArithCodec< T >::Context::m_num0 [private]
 

template<class T>
calc_t dirac::ArithCodec< T >::Context::m_num1 [private]
 

template<class T>
ProbInterval dirac::ArithCodec< T >::Context::m_r0 [private]
 

template<class T>
ProbInterval dirac::ArithCodec< T >::Context::m_r1 [private]
 

template<class T>
calc_t dirac::ArithCodec< T >::Context::m_weight [private]
 


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

© 2004 British Broadcasting Corporation. Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.