Compresses a sequence of frames/fields from a stream.
More...
#include <seq_compress.h>
List of all members.
Public Member Functions
Protected Member Functions
- void SetMotionParameters ()
- Set up the motion block parameters.
- virtual int CodedToDisplay (const int pnum)=0
- Uses the GOP parameters to convert picture numbers in coded order to display order.
- void MakeSequenceReport ()
- Make a report to screen on the coding results for the whole sequence.
- virtual void CleanBuffers ()
- Remove unwanted pictures from picture buffers.
- virtual void UpdateCBRModel (EncPicture &my_picture, const PictureByteIO *picture_byteio)=0
- Update the CBR model based on the data we've compressed.
- void UpdateIntraPicCBRModel (const PictureParams &, const bool is_a_cut)
- Update the parameters to be used in advance of coding an intra frame.
- bool CanEncode ()
- Returns true if the encoder can encode a picture.
Protected Attributes
Private Member Functions
Detailed Description
This class compresses a sequence of frames/fields, frame by frame. or 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.
This is an abstract class.
Constructor & Destructor Documentation
Creates a sequence compressor, and prepares to begin compressing with the first picture.Sets up picture padding in the picture input if necesary
- 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::SequenceCompressor::~SequenceCompressor |
( |
|
) |
[virtual] |
Destructor. Must delete IO objects created by constructor.
dirac::SequenceCompressor::SequenceCompressor |
( |
const SequenceCompressor & |
cpy |
) |
[private] |
Copy constructor is private and body-less. This class should not be copied.
Member Function Documentation
bool dirac::SequenceCompressor::CanEncode |
( |
|
) |
[protected] |
virtual void dirac::SequenceCompressor::CleanBuffers |
( |
|
) |
[protected, virtual] |
virtual int dirac::SequenceCompressor::CodedToDisplay |
( |
const int |
pnum |
) |
[protected, pure virtual] |
const EncPicture* dirac::SequenceCompressor::CompressNextPicture |
( |
|
) |
|
This function codes 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, for example. . If coding is fast enough the compressed version could be watched real-time (with suitable buffering in the calling function to account for encode-time variations).
NOTE: LoadNextFrame must be called atleast once before invoking this method.
- Returns:
- pointer to the next locally decoded picture available for display
bool dirac::SequenceCompressor::Finished |
( |
|
) |
[inline] |
Indicates whether or not the last picture in the sequence has been compressed.
- Returns:
- true if last picture has been compressed; false if not
References m_all_done.
const EncPicture* dirac::SequenceCompressor::GetPictureEncoded |
( |
|
) |
|
virtual bool dirac::SequenceCompressor::LoadNextFrame |
( |
|
) |
[pure virtual] |
Load one picture of data into the Sequence Compressor. Sets m_all_done to true if no more data is available to be loaded. Input can be frame or field. So the child class will have to implement this function.
- Returns:
- true - if frame load succeeded. false - otherwise
Implemented in dirac::FrameSequenceCompressor, and dirac::FieldSequenceCompressor.
void dirac::SequenceCompressor::MakeSequenceReport |
( |
|
) |
[protected] |
Assignment = is private and body-less. This class should not be assigned..
int dirac::SequenceCompressor::PTSOffset |
( |
|
) |
[inline] |
void dirac::SequenceCompressor::SetMotionParameters |
( |
|
) |
[protected] |
virtual void dirac::SequenceCompressor::SetPicTypeAndRefs |
( |
PictureParams & |
pparams |
) |
[pure virtual] |
void dirac::SequenceCompressor::SignalEOS |
( |
|
) |
[inline] |
virtual void dirac::SequenceCompressor::UpdateCBRModel |
( |
EncPicture & |
my_picture, |
|
|
const PictureByteIO * |
picture_byteio | |
|
) |
| | [protected, pure virtual] |
void dirac::SequenceCompressor::UpdateIntraPicCBRModel |
( |
const PictureParams & |
, |
|
|
const bool |
is_a_cut | |
|
) |
| | [protected] |
Member Data Documentation
Flag which is false if we've been all-done for more than one picture, true otherwise (so that we can take actions on finishing once only).
The documentation for this class was generated from the following file:
© 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.