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:

Include dependency graph

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

Included by dependency graph

Go to the source code of this file.

Namespaces

Classes

Enumerations

Functions


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

Enumeration Type Documentation

enum AddOrSub
 

Enumeration values:
ADD 
SUBTRACT 

enum CompSort
 

Enumeration values:
Y_COMP 
U_COMP 
V_COMP 

enum CtxAliases
 

Enumeration values:
SIGN0_CTX 
SIGN_POS_CTX 
SIGN_NEG_CTX 
Z_FBIN1z_CTX 
Z_FBIN1nz_CTX 
Z_FBIN2_CTX 
Z_FBIN3_CTX 
Z_FBIN4_CTX 
Z_FBIN5_CTX 
Z_FBIN6plus_CTX 
NZ_FBIN1z_CTX 
NZ_FBIN1nz_CTX 
NZ_FBIN2_CTX 
NZ_FBIN3_CTX 
NZ_FBIN4_CTX 
NZ_FBIN5_CTX 
NZ_FBIN6plus_CTX 
INFO_CTX 
BLOCK_SKIP_CTX 
Q_OFFSET_FOLLOW_CTX 
Q_OFFSET_INFO_CTX 
Q_OFFSET_SIGN_CTX 
TOTAL_COEFF_CTXS 

enum Direction
 

Enumeration values:
FORWARD 
BACKWARD 

enum MvCtxAliases
 

Enumeration values:
YDC_FBIN1_CTX 
YDC_FBIN2plus_CTX 
YDC_INFO_CTX 
YDC_SIGN_CTX 
UDC_FBIN1_CTX 
UDC_FBIN2plus_CTX 
UDC_INFO_CTX 
UDC_SIGN_CTX 
VDC_FBIN1_CTX 
VDC_FBIN2plus_CTX 
VDC_INFO_CTX 
VDC_SIGN_CTX 
REF1x_FBIN1_CTX 
REF1x_FBIN2_CTX 
REF1x_FBIN3_CTX 
REF1x_FBIN4_CTX 
REF1x_FBIN5plus_CTX 
REF1x_INFO_CTX 
REF1x_SIGN_CTX 
REF1y_FBIN1_CTX 
REF1y_FBIN2_CTX 
REF1y_FBIN3_CTX 
REF1y_FBIN4_CTX 
REF1y_FBIN5plus_CTX 
REF1y_INFO_CTX 
REF1y_SIGN_CTX 
REF2x_FBIN1_CTX 
REF2x_FBIN2_CTX 
REF2x_FBIN3_CTX 
REF2x_FBIN4_CTX 
REF2x_FBIN5plus_CTX 
REF2x_INFO_CTX 
REF2x_SIGN_CTX 
REF2y_FBIN1_CTX 
REF2y_FBIN2_CTX 
REF2y_FBIN3_CTX 
REF2y_FBIN4_CTX 
REF2y_FBIN5plus_CTX 
REF2y_INFO_CTX 
REF2y_SIGN_CTX 
PMODE_BIT0_CTX 
PMODE_BIT1_CTX 
MB_CMODE_CTX 
MB_SPLIT_BIN1_CTX 
MB_SPLIT_BIN2_CTX 
MB_SPLIT_INFO_CTX 
TOTAL_MV_CTXS 

enum PredMode
 

Enumeration values:
INTRA 
REF1_ONLY 
REF2_ONLY 
REF1AND2 
UNDEFINED 


Function Documentation

ValueType BChk const ValueType num,
const ValueType max
[inline]
 

AspectRatioType IntToAspectRatioType int  aspect_ratio_idx  ) 
 

Parameters:
aspect_ratio_idx Integer corresponding to a aspect-ratio in the spec table
Returns:
Valid AspectRatioType (returns ASPECT_RATIO_UNDEFINED if no valid aspect-ratio found)

ChromaFormat IntToChromaFormat int  chroma_format  ) 
 

Parameters:
chroma_format Integer corresponding to a format
Returns:
Valid chroma-format (returns formatNK if no valid format found)

FrameRateType IntToFrameRateType int  frame_rate_idx  ) 
 

Parameters:
frame_rate_idx Integer corresponding to a frame-rate in the spec table
Returns:
Valid FrameRateType (returns FRAMERATE_UNDEFINED if no valid frame-rate found)

MVPrecisionType IntToMVPrecisionType int  mv_prec  ) 
 

Parameters:
mv_prec Integer corresponding to a valid motion-vector precision
Returns:
Valid MVPrecisionType (returns SIGNAL_RANGE_UNDEFINED if no valid precision found)

SignalRangeType IntToSignalRangeType int  signal_range_idx  ) 
 

Parameters:
signal_range_idx Integer corresponding to a signal-range in the spec table
Returns:
Valid SignalRangeType (returns SIGNAL_RANGE_UNDEFINED if no valid signal-ratio found)

VideoFormat IntToVideoFormat int  video_format  ) 
 

Parameters:
video_format Integer corresponding to a format
Returns:
Valid video-format (returns VIDEO_FORMAT_UNDEFINED if no valid format found)


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