Created by the British Broadcasting Corporation.
Decompresses a sequence of pictures from a stream. More...
#include <seq_decompress.h>
Public Member Functions | |
SequenceDecompressor (ParseUnitByteIO &parseunit, bool verbosity) | |
Constructor. | |
~SequenceDecompressor () | |
Destructor. | |
void | NewAccessUnit (ParseUnitByteIO &parseunit_byteio) |
Marks beginning of a new AccessUnit. | |
const Picture * | DecompressNextPicture (ParseUnitByteIO *p_parseunit_byteio) |
Decompress the next picture in sequence. | |
const Picture * | GetNextPicture () |
Get the next picture available for display. | |
const PictureParams * | GetNextPictureParams () const |
Get the next picture parameters. | |
bool | Finished () |
Determine if decompression is complete. | |
ParseParams & | GetParseParams () |
Interrogates for parse parameters. | |
SourceParams & | GetSourceParams () |
Interrogates for source parameters. | |
DecoderParams & | GetDecoderParams () |
Interrogates for coding parameters. |
Private Member Functions | |
SequenceDecompressor (const SequenceDecompressor &cpy) | |
Copy constructor is private and body-less. | |
SequenceDecompressor & | operator= (const SequenceDecompressor &rhs) |
Assignment = is private and body-less. |
Private Attributes | |
bool | m_all_done |
Completion flag, returned via the Finished method. | |
DecoderParams | m_decparams |
Parameters for the decompression, as provided in constructor. | |
ParseParams | m_parse_params |
The parse parameters obtained from the stream header. | |
SourceParams | m_srcparams |
The source parameters obtained from the stream header. | |
PictureBuffer * | m_pbuffer |
A picture buffer used for local storage of pictures whilst pending re-ordering or being used for reference. | |
int | m_current_code_pnum |
Number of the picture in coded order which is to be decoded. | |
int | m_delay |
A delay so that we don't display what we haven't decoded. | |
int | m_last_picture_read |
Index, in display order, of the last picture read. | |
int | m_show_pnum |
Index, in display order of the picture to be displayed next - computed from delay and current_code_pnum. | |
PictureDecompressor * | m_pdecoder |
Picture decompressor object. | |
int | m_highest_pnum |
Highest picture-num processed - for tracking end-of-sequence. |
This class decompresses a sequence of frames, picture by picture.
dirac::SequenceDecompressor::SequenceDecompressor | ( | ParseUnitByteIO & | parseunit, |
bool | verbosity | ||
) |
Initializes the decompressor with an input stream and level of output detail.
parseunit | First access-unit of new sequence |
verbosity | when true, increases the amount of information displayed during decompression |
dirac::SequenceDecompressor::~SequenceDecompressor | ( | ) |
Closes files and releases resources.
|
private |
Copy constructor is private and body-less. This class should not be copied.
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.
p_parseunit_byteio | Picture information in Dirac-stream format |
bool dirac::SequenceDecompressor::Finished | ( | ) |
Indicates whether or not the last picture in the sequence has been decompressed.
|
inline |
Returns the decoder parameters used for this decompression run.
References m_decparams.
const Picture* dirac::SequenceDecompressor::GetNextPicture | ( | ) |
const PictureParams* dirac::SequenceDecompressor::GetNextPictureParams | ( | ) | const |
|
inline |
Returns the parse parameters used for this decompression run.
References m_parse_params.
|
inline |
Returns the source parameters used for this decompression run.
References m_srcparams.
void dirac::SequenceDecompressor::NewAccessUnit | ( | ParseUnitByteIO & | parseunit_byteio | ) |
parseunit_byteio | AccessUnit info in Dirac-stream format |
|
private |
Assignment = is private and body-less. This class should not be assigned.
|
private |
|
private |
|
private |
Referenced by GetDecoderParams().
|
private |
|
private |
|
private |
|
private |
Referenced by GetParseParams().
|
private |
|
private |
|
private |
|
private |
Referenced by GetSourceParams().
© 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.