# 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

## Member Data Documentation

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

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

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

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

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

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

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

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

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

PicArray* dirac::Frame::m_Y_data`[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.