Created by the British Broadcasting Corporation.
#include <seq_compress.h>
Inheritance diagram for dirac::SequenceCompressor:
This is an abstract class.
dirac::SequenceCompressor::SequenceCompressor | ( | StreamPicInput * | pin, | |
EncoderParams & | encp, | |||
DiracByteStream & | dirac_byte_stream | |||
) |
Creates a sequence compressor, and prepares to begin compressing with the first picture.Sets up picture padding in the picture input if necesary
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.
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.
Implemented in dirac::FrameSequenceCompressor, and dirac::FieldSequenceCompressor.
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.
virtual void dirac::SequenceCompressor::SetPicTypeAndRefs | ( | PictureParams & | pparams | ) | [pure virtual] |
Implemented in dirac::FrameSequenceCompressor, and dirac::FieldSequenceCompressor.
const EncPicture* dirac::SequenceCompressor::GetPictureEncoded | ( | ) |
DiracByteStats dirac::SequenceCompressor::EndSequence | ( | ) |
bool dirac::SequenceCompressor::Finished | ( | ) | [inline] |
Indicates whether or not the last picture in the sequence has been compressed.
void dirac::SequenceCompressor::SignalEOS | ( | ) | [inline] |
void dirac::SequenceCompressor::SetMotionParameters | ( | ) | [protected] |
virtual int dirac::SequenceCompressor::CodedToDisplay | ( | const int | pnum | ) | [protected, pure 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.
pnum | the picture number in coded order |
Implemented in dirac::FrameSequenceCompressor, and dirac::FieldSequenceCompressor.
void dirac::SequenceCompressor::MakeSequenceReport | ( | ) | [protected] |
virtual void dirac::SequenceCompressor::CleanBuffers | ( | ) | [protected, virtual] |
virtual void dirac::SequenceCompressor::UpdateCBRModel | ( | EncPicture & | my_picture, | |
const PictureByteIO * | picture_byteio | |||
) | [protected, pure virtual] |
Implemented in dirac::FrameSequenceCompressor, and dirac::FieldSequenceCompressor.
void dirac::SequenceCompressor::UpdateIntraPicCBRModel | ( | const PictureParams & | , | |
const bool | is_a_cut | |||
) | [protected] |
bool dirac::SequenceCompressor::CanEncode | ( | ) | [protected] |
SequenceCompressor& dirac::SequenceCompressor::operator= | ( | const SequenceCompressor & | rhs | ) | [private] |
Assignment = is private and body-less. This class should not be assigned..
bool dirac::SequenceCompressor::m_all_done [protected] |
bool dirac::SequenceCompressor::m_just_finished [protected] |
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).
OLBParams* dirac::SequenceCompressor::m_intra_olbp [protected] |
SourceParams& dirac::SequenceCompressor::m_srcparams [protected] |
EncoderParams& dirac::SequenceCompressor::m_encparams [protected] |
PicturePredParams& dirac::SequenceCompressor::m_predparams [protected] |
int dirac::SequenceCompressor::m_L1_sep [protected] |
PictureParams dirac::SequenceCompressor::m_pparams [protected] |
StreamPicInput* dirac::SequenceCompressor::m_pic_in [protected] |
EncQueue dirac::SequenceCompressor::m_enc_pbuffer [protected] |
int dirac::SequenceCompressor::m_current_display_pnum [protected] |
int dirac::SequenceCompressor::m_current_code_pnum [protected] |
int dirac::SequenceCompressor::m_show_pnum [protected] |
int dirac::SequenceCompressor::m_last_picture_read [protected] |
int dirac::SequenceCompressor::m_gop_start_num [protected] |
int dirac::SequenceCompressor::m_delay [protected] |
QualityMonitor dirac::SequenceCompressor::m_qmonitor [protected] |
RateController* dirac::SequenceCompressor::m_ratecontrol [protected] |
PictureCompressor dirac::SequenceCompressor::m_pcoder [protected] |
bool dirac::SequenceCompressor::m_eos_signalled [protected] |
© 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.