Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# common.h File Reference

`#include <libdirac_common/arrays.h>`
`#include <libdirac_common/common_types.h>`
`#include <libdirac_common/dirac_assertions.h>`
`#include <vector>`
`#include <cmath>`

Include dependency graph for common.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces

- namespace dirac

## Classes

- class dirac::Rational
    Class defining a rational number. More...
- class dirac::PictureSort
    Picture type Class. More...
- class dirac::SourceParams
    Parameters relating to the source material being encoded/decoded. More...
- class dirac::PictureParams
    Parameters for initialising picture class objects. More...
- class dirac::PicArray
    A class for picture component data. More...
- class dirac::CostType
    A structure for recording costs, particularly in quantisation. More...
- class dirac::EntropyCorrector
    A class used for correcting estimates of entropy. More...
- class dirac::OLBParams
    Parameters for overlapped block motion compensation. More...
- class dirac::ParseParams
    Parameters relating to the complexity of encoder/decoder. More...
- class dirac::CodeBlocks
    Structure to hold code block sizes when spatial partitioning is used. More...
- class dirac::PicturePredParams
    Structure to hold motion parameters when motion comp is used. More...
- class dirac::CodecParams
    Parameters common to coder and decoder operation. More...
- class dirac::EncoderParams
    Parameters for the encoding process. More...
- class dirac::DecoderParams
    Parameters for the decoding process. More...
- class dirac::QuantiserLists
    Class for encapsulating quantiser data. More...

## Typedefs

- typedef short dirac::ValueType
    Type of picture data (including motion compensated residuals).
- typedef int dirac::CoeffType
    Type of wavelet coefficient data (should be larger than ValueType).
- typedef int dirac::CalcValueType
    Type for performing calculations on ValueType and CoeffType. Should be >ValueType, >=CoeffType.

## Enumerations

- enum dirac::PredMode {
  dirac::INTRA, dirac::REF1_ONLY, dirac::REF2_ONLY, dirac::REF1AND2,
  dirac::UNDEFINED
  }
    Prediction modes for blocks. More...
- enum dirac::CompSort { dirac::Y_COMP, dirac::U_COMP, dirac::V_COMP }
    Types of picture component. More...
- enum dirac::AddOrSub { dirac::ADD, dirac::SUBTRACT }
    Addition or subtraction. More...
- enum dirac::Direction { dirac::FORWARD, dirac::BACKWARD }
    Forward or backward. More...
- enum dirac::CtxAliases {
  dirac::SIGN0_CTX, dirac::SIGN_POS_CTX, dirac::SIGN_NEG_CTX, dirac::Z_FBIN1z_CTX,
  dirac::Z_FBIN1nz_CTX, dirac::Z_FBIN2_CTX, dirac::Z_FBIN3_CTX, dirac::Z_FBIN4_CTX,
  dirac::Z_FBIN5_CTX, dirac::Z_FBIN6plus_CTX, dirac::NZ_FBIN1z_CTX, dirac::NZ_FBIN1nz_CTX,
  dirac::NZ_FBIN2_CTX, dirac::NZ_FBIN3_CTX, dirac::NZ_FBIN4_CTX, dirac::NZ_FBIN5_CTX,
  dirac::NZ_FBIN6plus_CTX, dirac::INFO_CTX, dirac::BLOCK_SKIP_CTX, dirac::Q_OFFSET_FOLLOW_CTX,
  dirac::Q_OFFSET_INFO_CTX, dirac::Q_OFFSET_SIGN_CTX, dirac::TOTAL_COEFF_CTXS
  }
    Contexts used for coefficient coding. More...
- enum dirac::MvCtxAliases {
  dirac::DC_FBIN1_CTX, dirac::DC_FBIN2plus_CTX, dirac::DC_INFO_CTX, dirac::DC_SIGN_CTX,
  dirac::MV_FBIN1_CTX, dirac::MV_FBIN2_CTX, dirac::MV_FBIN3_CTX, dirac::MV_FBIN4_CTX,
  dirac::MV_FBIN5plus_CTX, dirac::MV_INFO_CTX, dirac::MV_SIGN_CTX, dirac::PMODE_BIT0_CTX,
  dirac::PMODE_BIT1_CTX, dirac::MB_SPLIT_BIN1_CTX, dirac::MB_SPLIT_BIN2_CTX, dirac::MB_SPLIT_INFO_CTX,
  dirac::TOTAL_MV_CTXS
  }
    Contexts used for MV data coding. More...

## Functions

- VideoFormat dirac::IntToVideoFormat (int video_format)
    Function to convert an integer to a valid VideoFormat.
- ChromaFormat dirac::IntToChromaFormat (int chroma_format)
    Function to convert an integer to a valid VideoFormat.
- FrameRateType dirac::IntToFrameRateType (int frame_rate_idx)
    Function to convert an integer to a valid FrameRate type.
- PixelAspectRatioType dirac::IntToPixelAspectRatioType (int pix_asr_idx)
    Function to convert an integer to a valid PixelAspectRatio type.
- SignalRangeType dirac::IntToSignalRangeType (int signal_range_idx)
    Function to convert an integer to a valid SignalRange type.
- MVPrecisionType dirac::IntToMVPrecisionType (int mv_prec)
    Function to convert an integer to a valid motion-vector precision type.
- ValueType dirac::BChk (const ValueType &num, const ValueType &max)
    A simple bounds checking function, very useful in a number of places.

## Detailed Description

This file contains common classes used throughout the encoder and decoder. The main classes are the encoder and decoder parameters for controlling the encode and decode processes. These are passed throughout the codec. There are also parameter classes for sequences and Pictures.

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