# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::QualityMonitor Class Reference

Class to monitor the quality of pictures and adjust coding parameters appropriately.

`#include <quality_monitor.h>`

Collaboration diagram for dirac::QualityMonitor:

[legend]
List of all members.

## Public Member Functions

- QualityMonitor (EncoderParams &ep, const SeqParams &sparams)
    Constructor. Sets up initial Lagrangian values.
- ~QualityMonitor ()
    Destructor.
- void UpdateModel (const Frame &ld_frame, const Frame &orig_frame)
    Update the quality factors, returning true if we need to recode.
- void ResetAll ()
    Reset the quality factors (say if there's been a cut).
- void WriteLog ()
    Write a log of the quality to date.

## Private Member Functions

- double QualityVal (const PicArray &coded_data, const PicArray &orig_data, const int xlen, const int ylen)
    Calculate the quality of coded wrt original picture.

## Private Attributes

- EncoderParams & m_encparams
    A reference to the encoder parameters.
- const SeqParams & m_sparams
    A reference to the sequence parameters.
- OneDArray< long double > m_quality_averageY
    The average Y quality for the frame types.
- OneDArray< long double > m_quality_averageU
    The average U quality for the frame types.
- OneDArray< long double > m_quality_averageV
    The average V quality for the frame types.
- OneDArray< int > m_frame_total
    The number of frames of each type.

## Constructor & Destructor Documentation

dirac::QualityMonitor::QualityMonitor | ( | EncoderParams & | ep,
|  | const SeqParams & | sparams |
| ) |  |  |

dirac::QualityMonitor::~QualityMonitor | ( |  | ) |

## Member Function Documentation

double dirac::QualityMonitor::QualityVal | ( | const PicArray & | coded_data,
|  | const PicArray & | orig_data,
|  | const int | xlen,
|  | const int | ylen |
| ) |  |  | `[private]`

void dirac::QualityMonitor::ResetAll | ( |  | ) |

void dirac::QualityMonitor::UpdateModel | ( | const Frame & | ld_frame,
|  | const Frame & | orig_frame |
| ) |  |  |

Update the quality factors, returning true if we need to recode

Parameters:

  | ld_frame | the locally-decoded frame
  | orig_frame | the original frame

void dirac::QualityMonitor::WriteLog | ( |  | ) |

## Member Data Documentation

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

OneDArray<int> dirac::QualityMonitor::m_frame_total`[private]`

OneDArray<long double> dirac::QualityMonitor::m_quality_averageU`[private]`

OneDArray<long double> dirac::QualityMonitor::m_quality_averageV`[private]`

OneDArray<long double> dirac::QualityMonitor::m_quality_averageY`[private]`

const SeqParams& dirac::QualityMonitor::m_sparams`[private]`

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

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