Dirac - A Video Codec

Created by the British Broadcasting Corporation.


Public Member Functions | Protected Member Functions
dirac::ArithCodec Class Reference

Abstract binary arithmetic coding class. More...

#include <arith_codec.h>

Inheritance diagram for dirac::ArithCodec:
Inheritance graph
[legend]
Collaboration diagram for dirac::ArithCodec:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

This is an abtract binary arithmetic encoding class, used as the base for concrete classes that encode motion vectors and subband residues.

Parameters:
Ta container (most probably, or array) type

Constructor & Destructor Documentation

dirac::ArithCodec::ArithCodec ( ByteIO p_byteio,
size_t  number_of_contexts 
)

Creates an ArithCodec object to decode input based on a set of parameters.

Parameters:
p_byteioinput/output for encoded bits
number_of_contextsthe number of contexts used
virtual dirac::ArithCodec::~ArithCodec ( ) [inline, virtual]

Destructor is virtual as this class is abstract.


Member Function Documentation

int dirac::ArithCodec::Compress ( T &  in_data)

Compress takes a type T object (a container or array) and compresses it using the abstract function DoWorkCode() which is overridden in subclasses. It returns the number of bits written.

Parameters:
in_datathe input to be compressed. Non-const, since the compression may be lossy.
void dirac::ArithCodec::Decompress ( T &  out_data,
const int  num_bytes 
)

Decompresses the bitstream, up to the number of bytes specified and writes into the output subclasses.

Parameters:
out_datathe output into which the decompressed data is written.
num_bytesthe number of bytes to be read from the bitstream.
virtual void dirac::ArithCodec::DoWorkCode ( T &  in_data) [protected, pure virtual]
virtual void dirac::ArithCodec::DoWorkDecode ( T &  out_data) [protected, pure virtual]

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.