# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::Context Class Reference

`#include <arith_codec.h>`

List of all members.

## Public Member Functions

- Context ()
    Default Constructor.
- unsigned int GetScaledProb0 () const
    Returns estimate of probability of 0 (false) scaled to 2**16.
- void Update (bool symbol)
    Updates context counts.

## Private Attributes

- int m_prob0

## Static Private Attributes

- static const unsigned int lut [256]

## Constructor & Destructor Documentation

dirac::Context::Context | ( |  | ) | `[inline]`

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

## Member Function Documentation

unsigned int dirac::Context::GetScaledProb0 | ( |  | ) | const`[inline]`

References m_prob0.

Referenced by dirac::ArithCodecBase::DecodeSymbol(), and dirac::ArithCodecBase::EncodeSymbol().

void dirac::Context::Update | ( | bool | symbol | ) | `[inline]`

References lut, and m_prob0.

Referenced by dirac::ArithCodecBase::DecodeSymbol(), and dirac::ArithCodecBase::EncodeSymbol().

## Member Data Documentation

int dirac::Context::m_prob0`[private]`

Referenced by GetScaledProb0(), and Update().

const unsigned int dirac::Context::lut[256]`[static, private]`

Referenced by Update().

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

- arith_codec.h

© 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.