# Dirac - A Video Codec

Created by the British Broadcasting Corporation.

Public Member Functions | Private Member Functions | Private Attributes | List of all members
dirac::SequenceDecompressor Class Reference

Decompresses a sequence of pictures from a stream. More...

`#include <seq_decompress.h>`

Collaboration diagram for dirac::SequenceDecompressor:
[legend]

## Public Member Functions
| SequenceDecompressor (ParseUnitByteIO &parseunit, bool verbosity)
| Constructor. More...
| ~SequenceDecompressor ()
| Destructor. More...
void | NewAccessUnit (ParseUnitByteIO &parseunit_byteio)
| Marks beginning of a new AccessUnit. More...
const Picture * | DecompressNextPicture (ParseUnitByteIO *p_parseunit_byteio)
| Decompress the next picture in sequence. More...
const Picture * | GetNextPicture ()
| Get the next picture available for display. More...
const PictureParams * | GetNextPictureParams () const
| Get the next picture parameters. More...
bool | Finished ()
| Determine if decompression is complete. More...
ParseParams & | GetParseParams ()
| Interrogates for parse parameters. More...
SourceParams & | GetSourceParams ()
| Interrogates for source parameters. More...
DecoderParams & | GetDecoderParams ()
| Interrogates for coding parameters. More...

## Private Member Functions
| SequenceDecompressor (const SequenceDecompressor &cpy)
| Copy constructor is private and body-less. More...
SequenceDecompressor & | operator= (const SequenceDecompressor &rhs)
| Assignment = is private and body-less. More...

## Private Attributes
bool | m_all_done
| Completion flag, returned via the Finished method. More...
DecoderParams | m_decparams
| Parameters for the decompression, as provided in constructor. More...
ParseParams | m_parse_params
| The parse parameters obtained from the stream header. More...
SourceParams | m_srcparams
| The source parameters obtained from the stream header. More...
PictureBuffer * | m_pbuffer
| A picture buffer used for local storage of pictures whilst pending re-ordering or being used for reference. More...
int | m_current_code_pnum
| Number of the picture in coded order which is to be decoded. More...
int | m_delay
| A delay so that we don't display what we haven't decoded. More...
int | m_last_picture_read
| Index, in display order, of the last picture read. More...
int | m_show_pnum
| Index, in display order of the picture to be displayed next - computed from delay and current_code_pnum. More...
PictureDecompressor * | m_pdecoder
| Picture decompressor object. More...
int | m_highest_pnum
| Highest picture-num processed - for tracking end-of-sequence. More...

## Detailed Description

This class decompresses a sequence of frames, picture by picture.

## Constructor & Destructor Documentation

## ◆ SequenceDecompressor() [1/2]

dirac::SequenceDecompressor::SequenceDecompressor | ( | ParseUnitByteIO & | parseunit,
|  | bool | verbosity
| ) |  |

Initializes the decompressor with an input stream and level of output detail.

Parameters

  parseunit | First access-unit of new sequence
  verbosity | when true, increases the amount of information displayed during decompression

## ◆ ~SequenceDecompressor()

dirac::SequenceDecompressor::~SequenceDecompressor | ( |  | ) |

Closes files and releases resources.

## ◆ SequenceDecompressor() [2/2]

dirac::SequenceDecompressor::SequenceDecompressor | ( | const SequenceDecompressor & | cpy | ) |
| private

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

## Member Function Documentation

## ◆ DecompressNextPicture()

const Picture * dirac::SequenceDecompressor::DecompressNextPicture | ( | ParseUnitByteIO * | p_parseunit_byteio | ) |

This function decodes the next picture in coding order and returns the next picture in display order. In general these will differ, and because of re-ordering there is a delay which needs to be imposed. This creates problems at the start and at the end of the sequence which must be dealt with. At the start we just keep outputting picture 0. At the end you will need to loop for longer to get all the pictures out. It's up to the calling function to do something with the decoded pictures as they come out – write them to screen or to file, as required.

Parameters

  p_parseunit_byteio | Picture information in Dirac-stream format

Returns
  reference to the next locally decoded picture available for display

## ◆ Finished()

bool dirac::SequenceDecompressor::Finished | ( |  | ) |

Indicates whether or not the last picture in the sequence has been decompressed.

Returns
  true if last picture has been compressed; false if not

## ◆ GetDecoderParams()

DecoderParams & dirac::SequenceDecompressor::GetDecoderParams | ( |  | ) |
| inline

Returns the decoder parameters used for this decompression run.

Returns
  decoder parameters.

References m_decparams.

## ◆ GetNextPicture()

const Picture * dirac::SequenceDecompressor::GetNextPicture | ( |  | ) |

## ◆ GetNextPictureParams()

const PictureParams * dirac::SequenceDecompressor::GetNextPictureParams | ( |  | ) | const

## ◆ GetParseParams()

ParseParams & dirac::SequenceDecompressor::GetParseParams | ( |  | ) |
| inline

Returns the parse parameters used for this decompression run.

Returns
  parse parameters.

References m_parse_params.

## ◆ GetSourceParams()

SourceParams & dirac::SequenceDecompressor::GetSourceParams | ( |  | ) |
| inline

Returns the source parameters used for this decompression run.

Returns
  source parameters.

References m_srcparams.

## ◆ NewAccessUnit()

void dirac::SequenceDecompressor::NewAccessUnit | ( | ParseUnitByteIO & | parseunit_byteio | ) |

Parameters

  parseunit_byteio | AccessUnit info in Dirac-stream format

## ◆ operator=()

SequenceDecompressor & dirac::SequenceDecompressor::operator= | ( | const SequenceDecompressor & | rhs | ) |
| private

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

## Member Data Documentation

## ◆ m_all_done

bool dirac::SequenceDecompressor::m_all_done
| private

## ◆ m_current_code_pnum

int dirac::SequenceDecompressor::m_current_code_pnum
| private

## ◆ m_decparams

DecoderParams dirac::SequenceDecompressor::m_decparams
| private

Referenced by GetDecoderParams().

## ◆ m_delay

int dirac::SequenceDecompressor::m_delay
| private

## ◆ m_highest_pnum

int dirac::SequenceDecompressor::m_highest_pnum
| private

## ◆ m_last_picture_read

int dirac::SequenceDecompressor::m_last_picture_read
| private

## ◆ m_parse_params

ParseParams dirac::SequenceDecompressor::m_parse_params
| private

Referenced by GetParseParams().

## ◆ m_pbuffer

PictureBuffer* dirac::SequenceDecompressor::m_pbuffer
| private

## ◆ m_pdecoder

PictureDecompressor* dirac::SequenceDecompressor::m_pdecoder
| private

## ◆ m_show_pnum

int dirac::SequenceDecompressor::m_show_pnum
| private

## ◆ m_srcparams

SourceParams dirac::SequenceDecompressor::m_srcparams
| private

Referenced by GetSourceParams().

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

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