# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::FrameCompressor Class Reference

Compress a single image frame. More...

`#include <frame_compress.h>`

Collaboration diagram for dirac::FrameCompressor:

[legend]

List of all members.

## Public Member Functions

- FrameCompressor (EncoderParams &encp)
    Constructor.
- ~FrameCompressor ()
    Destructor.
- FrameByteIO * Compress (FrameBuffer &fbuffer, const FrameBuffer &orig_buffer, int fnum, int au_fnum)
    Compress a specific frame within a group of pictures (GOP).
- bool IsSkipped ()
    Returns true if the frame has been skipped rather than coded normally.
- bool IsMEDataAvail () const
    Returns true if Motion estimation data is available.
- const MEData * GetMEData () const
    Returns the motion estimation data.

## Private Member Functions

- FrameCompressor (const FrameCompressor &cpy)
    Copy constructor is private and body-less.
- FrameCompressor & operator= (const FrameCompressor &rhs)
    Assignment = is private and body-less.
- void AnalyseMEData (const MEData &)
    Analyses the ME data and returns true if a cut is detected, false otherwise.
- void CompressMVData (MvDataByteIO *mv_data)
    Compresses the motion vector data.

## Private Attributes

- EncoderParams & m_encparams
- MEData * m_me_data
- bool m_skipped
- bool m_use_global
- bool m_use_block_mv
- PredMode m_global_pred_mode
- bool m_medata_avail
- bool m_is_a_cut
- double m_intra_ratio

## Detailed Description

This class compresses a single frame at a time, using parameters supplied at its construction. FrameCompressor is used by SequenceCompressor.

## Constructor & Destructor Documentation

dirac::FrameCompressor::FrameCompressor | ( | EncoderParams & | encp | ) |

Creates a FrameEncoder with specific set of parameters the control the compression process. It encodes motion data before encoding each component of the frame.

Parameters:

  | encp | encoder parameters

dirac::FrameCompressor::~FrameCompressor | ( |  | ) |

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

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

## Member Function Documentation

FrameByteIO* dirac::FrameCompressor::Compress | ( | FrameBuffer & | fbuffer,
|  | const FrameBuffer & | orig_buffer,
|  | int | fnum,
|  | int | au_fnum |
| ) |  |  |

Compresses a specified frame within a group of pictures.

Parameters:

  | fbuffer | picture buffer in which the frame resides
  | orig_buffer | the corresponding picture buffer of uncoded originals
  | fnum | frame number to compress
  | au_fnum | Current ccessUnit frame-number

Returns:
  Compressed frame in Dirac bytestream format

bool dirac::FrameCompressor::IsSkipped | ( |  | ) | `[inline]`

References m_skipped.

bool dirac::FrameCompressor::IsMEDataAvail | ( |  | ) | const`[inline]`

References m_medata_avail.

const MEData* dirac::FrameCompressor::GetMEData | ( |  | ) | const

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

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

void dirac::FrameCompressor::AnalyseMEData | ( | const MEData & |  | ) | `[private]`

void dirac::FrameCompressor::CompressMVData | ( | MvDataByteIO * | mv_data | ) | `[private]`

## Member Data Documentation

EncoderParams& dirac::FrameCompressor::m_encparams`[private]`

MEData* dirac::FrameCompressor::m_me_data`[private]`

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

Referenced by IsSkipped().

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

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

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

bool dirac::FrameCompressor::m_medata_avail`[private]`

Referenced by IsMEDataAvail().

bool dirac::FrameCompressor::m_is_a_cut`[private]`

double dirac::FrameCompressor::m_intra_ratio`[private]`

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

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