# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::CompCompressor Class Reference

Compress a frame component. More...

`#include <comp_compress.h>`

Collaboration diagram for dirac::CompCompressor:

[legend]

List of all members.

## Public Member Functions

- CompCompressor (EncoderParams &encp, const FrameParams &fp)
    Constructor.
- ComponentByteIO * Compress (PicArray &pic_data, const bool is_a_cut, const double intra_ratio=100.0, MEData *me_data=0)
    Compress a frame component.

## Private Member Functions

- CompCompressor (const CompCompressor &cpy)
    Copy constructor is private and body-less. This class should not be copied.
- CompCompressor & operator= (const CompCompressor &rhs)
    Assignment = is private and body-less. This class should not be assigned.
- void SetCompLambda (const double intra_ratio, const bool is_a_cut)
    Sets the value m_lambda according to frame and component type.
- void SelectQuantisers (PicArray &pic_data, SubbandList &bands, OneDArray< unsigned int > &est_counts, const CodeBlockMode cb_mode)
- int SelectMultiQuants (PicArray &pic_data, SubbandList &bands, const int band_num)
- void SetupCodeBlocks (SubbandList &bands)
- void SetToVal (PicArray &pic_data, const Subband &node, ValueType val)
- void AddSubAverage (PicArray &pic_data, int xl, int yl, AddOrSub dirn)

## Private Attributes

- EncoderParams & m_encparams
- const FrameParams & m_fparams
- const FrameSort & m_fsort
- const ChromaFormat & m_cformat
- CompSort m_csort
- float m_lambda
- MEData * m_me_data

## Detailed Description

This class compresses one of the three components (Y, U, or V) of a frame according to a given set or parameters. CompCompressor is used by FrameCompressor.

## Constructor & Destructor Documentation

dirac::CompCompressor::CompCompressor | ( | EncoderParams & | encp,
|  | const FrameParams & | fp |
| ) |  |  |

Create and initialize a component compressor with the given characteristics.

Parameters:

  | encp | encoding parameters
  | fp | frame parameters

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

## Member Function Documentation

ComponentByteIO* dirac::CompCompressor::Compress | ( | PicArray & | pic_data,
|  | const bool | is_a_cut,
|  | const double | intra_ratio = `100.0`,
|  | MEData * | me_data = `0` |
| ) |  |  |

Compress a PicArray containing a frame component (Y, U, or V).

Parameters:

  | pic_data | the component data to be compressed
  | is_a_cut | cut detection flag.
  | intra_ratio | proportion of intra blocks that motion estimation has found
  | me_data | Pointer to the motion vector data

Returns:
  Frame-componentin Dirac-bytestream format

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

void dirac::CompCompressor::SetCompLambda | ( | const double | intra_ratio,
|  | const bool | is_a_cut |
| ) |  |  | `[private]`

void dirac::CompCompressor::SelectQuantisers | ( | PicArray & | pic_data,
|  | SubbandList & | bands,
|  | OneDArray< unsigned int > & | est_counts,
|  | const CodeBlockMode | cb_mode |
| ) |  |  | `[private]`

int dirac::CompCompressor::SelectMultiQuants | ( | PicArray & | pic_data,
|  | SubbandList & | bands,
|  | const int | band_num |
| ) |  |  | `[private]`

void dirac::CompCompressor::SetupCodeBlocks | ( | SubbandList & | bands | ) | `[private]`

void dirac::CompCompressor::SetToVal | ( | PicArray & | pic_data,
|  | const Subband & | node,
|  | ValueType | val |
| ) |  |  | `[private]`

void dirac::CompCompressor::AddSubAverage | ( | PicArray & | pic_data,
|  | int | xl,
|  | int | yl,
|  | AddOrSub | dirn |
| ) |  |  | `[private]`

## Member Data Documentation

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

const FrameParams& dirac::CompCompressor::m_fparams `[private]`

const FrameSort& dirac::CompCompressor::m_fsort `[private]`

const ChromaFormat& dirac::CompCompressor::m_cformat `[private]`

CompSort dirac::CompCompressor::m_csort `[private]`

float dirac::CompCompressor::m_lambda `[private]`

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

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

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