Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::PictureCompressor Class Reference

Compress a single image picture. More...

`#include <picture_compress.h>`

Collaboration diagram for dirac::PictureCompressor:
[legend]

List of all members.

## Public Member Functions

- PictureCompressor (EncoderParams &encp)
    Constructor.
- ~PictureCompressor ()
    Destructor.
- void PixelME (EncQueue &my_buffer, int pnum)
    Do pixel accurate motion estimate.
- void CalcComplexity (EncQueue &my_buffer, int pnum, const OLBParams &olbparams)
    Calculate the complexity of a picture.
- void CalcComplexity2 (EncQueue &my_buffer, int pnum)
- void NormaliseComplexity (EncQueue &my_buffer, int pnum)
    Normalise picture complexity with respect to others in the queue.
- void SubPixelME (EncQueue &my_buffer, int pnum)
    Do subpixel accurate motion vector refinement.
- void ModeDecisionME (EncQueue &my_buffer, int pnum)
    Do mode decision based on sub-pel vectors.
- void IntraModeAnalyse (EncQueue &my_buffer, int pnum)
    Detect cuts in the current picture.
- void MotionCompensate (EncQueue &my_buffer, int pnum, AddOrSub dirn)
    Does motion compensation on picture pnum (forward or backward).
- void Prefilter (EncQueue &my_buffer, int pnum)
    Prefilter if required.
- void DoDWT (EncQueue &my_buffer, int pnum, Direction dirn)
    Do the DWT on a given picture.
- void CodeResidue (EncQueue &my_pbuffer, int pnum, PictureByteIO *pic_byteio)
    Compress a specific picture within a group of pictures (GOP).
- void CodeMVData (EncQueue &my_buffer, int pnum, PictureByteIO *pic_byteio)
    Compresses the motion vector data.
- bool IsSkipped ()
    Returns true if the picture 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

- PictureCompressor (const PictureCompressor &cpy)
    Copy constructor is private and body-less.
- PictureCompressor & operator= (const PictureCompressor &rhs)
    Assignment = is private and body-less.
- void InitCoeffData (CoeffArray &coeff_data, const int xl, const int yl)
    Initialise the coefficient data array for holding wavelet coefficients.
- float GetCompLambda (const EncPicture &my_picture, const CompSort csort)
    Returns the value lambda according to picture and component type.
- void SelectQuantisers (CoeffArray &coeff_data, SubbandList &bands, const float lambda, OneDArray< unsigned int > &est_counts, const CodeBlockMode cb_mode, const PictureParams &pp, const CompSort csort)
- int SelectMultiQuants (CoeffArray &coeff_data, SubbandList &bands, const int band_num, const float lambda, const PictureParams &pp, const CompSort csort)
- void SetupCodeBlocks (SubbandList &bands)
- void AddSubAverage (CoeffArray &coeff_data, int xl, int yl, AddOrSub dirn)

## Private Attributes

- EncoderParams & m_encparams
- bool m_skipped
- bool m_use_global
- bool m_use_block_mv
- PredMode m_global_pred_mode
- MEData * m_me_data
- bool m_medata_avail
- bool m_is_a_cut
- MVPrecisionType m_orig_prec

## Detailed Description

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

## Constructor & Destructor Documentation

dirac::PictureCompressor::PictureCompressor | ( | 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 picture.

Parameters:

  | encp | encoder parameters

dirac::PictureCompressor::~PictureCompressor | ( |  | ) |

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

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

## Member Function Documentation

void dirac::PictureCompressor::PixelME | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::CalcComplexity | ( | EncQueue & | my_buffer,
|  | int | pnum,
|  | const OLBParams & | olbparams |
| ) |  |  |

void dirac::PictureCompressor::CalcComplexity2 | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::NormaliseComplexity | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::SubPixelME | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::ModeDecisionME | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::IntraModeAnalyse | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::MotionCompensate | ( | EncQueue & | my_buffer,
|  | int | pnum,
|  | AddOrSub | dirn |
| ) |  |  |

void dirac::PictureCompressor::Prefilter | ( | EncQueue & | my_buffer,
|  | int | pnum |
| ) |  |  |

void dirac::PictureCompressor::DoDWT | ( | EncQueue & | my_buffer,
|  | int | pnum,
|  | Direction | dirn |
| ) |  |  |

void dirac::PictureCompressor::CodeResidue | ( | EncQueue & | my_pbuffer,
|  | int | pnum,
|  | PictureByteIO * | pic_byteio |
| ) |  |  |

Compresses a specified picture within a group of pictures.

Parameters:

  | my_pbuffer | picture buffer in which the reference frames resides
  | pnum | picture number to compress
  | pic_byteio | compressed picture in Dirac bytestream format

void dirac::PictureCompressor::CodeMVData | ( | EncQueue & | my_buffer,
|  | int | pnum,
|  | PictureByteIO * | pic_byteio |
| ) |  |  |

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

References m_skipped.

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

References m_medata_avail.

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

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

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

void dirac::PictureCompressor::InitCoeffData | ( | CoeffArray & | coeff_data,
|  | const int | xl,
|  | const int | yl |
| ) |  |  | `[private]`

float dirac::PictureCompressor::GetCompLambda | ( | const EncPicture & | my_picture,
|  | const CompSort | csort |
| ) |  |  | `[private]`

void dirac::PictureCompressor::SelectQuantisers | ( | CoeffArray & | coeff_data,
|  | SubbandList & | bands,
|  | const float | lambda,
|  | OneDArray< unsigned int > & | est_counts,
|  | const CodeBlockMode | cb_mode,
|  | const PictureParams & | pp,
|  | const CompSort | csort |
| ) |  |  | `[private]`

int dirac::PictureCompressor::SelectMultiQuants | ( | CoeffArray & | coeff_data,
|  | SubbandList & | bands,
|  | const int | band_num,
|  | const float | lambda,
|  | const PictureParams & | pp,
|  | const CompSort | csort |
| ) |  |  | `[private]`

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

void dirac::PictureCompressor::AddSubAverage | ( | CoeffArray & | coeff_data,
|  | int | xl,
|  | int | yl,
|  | AddOrSub | dirn |
| ) |  |  | `[private]`

## Member Data Documentation

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

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

Referenced by IsSkipped().

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

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

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

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

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

Referenced by IsMEDataAvail().

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

MVPrecisionType dirac::PictureCompressor::m_orig_prec`[private]`

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

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