# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::FrameParams Class Reference

Parameters for initialising frame class objects.

`#include <common.h>`

Collaboration diagram for dirac::FrameParams:

[legend]

List of all members.

## Public Member Functions

- FrameParams ()
    Default constructor.
- FrameParams (const ChromaFormat &cf, int xlen, int ylen, int c_xlen, int c_ylen, unsigned int video_depth)
    Constructor.
- FrameParams (const ChromaFormat &cf, const FrameSort &fs)
    Constructor.
- FrameParams (const SeqParams &sparams)
    Constructor.
- FrameParams (const SeqParams &sparams, const FrameSort &fs)
    Constructor.
- const ChromaFormat & CFormat () const
    Returns the chroma format of the frame.
- int Xl () const
    Returns the luma width of the frame.
- int Yl () const
    Returns the luma height of the frame.
- int ChromaXl () const
    Returns the chroma width of the frame.
- int ChromaYl () const
    Returns the chroma height of the frame.
- const FrameSort & FSort () const
    Returns the type of the frame.
- int FrameNum () const
    Returns the number of the frame (in time order).
- bool IsBFrame () const
    Returns whether the frame is bi-directionally predicted by checking references.
- int ExpiryTime () const
    Returns the number of frames after the current frame number after which the frame can be discarded.
- bool Output () const
    Returns an indication of whether the frame has been output yet.
- const std::vector< int > & Refs () const
    Returns a const C++ reference to the set of reference frame numbers (will be empty if the frame is an I frame).
- std::vector< int > & Refs ()
    Returns non-const C++ referece to the vector of reference frames, to allow them to be set.
- unsigned int NumRefs () const
    Return the number of reference frames.
- FrameType GetFrameType () const
    Returns type of frame (see enum).
- ReferenceType GetReferenceType () const
    Returns reference frame type (see enum).
- unsigned int GetVideoDepth () const
    Returns the video depth of the frame.
- void SetFSort (const FrameSort &fs)
    Sets the type of frame.
- void SetFrameType (const FrameType ftype)
    Sets the frame to be Intra/Inter.
- void SetReferenceType (const ReferenceType rtype)
    Sets the frame to be a reference or not.
- void SetFrameNum (const int fn)
    Sets the frame number.
- void SetExpiryTime (const int expt)
    Sets how long the frame will stay in the buffer (encoder only).
- void SetAsOutput ()
    Sets a flag to indicate that the frame has been output.
- void SetCFormat (ChromaFormat cf)
    Sets the chroma format.
- void SetXl (int xl)
    Sets the frame luma length.
- void SetYl (int yl)
    Sets the frame luma height.
- void SetChromaXl (int xl)
    Sets the chroma length.
- void SetChromaYl (int yl)
    Sets the chroma height.
- void SetVideoDepth (int vd)
    Sets the video depth of the frame.
- std::vector< int > & RetiredFrames () const
    Returns a const C++ reference to the set of frame numbers to be retired.
- std::vector< int > & RetiredFrames ()
    Returns a non-const C++ reference to the set of frame numbers to be retired.

## Private Attributes

- ChromaFormat m_cformat
    The chroma format.
- int m_xl
    Frame luma width.
- int m_yl
    Frame luma height.
- FrameSort m_fsort
    The frame sort.
- std::vector< int > m_refs
    The set of frame numbers of reference frames.
- int m_expiry_time
    The number of frames, after the current frame number, after the (de)coding of which the frame can be deleted.
- int m_fnum
    The frame number, in temporal order.
- FrameType m_frame_type
    Frame type.
- ReferenceType m_reference_type
    Reference type.
- bool m_output
    True if the frame has been output, false if not.
- int m_chroma_xl
    Chroma length.
- int m_chroma_yl
    Chroma height.
- std::vector< int > m_retd_list
    The set of frame numbers in the retired frame list.
- unsigned int m_video_depth
    Video depth.

## Constructor & Destructor Documentation

dirac::FrameParams::FrameParams | ( |  | ) |

dirac::FrameParams::FrameParams | ( | const ChromaFormat & | cf,
|  | int | xlen,
|  | int | ylen,
|  | int | c_xlen,
|  | int | c_ylen,
|  | unsigned int | video_depth |
| ) |  |  |

Frame chroma format is set Frame sort defaults to I frame.

dirac::FrameParams::FrameParams | ( | const ChromaFormat & | cf,
|  | const FrameSort & | fs |
| ) |  |  |

Frame chroma format and frame sort are set.

dirac::FrameParams::FrameParams | ( | const SeqParams & | sparams | ) |

dirac::FrameParams::FrameParams | ( | const SeqParams & | sparams,
|  | const FrameSort & | fs |
| ) |  |  |

## Member Function Documentation

const ChromaFormat& dirac::FrameParams::CFormat | ( |  | ) | const`[inline]`

References m_cformat.

