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:
[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
|
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. |
Member Function Documentation
|
Given a number, return the corresponding symbol and triple. |
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> |
void dirac::ArithCodec< T >::Context::SetCounts |
( |
const int |
cnt0, |
|
|
const int |
cnt1 |
|
) |
[inline] |
|
|
Sets the counts, and then the triples to reflect the counts. |
Member Data Documentation
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.