#include <seq_compress.h>
Public Member Functions | |
SequenceCompressor (StreamPicInput *pin, std::ostream *outfile, EncoderParams &encp) | |
Constructor. | |
~SequenceCompressor () | |
Destructor. | |
bool | LoadNextFrame () |
Load data. | |
Frame & | CompressNextFrame () |
Compress the next frame in sequence. | |
const Frame * | GetFrameEncoded () |
Return a pointer to the most recent frame encoded. | |
const MEData * | GetMEData () |
Return Motion estimation info related to the most recent frame encoded. | |
void | EndSequence () |
bool | Finished () |
Determine if compression is complete. |
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.
Definition at line 65 of file seq_compress.h.
|
Constructor. Creates a sequence compressor, and prepares to begin compressing with the first frame.Sets up frame padding in the picture input if necesary
Definition at line 46 of file seq_compress.cpp. References dirac::SeqParams::CFormat(), dirac::CodecParams::ChromaBParams(), dirac::StreamPicInput::GetSeqParams(), dirac::EncoderParams::SetBitsOut(), dirac::EncoderParams::SetEntropyFactors(), dirac::CodecParams::SetXNumMB(), dirac::CodecParams::SetYNumMB(), dirac::OLBParams::Xbsep(), dirac::SeqParams::Xl(), dirac::CodecParams::XNumMB(), dirac::OLBParams::Ybsep(), and dirac::SeqParams::Yl(). |
|
Destructor. Destructor. Must delete IO objects created by constructor. Definition at line 160 of file seq_compress.cpp. |
|
Compress the next frame in sequence. This function codes the next frame in coding order and returns the next frame 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 frame 0. At the end you will need to loop for longer to get all the frames out. It's up to the calling function to do something with the decoded frames 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.
Definition at line 188 of file seq_compress.cpp. References dirac::EncoderParams::BitsOut(), dirac::FrameBuffer::Clean(), dirac::FrameCompressor::Compress(), dirac::FrameBuffer::GetFrame(), dirac::SequenceOutputManager::ResetFrame(), dirac::QualityMonitor::UpdateModel(), dirac::CodecParams::Verbose(), and dirac::SequenceOutputManager::WriteFrameData(). Referenced by DiracEncoder::CompressNextFrame(). |
|
Determine if compression is complete. Indicates whether or not the last frame in the sequence has been compressed.
Definition at line 129 of file seq_compress.h. Referenced by DiracEncoder::CompressNextFrame(), and DiracEncoder::LoadNextFrame(). |
|
Load data. Load one frame of data into the Sequence Compressor. Sets m_all_done to true if no more data is available to be loaded.
Definition at line 174 of file seq_compress.cpp. References dirac::StreamPicInput::End(), dirac::FrameBuffer::GetFrame(), and dirac::FrameBuffer::PushFrame(). Referenced by DiracEncoder::LoadNextFrame(). |