Dirac Video Codec

# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

# dirac::FieldSequenceCompressor Class Reference

Compresses a sequence of fields from a stream. More...

`#include <seq_compress.h>`

Inheritance diagram for dirac::FieldSequenceCompressor:
[legend]
Collaboration diagram for dirac::FieldSequenceCompressor:
[legend]

List of all members.

## Public Member Functions

- FieldSequenceCompressor (StreamPicInput *pin, EncoderParams &encp, DiracByteStream &dirac_byte_stream)
    Constructor.
- virtual ~FieldSequenceCompressor ()
    Destructor.
- virtual bool LoadNextFrame ()
    Load data.
- virtual void SetPicTypeAndRefs (PictureParams &pparams)
    Set up the appropriate prediction parameters for a picture.

## Protected Member Functions

- virtual int CodedToDisplay (const int pnum)
    Uses the GOP parameters to convert picture numbers in coded order to display order.
- virtual void UpdateCBRModel (EncPicture &my_picture, const PictureByteIO *picture_byteio)
    Update the CBR model based on the data we've compressed.

## Private Member Functions

- void PreMotionEstmationFilter (PicArray &comp)
    Filter fields.

## Private Attributes

- int m_field1_bytes
- int m_field2_bytes

## Detailed Description

This class compresses a sequence of fields, field by field. It currently uses GOP parameters set in the encoder parameters in order to define the temporal prediction structure. A version to incorporate non-GOP structures is TBC.

## Constructor & Destructor Documentation

dirac::FieldSequenceCompressor::FieldSequenceCompressor | ( | StreamPicInput * | pin,
|  | EncoderParams & | encp,
|  | DiracByteStream & | dirac_byte_stream |
| ) |  |  |

Creates a sequence compressor that compresses fields i.e. interlaced data, and prepares to begin compressing with the first field.

Parameters:

  | pin | an input stream containing a sequence of frames
  | encp | parameters for the encoding process
  | dirac_byte_stream | Output destination for compressed data

virtual dirac::FieldSequenceCompressor::~FieldSequenceCompressor | ( |  | ) | `[virtual]`

Destructor. Must delete IO objects created by constructor.

## Member Function Documentation

virtual bool dirac::FieldSequenceCompressor::LoadNextFrame | ( |  | ) | `[virtual]`

Load one frame i.e. two fields of data into the Sequence Compressor. Sets m_all_done to true if no more data is available to be loaded.

Returns:
  true - if both fields load succeeded. false - otherwise

Implements dirac::SequenceCompressor.

virtual void dirac::FieldSequenceCompressor::SetPicTypeAndRefs | ( | PictureParams & | pparams | ) | `[virtual]`

Implements dirac::SequenceCompressor.

virtual int dirac::FieldSequenceCompressor::CodedToDisplay | ( | const int | pnum | ) | `[protected, virtual]`

Uses the GOP parameters to convert picture numbers in coded order to display order. Pure virtual function. The child class will have to define it.

Parameters:

  | pnum | the picture number in coded order

Implements dirac::SequenceCompressor.

virtual void dirac::FieldSequenceCompressor::UpdateCBRModel | ( | EncPicture & | my_picture,
|  | const PictureByteIO * | picture_byteio |
| ) |  |  | `[protected, virtual]`

Implements dirac::SequenceCompressor.

void dirac::FieldSequenceCompressor::PreMotionEstmationFilter | ( | PicArray & | comp | ) | `[private]`

Low pass filter the components in the fields used in Motion Estimation so that ME works better. Using a 1/4 1/2 1/4 filter

## Member Data Documentation

int dirac::FieldSequenceCompressor::m_field1_bytes`[private]`

int dirac::FieldSequenceCompressor::m_field2_bytes`[private]`

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

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