int dirac::FrameParams::Xl | ( |  | ) | const`[inline]`

References m_xl.

int dirac::FrameParams::Yl | ( |  | ) | const`[inline]`

References m_yl.

int dirac::FrameParams::ChromaXl | ( |  | ) | const`[inline]`

References m_chroma_xl.

int dirac::FrameParams::ChromaYl | ( |  | ) | const`[inline]`

References m_chroma_yl.

const FrameSort& dirac::FrameParams::FSort | ( |  | ) | const`[inline]`

References m_fsort.

int dirac::FrameParams::FrameNum | ( |  | ) | const`[inline]`

References m_fnum.

bool dirac::FrameParams::IsBFrame | ( |  | ) | const

int dirac::FrameParams::ExpiryTime | ( |  | ) | const`[inline]`

References m_expiry_time.

bool dirac::FrameParams::Output | ( |  | ) | const`[inline]`

References m_output.

const std::vector<int>& dirac::FrameParams::Refs | ( |  | ) | const`[inline]`

References m_refs.

std::vector<int>& dirac::FrameParams::Refs | ( |  | ) | `[inline]`

References m_refs.

unsigned int dirac::FrameParams::NumRefs | ( |  | ) | const`[inline]`

References m_refs.

FrameType dirac::FrameParams::GetFrameType | ( |  | ) | const`[inline]`

References m_frame_type.

ReferenceType dirac::FrameParams::GetReferenceType | ( |  | ) | const`[inline]`

References m_reference_type.

unsigned int dirac::FrameParams::GetVideoDepth | ( |  | ) | const`[inline]`

References m_video_depth.

void dirac::FrameParams::SetFSort | ( | const FrameSort & | fs | ) |

Referenced by dirac::Frame::SetFrameSort().

void dirac::FrameParams::SetFrameType | ( | const FrameType | ftype | ) |

Referenced by dirac::Frame::SetFrameType().

void dirac::FrameParams::SetReferenceType | ( | const ReferenceType | rtype | ) |

Referenced by dirac::Frame::SetReferenceType().

void dirac::FrameParams::SetFrameNum | ( | const int | fn | ) | `[inline]`

References m_fnum.

void dirac::FrameParams::SetExpiryTime | ( | const int | expt | ) | `[inline]`

References m_expiry_time.

void dirac::FrameParams::SetAsOutput | ( |  | ) | `[inline]`

References m_output.

void dirac::FrameParams::SetCFormat | ( | ChromaFormat | cf | ) | `[inline]`

References m_cformat.

void dirac::FrameParams::SetXl | ( | int | xl | ) | `[inline]`

References m_xl.

void dirac::FrameParams::SetYl | ( | int | yl | ) | `[inline]`

References m_yl.

void dirac::FrameParams::SetChromaXl | ( | int | xl | ) | `[inline]`

References m_chroma_xl.

void dirac::FrameParams::SetChromaYl | ( | int | yl | ) | `[inline]`

References m_chroma_yl.

void dirac::FrameParams::SetVideoDepth | ( | int | vd | ) | `[inline]`

References m_video_depth.

std::vector<int>& dirac::FrameParams::RetiredFrames | ( |  | ) | const`[inline]`

References m_retd_list.

std::vector<int>& dirac::FrameParams::RetiredFrames | ( |  | ) | `[inline]`

References m_retd_list.

## Member Data Documentation

ChromaFormat dirac::FrameParams::m_cformat `[private]`

Referenced by CFormat(), and SetCFormat().

int dirac::FrameParams::m_xl `[private]`

Referenced by SetXl(), and Xl().

int dirac::FrameParams::m_yl `[private]`

Referenced by SetYl(), and Yl().

FrameSort dirac::FrameParams::m_fsort `[private]`

Referenced by FSort().

std::vector<int> dirac::FrameParams::m_refs `[private]`

Referenced by NumRefs(), and Refs().

int dirac::FrameParams::m_expiry_time `[private]`

Referenced by ExpiryTime(), and SetExpiryTime().

int dirac::FrameParams::m_fnum `[private]`

Referenced by FrameNum(), and SetFrameNum().

FrameType dirac::FrameParams::m_frame_type `[private]`

Referenced by GetFrameType().

ReferenceType dirac::FrameParams::m_reference_type `[private]`

Referenced by GetReferenceType().

bool dirac::FrameParams::m_output `[private]`

Referenced by Output(), and SetAsOutput().

int dirac::FrameParams::m_chroma_xl `[private]`

Referenced by ChromaXl(), and SetChromaXl().

int dirac::FrameParams::m_chroma_yl `[private]`

Referenced by ChromaYl(), and SetChromaYl().

std::vector<int> dirac::FrameParams::m_retd_list `[mutable, private]`

Referenced by RetiredFrames().

unsigned int dirac::FrameParams::m_video_depth `[private]`

Referenced by GetVideoDepth(), and SetVideoDepth().

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

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