# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::Frame Class Reference

A class for encapsulating all the data relating to a frame. More...

`#include <frame.h>`

Collaboration diagram for dirac::Frame:

[legend]

List of all members.

## Public Member Functions

- Frame (const FrameParams &fp)
    Constructor.
- Frame (const Frame &cpy)
    Copy constructor. Private as not currently used [may want to implement reference counting later.].
- virtual ~Frame ()
    Destructor.
- Frame & operator= (const Frame &rhs)
    Assignment =. Private as not currently used [may want to implement reference counting later.].
- FrameParams & GetFparams () const
    Gets the frame parameters.
- void SetFrameSort (const FrameSort fs)
    Sets the frame sort.
- void SetFrameType (const FrameType ftype)
    Sets the frame type.
- void SetReferenceType (const ReferenceType rtype)
    Sets the frame type.
- void ReconfigFrame (const FrameParams &fp)
    Reconfigures the the framend to the new parameters.
- PicArray & Ydata ()
    Returns the luma data array.
- PicArray & Udata ()
    Returns the U component.
- PicArray & Vdata ()
    Returns the V component.
- const PicArray & Ydata () const
    Returns the luma data array.
- const PicArray & Udata () const
    Returns the U component.
- const PicArray & Vdata () const
    Returns the V component.
- PicArray & Data (CompSort cs)
    Returns a given component.
- const PicArray & Data (CompSort cs) const
    Returns a given component.
- PicArray & UpYdata ()
    Returns upconverted Y data.
- PicArray & UpUdata ()
    Returns upconverted U data.
- PicArray & UpVdata ()
    Returns upconverted V data.
- PicArray & UpData (CompSort cs)
    Returns a given upconverted component.
- const PicArray & UpYdata () const
    Returns upconverted Y data.
- const PicArray & UpUdata () const
    Returns upconverted U data.
- const PicArray & UpVdata () const
    Returns upconverted V data.
- const PicArray & UpData (CompSort cs) const
    Returns a given upconverted component.
- void Clip ()
    Clip the data to prevent overshoot.
- void ClipUpData ()
    Clip the upconverted data to prevent overshoot.

## Private Member Functions

- void Init ()
    Initialises the frame once the frame parameters have been set.
- void ClearData ()
    Delete all the data.
- void ClipComponent (PicArray &pic_data) const
    Clip an individual component.

## Private Attributes

- FrameParams m_fparams
- PicArray * m_Y_data
- PicArray * m_U_data
- PicArray * m_V_data
- PicArray * m_upY_data
- PicArray * m_upU_data
- PicArray * m_upV_data
- bool m_redo_upYdata
    Flag that upconversion needs to be re-done.
- bool m_redo_upUdata
- bool m_redo_upVdata

## Detailed Description

A class for encapsulating all the data relating to a frame - all the component data, including upconverted data.

## Constructor & Destructor Documentation

dirac::Frame::Frame | ( | const FrameParams & | fp | ) |

Constructor initialises the frame parameters and the data

dirac::Frame::Frame | ( | const Frame & | cpy | ) |

virtual dirac::Frame::~Frame | ( |  | ) | `[virtual]`

## Member Function Documentation

Frame& dirac::Frame::operator= | ( | const Frame & | rhs | ) |

FrameParams& dirac::Frame::GetFparams | ( |  | ) | const`[inline]`

References m_fparams.

void dirac::Frame::SetFrameSort | ( | const FrameSort | fs | ) | `[inline]`

References m_fparams, and dirac::FrameParams::SetFSort().

void dirac::Frame::SetFrameType | ( | const FrameType | ftype | ) | `[inline]`

References m_fparams, and dirac::FrameParams::SetFrameType().

void dirac::Frame::SetReferenceType | ( | const ReferenceType | rtype | ) | `[inline]`

References m_fparams, and dirac::FrameParams::SetReferenceType().

void dirac::Frame::ReconfigFrame | ( | const FrameParams & | fp | ) |

PicArray& dirac::Frame::Ydata | ( |  | ) | `[inline]`

References m_Y_data.

PicArray& dirac::Frame::Udata | ( |  | ) | `[inline]`

References m_U_data.

PicArray& dirac::Frame::Vdata | ( |  | ) | `[inline]`

References m_V_data.

const PicArray& dirac::Frame::Ydata | ( |  | ) | const`[inline]`

References m_Y_data.

const PicArray& dirac::Frame::Udata | ( |  | ) | const`[inline]`

References m_U_data.

const PicArray& dirac::Frame::Vdata | ( |  | ) | const`[inline]`

References m_V_data.

PicArray& dirac::Frame::Data | ( | CompSort | cs | ) |

const PicArray& dirac::Frame::Data | ( | CompSort | cs | ) | const

PicArray& dirac::Frame::UpYdata | ( |  | ) |

PicArray& dirac::Frame::UpUdata | ( |  | ) |

PicArray& dirac::Frame::UpVdata | ( |  | ) |

PicArray& dirac::Frame::UpData | ( | CompSort | cs | ) |

const PicArray& dirac::Frame::UpYdata | ( |  | ) | const

const PicArray& dirac::Frame::UpUdata | ( |  | ) | const

const PicArray& dirac::Frame::UpVdata | ( |  | ) | const

const PicArray& dirac::Frame::UpData | ( | CompSort | cs | ) | const

void dirac::Frame::Clip | ( |  | ) |

Clips the data to lie between 0 and (1<<video_depth)-1

void dirac::Frame::ClipUpData | ( |  | ) |

Clips the upconverted data to lie between 0 and (1<<video_depth)-1

void dirac::Frame::Init | ( |  | ) | `[private]`

void dirac::Frame::ClearData | ( |  | ) | `[private]`

void dirac::Frame::ClipComponent | ( | PicArray & | pic_data | ) | const`[private]`

## Member Data Documentation

FrameParams dirac::Frame::m_fparams `[mutable, private]`

Referenced by GetFparams(), SetFrameSort(), SetFrameType(), and SetReferenceType().

PicArray* dirac::Frame::m_Y_data `[private]`

Referenced by Ydata().

PicArray* dirac::Frame::m_U_data `[private]`

Referenced by Udata().

PicArray* dirac::Frame::m_V_data `[private]`

Referenced by Vdata().

PicArray* dirac::Frame::m_upY_data `[mutable, private]`

PicArray* dirac::Frame::m_upU_data `[mutable, private]`

PicArray* dirac::Frame::m_upV_data `[mutable, private]`

bool dirac::Frame::m_redo_upYdata `[mutable, private]`

bool dirac::Frame::m_redo_upUdata `[mutable, private]`

bool dirac::Frame::m_redo_upVdata `[mutable, private]`

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

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