# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::FrameDecompressor Class Reference

Compress a single image frame. More...

`#include <frame_decompress.h>`

Collaboration diagram for dirac::FrameDecompressor:

[legend]

List of all members.

## Public Member Functions

- FrameDecompressor (DecoderParams &decp, ChromaFormat cf, unsigned int vd)
    Constructor.
- ~FrameDecompressor ()
    Destructor.
- bool Decompress (ParseUnitByteIO &parseunit_byteio, FrameBuffer &my_buffer, int au_fnum)
    Decompress the next frame into the buffer.
- const FrameParams & GetFrameParams () const
    Returns the frame parameters of the current frame being decoded.

## Private Member Functions

- FrameDecompressor (const FrameDecompressor &cpy)
    Copy constructor is private and body-less.
- FrameDecompressor & operator= (const FrameDecompressor &rhs)
    Assignment = is private and body-less.
- void CleanReferenceFrames (FrameBuffer &my_buffer)
    Removes all the reference frames in the retired list.
- void CompDecompress (TransformByteIO *p_transform_byteio, FrameBuffer &my_buffer, int fnum, CompSort cs)
    Decodes component data.
- void DecompressMVData (std::auto_ptr< MvData > &mv_data, FrameByteIO &frame_byteio)
    Decodes the motion data.
- void SetMVBlocks ()
    Set the number of superblocks and blocks.
- void PushFrame (FrameBuffer &my_buffer)
    Add a frame to the frame buffer.

## Private Attributes

- DecoderParams & m_decparams
    Parameters for the decompression, as provided in constructor.
- ChromaFormat m_cformat
    Chroma format of the frame being decompressed.
- bool m_skipped
    An indicator which is true if the frame has been skipped, false otherwise.
- bool m_use_global
    An indicator that is true if we use global motion vectors, false otherwise.
- bool m_use_block_mv
    An indicator that is true if we use block motion vectors, false otherwise.
- PredMode m_global_pred_mode
    Prediction mode to use if we only have global motion vectors.
- FrameParams m_fparams
    Current Frame Parameters.
- unsigned int m_video_depth
    Video depth of the frame being decompressed.

## Detailed Description

This class decompresses a single frame at a time, using parameters supplied at its construction. FrameDecompressor is used by SequenceDecompressor.

## Constructor & Destructor Documentation

dirac::FrameDecompressor::FrameDecompressor | ( | DecoderParams & | decp,
|  | ChromaFormat | cf,
|  | unsigned int | vd |
| ) |  |  |

Creates a FrameDecompressor with specific set of parameters the control the decompression process. It decodes motion data before decoding each component of the frame.

Parameters:

  | decp | decoder parameters
  | cf | the chroma format of the frame being decompressed
  | vd | the video depth of the frame being decompressed

dirac::FrameDecompressor::~FrameDecompressor | ( |  | ) |

Releases resources.

dirac::FrameDecompressor::FrameDecompressor | ( | const FrameDecompressor & | cpy | ) | `[private]`

Copy constructor is private and body-less. This class should not be copied.

## Member Function Documentation

bool dirac::FrameDecompressor::Decompress | ( | ParseUnitByteIO & | parseunit_byteio,
|  | FrameBuffer & | my_buffer,
|  | int | au_fnum |
| ) |  |  |

Decompresses the next frame from the stream and place at the end of a frame buffer. Returns true if able to decode successfully, false otherwise

Parameters:

  | parseunit_byteio | Frame info in Dirac-stream format
  | my_buffer | picture buffer into which the frame is placed
  | au_fnum | Current AccessUnit frame-number

const FrameParams& dirac::FrameDecompressor::GetFrameParams | ( |  | ) | const`[inline]`

References m_fparams.

FrameDecompressor& dirac::FrameDecompressor::operator= | ( | const FrameDecompressor & | rhs | ) | `[private]`

Assignment = is private and body-less. This class should not be assigned.

void dirac::FrameDecompressor::CleanReferenceFrames | ( | FrameBuffer & | my_buffer | ) | `[private]`

void dirac::FrameDecompressor::CompDecompress | ( | TransformByteIO * | p_transform_byteio,
|  | FrameBuffer & | my_buffer,
|  | int | fnum,
|  | CompSort | cs |
| ) |  |  | `[private]`

void dirac::FrameDecompressor::DecompressMVData | ( | std::auto_ptr< MvData > & | mv_data,
|  | FrameByteIO & | frame_byteio |
| ) |  |  | `[private]`

void dirac::FrameDecompressor::SetMVBlocks | ( |  | ) | `[private]`

void dirac::FrameDecompressor::PushFrame | ( | FrameBuffer & | my_buffer | ) | `[private]`

## Member Data Documentation

DecoderParams& dirac::FrameDecompressor::m_decparams `[private]`

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

bool dirac::FrameDecompressor::m_skipped `[private]`

bool dirac::FrameDecompressor::m_use_global `[private]`

bool dirac::FrameDecompressor::m_use_block_mv `[private]`

PredMode dirac::FrameDecompressor::m_global_pred_mode `[private]`

FrameParams dirac::FrameDecompressor::m_fparams `[private]`

Referenced by GetFrameParams().

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

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

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