Created by the British Broadcasting Corporation.
Compresses a sequence of frames from a stream. More...
#include <seq_compress.h>
Public Member Functions | |
| FrameSequenceCompressor (StreamPicInput *pin, EncoderParams &encp, DiracByteStream &dirac_byte_stream) | |
| Constructor. More... | |
| virtual | ~FrameSequenceCompressor () |
| Destructor. More... | |
| virtual bool | LoadNextFrame () |
| Load data. More... | |
| virtual void | SetPicTypeAndRefs (PictureParams &pparams) |
| Set up the appropriate prediction parameters for a picture. More... | |
Public Member Functions inherited from dirac::SequenceCompressor | |
| SequenceCompressor (StreamPicInput *pin, EncoderParams &encp, DiracByteStream &dirac_byte_stream) | |
| Constructor. More... | |
| virtual | ~SequenceCompressor () |
| Destructor. More... | |
| virtual bool | LoadNextFrame ()=0 |
| Load data. More... | |
| const EncPicture * | CompressNextPicture () |
| Compress the next picture in sequence. More... | |
| virtual void | SetPicTypeAndRefs (PictureParams &pparams)=0 |
| Set up the appropriate prediction parameters for a picture. More... | |
| const EncPicture * | GetPictureEncoded () |
| Return a pointer to the most recent picture encoded. More... | |
| DiracByteStats | EndSequence () |
| bool | Finished () |
| Determine if compression is complete. More... | |
| void | SignalEOS () |
| Signal end of sequence. More... | |
| int | PTSOffset () |
| The delay required for correct timestamps. More... | |
Protected Member Functions | |
| virtual int | CodedToDisplay (const int pnum) |
| Uses the GOP parameters to convert picture numbers in coded order to display order. More... | |
| virtual void | UpdateCBRModel (EncPicture &my_picture, const PictureByteIO *picture_byteio) |
| Update the CBR model based on the data we've compressed. More... | |
Protected Member Functions inherited from dirac::SequenceCompressor | |
| void | SetMotionParameters () |
| Set up the motion block parameters. More... | |
| virtual int | CodedToDisplay (const int pnum)=0 |
| Uses the GOP parameters to convert picture numbers in coded order to display order. More... | |
| void | MakeSequenceReport () |
| Make a report to screen on the coding results for the whole sequence. More... | |
| virtual void | CleanBuffers () |
| Remove unwanted pictures from picture buffers. More... | |
| virtual void | UpdateCBRModel (EncPicture &my_picture, const PictureByteIO *picture_byteio)=0 |
| Update the CBR model based on the data we've compressed. More... | |
| void | UpdateIntraPicCBRModel (const PictureParams &, const bool is_a_cut) |
| Update the parameters to be used in advance of coding an intra frame. More... | |
| bool | CanEncode () |
| Returns true if the encoder can encode a picture. More... | |
Additional Inherited Members | |
Protected Attributes inherited from dirac::SequenceCompressor | |
| bool | m_all_done |
| Completion flag, returned via the Finished method. More... | |
| bool | m_just_finished |
| Flag indicating whether we've just finished. More... | |
| OLBParams * | m_basic_olb_params0 |
| A class to hold the basic block parameters. More... | |
| OLBParams * | m_basic_olb_params1 |
| A class to hold the basic block parameters. More... | |
| const OLBParams * | m_basic_olb_params2 |
| A class to hold the basic block parameters. More... | |
| OLBParams * | m_intra_olbp |
| A class to hold block parameters to use when there are lots of intra blocks. More... | |
| SourceParams & | m_srcparams |
| The parameters of the input source. More... | |
| EncoderParams & | m_encparams |
| The parameters used for encoding. More... | |
| PicturePredParams & | m_predparams |
| The parameters used for ME/MC. More... | |
| int | m_L1_sep |
| The L1 separation currently in use. More... | |
| PictureParams | m_pparams |
| Generic picture parameters for initialising pictures. More... | |
| StreamPicInput * | m_pic_in |
| Pointer pointing at the picture input. More... | |
| EncQueue | m_enc_pbuffer |
| A picture buffer used for local storage of pictures whilst pending re-ordering or being used for reference. More... | |
| int | m_current_display_pnum |
| The number of the current picture to be coded, in display order. More... | |
| int | m_current_code_pnum |
| The number of the current picture to be coded, in coded order. More... | |
| int | m_show_pnum |
| The number of the picture which should be output for concurrent display or storage. More... | |
| int | m_last_picture_read |
| The index, in display order, of the last picture read. More... | |
| int | m_gop_start_num |
| The picture number of the last GOP start. More... | |
| int | m_delay |
| A delay so that we don't display what we haven't coded. More... | |
| QualityMonitor | m_qmonitor |
| A class for monitoring the quality of pictures and adjusting parameters appropriately. More... | |
| RateController * | m_ratecontrol |
| A class for monitoring and controlling bit rate. More... | |
| PictureCompressor | m_pcoder |
| A class to hold the picture compressor object. More... | |
| DiracByteStream & | m_dirac_byte_stream |
| Output destination for compressed data in bitstream format. More... | |
| bool | m_eos_signalled |
| Flag to check if End of Sequence has been signalled by the end user. More... | |
This class compresses a sequence of frames, frame by frame. 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.
| dirac::FrameSequenceCompressor::FrameSequenceCompressor | ( | StreamPicInput * | pin, |
| EncoderParams & | encp, | ||
| DiracByteStream & | dirac_byte_stream | ||
| ) |
Creates a sequence compressor that compresses frames i.e. progressive data, and prepares to begin compressing with the first frame.Sets up frame 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 |
|
inlinevirtual |
Destructor. Must delete IO objects created by constructor.
|
protectedvirtual |
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 |
Implements dirac::SequenceCompressor.
|
virtual |
Load one frame of data into the Sequence Compressor. Sets m_all_done to true if no more data is available to be loaded.
Implements dirac::SequenceCompressor.
|
virtual |
Implements dirac::SequenceCompressor.
|
protectedvirtual |
Implements dirac::SequenceCompressor.
© 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.