Dirac - A Video Codec
Created by the British Broadcasting Corporation.
dirac::Context Class Reference
#include <arith_codec.h>
Inheritance diagram for dirac::Context:
[legend]Collaboration diagram for dirac::Context:
[legend]List of all members.Public Member Functions
- Context ()
- Default Constructor.
- void SetCounts (unsigned int cnt0, unsigned int cnt1)
- Sets the counts according to the input.
- unsigned int Weight () const
- Returns the count of all symbols.
- void HalveCounts ()
- Divide the counts by 2, making sure neither ends up 0.
- unsigned int GetScaledProb0 () const
- Returns estimate of probability of 0 (false) scaled to 2**16.
- void Update (bool symbol)
- Updates context counts.
Private Attributes
Constructor & Destructor Documentation
dirac::Context::Context |
( |
|
) |
[inline] |
|
|
Default constructor initialises counts to 1 each of 0 and 1. |
Member Function Documentation
int unsigned dirac::Context::GetScaledProb0 |
( |
|
) |
const [inline] |
|
void dirac::Context::HalveCounts |
( |
|
) |
[inline] |
|
void dirac::Context::SetCounts |
( |
unsigned int |
cnt0, |
|
|
unsigned int |
cnt1 |
|
) |
[inline] |
|
void dirac::Context::Update |
( |
bool |
symbol |
) |
[inline] |
|
unsigned int dirac::Context::Weight |
( |
|
) |
const [inline] |
|
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.