# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::BlockDiffUp Class Reference

A virtual class for doing differences with sub-pixel vectors.

`#include <me_utils.h>`

Inheritance diagram for dirac::BlockDiffUp:

[legend]
Collaboration diagram for dirac::BlockDiffUp:

[legend]

List of all members.

## Public Member Functions

- BlockDiffUp (const PicArray &ref, const PicArray &pic)
    Constructor, initialising the reference and picture data.
- virtual ~BlockDiffUp ()
    Destructor.
- virtual float Diff (const BlockDiffParams &dparams, const MVector &mv)=0
    Do the difference, returning SAD.
- virtual void Diff (const BlockDiffParams &dparams, const MVector &mv, const float mvcost, const float lambda, MvCostData &best_costs, MVector &best_mv)=0
    Do the actual difference, overwriting the best MV so far if appropriate.

## Private Member Functions

- BlockDiffUp (const BlockDiffUp &cpy)
    Private, bodyless copy-constructor: class should not be copied.
- BlockDiffUp & operator= (const BlockDiffUp &rhs)
    Private, bodyless assignment=: class should not be assigned.

## Constructor & Destructor Documentation

dirac::BlockDiffUp::BlockDiffUp | ( | const PicArray & | ref,
|  | const PicArray & | pic |
| ) |  |  |

virtual dirac::BlockDiffUp::~BlockDiffUp | ( |  | ) | `[inline, virtual]`

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

## Member Function Documentation

virtual float dirac::BlockDiffUp::Diff | ( | const BlockDiffParams & | dparams,
|  | const MVector & | mv |
| ) |  |  | `[pure virtual]`

Do the difference, returning SAD

Parameters:

  | dparams | block parameters
  | mv | the motion vector being used

Implements dirac::BlockDiff.

Implemented in dirac::BlockDiffHalfPel, dirac::BlockDiffQuarterPel, and dirac::BlockDiffEighthPel.

virtual void dirac::BlockDiffUp::Diff | ( | const BlockDiffParams & | dparams,
|  | const MVector & | mv,
|  | const float | mvcost,
|  | const float | lambda,
|  | MvCostData & | best_costs,
|  | MVector & | best_mv |
| ) |  |  | `[pure virtual]`

Do the actual difference, overwriting the best MV so far if appropriate, and bailing out if we do worse

Parameters:

  | dparams | block parameters
  | mv | the motion vector being used
  | mvcost | the (prediction) cost of the motion vector mv
  | lambda | the weighting to be given to mvcost
  | best_costs | the best Lagrangian costs obtained yet
  | best_mv | the MV giving the best Lagrangian costs so far

Implemented in dirac::BlockDiffHalfPel, dirac::BlockDiffQuarterPel, and dirac::BlockDiffEighthPel.

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

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

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