# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::FrameByteIO Class Reference

A compressed frame in Dirac bytestream format.

`#include <frame_byteio.h>`

Inheritance diagram for dirac::FrameByteIO:

[legend]
Collaboration diagram for dirac::FrameByteIO:

[legend]
List of all members.

## Public Member Functions

- FrameByteIO (FrameParams &frame_params, int frame_num, int au_fnum)
    Constructor.
- FrameByteIO (FrameParams &frame_params, const ParseUnitByteIO &parseunit_byteio, int au_fnum)
    Constructor.
- virtual ~FrameByteIO ()
    Destructor.
- void CollateByteStats (DiracByteStats &dirac_byte_stats)
    Gathers byte stats on the frame data.
- bool Input ()
    Inputs data from Dirac stream-format.
- void Output ()
    Outputs frame values to Dirac stream-format.
- const std::string GetBytes ()
    Gets string containing coded bytes.
- int GetSize () const
    Gets size (in bytes).
- ParseUnitType GetType () const
    Gets parse-unit type.
- void SetMvData (MvDataByteIO *mv_data)
- void SetTransformData (TransformByteIO *transform_data)

## Private Member Functions

- unsigned char CalcParseCode () const
    Calculates parse-code based on frame parameters.
- void InputReferenceFrames ()
    Reads reference-frame data.
- void SetFrameType ()
    Calculates frame-type (eg INTRA/INTER) of frame.
- void SetReferenceType ()
    Calculates reference-type of frame.

## Private Attributes

- FrameParams & m_frame_params
    Frame parameters.
- int m_frame_num
    Frame number.
- MvDataByteIO * m_mv_data
    MV data.
- TransformByteIO * m_transform_data
    Transform data.

## Constructor & Destructor Documentation

dirac::FrameByteIO::FrameByteIO | ( | FrameParams & | frame_params,
|  | int | frame_num,
|  | int | au_fnum |
| ) |  |  |

Parameters:

  | frame_params | Frame parameters
  | frame_num | Frame number
  | au_fnum | AccessUnit frame number

dirac::FrameByteIO::FrameByteIO | ( | FrameParams & | frame_params,
|  | const ParseUnitByteIO & | parseunit_byteio,
|  | int | au_fnum |
| ) |  |  |

Parameters:

  | frame_params | Destination of data
  | parseunit_byteio | Source of data
  | au_fnum | AccessUnit frame number

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

## Member Function Documentation

unsigned char dirac::FrameByteIO::CalcParseCode | ( |  | ) | const`[private, virtual]`

Returns:
  Char bit-set

Reimplemented from dirac::ParseUnitByteIO.

void dirac::FrameByteIO::CollateByteStats | ( | DiracByteStats & | dirac_byte_stats | ) | `[virtual]`

Parameters:

  | dirac_byte_stats | Stat container

Reimplemented from dirac::ParseUnitByteIO.

const std::string dirac::FrameByteIO::GetBytes | ( |  | ) | `[virtual]`

Reimplemented from dirac::ParseUnitByteIO.

int dirac::FrameByteIO::GetSize | ( |  | ) | const`[virtual]`

Reimplemented from dirac::ParseUnitByteIO.

ParseUnitType dirac::FrameByteIO::GetType | ( |  | ) | const`[inline, virtual]`

Reimplemented from dirac::ParseUnitByteIO.

bool dirac::FrameByteIO::Input | ( |  | ) |

Reimplemented from dirac::ParseUnitByteIO.

void dirac::FrameByteIO::InputReferenceFrames | ( |  | ) | `[private]`

void dirac::FrameByteIO::Output | ( |  | ) |

void dirac::FrameByteIO::SetFrameType | ( |  | ) | `[private]`

void dirac::FrameByteIO::SetMvData | ( | MvDataByteIO * | mv_data | ) | `[inline]`

void dirac::FrameByteIO::SetReferenceType | ( |  | ) | `[private]`

void dirac::FrameByteIO::SetTransformData | ( | TransformByteIO * | transform_data | ) | `[inline]`

## Member Data Documentation

int dirac::FrameByteIO::m_frame_num`[private]`

FrameParams& dirac::FrameByteIO::m_frame_params`[private]`

MvDataByteIO* dirac::FrameByteIO::m_mv_data`[private]`

TransformByteIO* dirac::FrameByteIO::m_transform_data`[private]`

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

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