- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Hierarchy
- Class Members

# dirac::SequenceCompressor Class Reference

Compresses a sequence of frames from a stream. More...

`#include <seq_compress.h>`

List of all members.

## 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.

## Detailed Description

Compresses a sequence of frames from a stream.

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 & Destructor Documentation

SequenceCompressor::SequenceCompressor | ( | StreamPicInput * | pin,
|  | std::ostream * | outfile,
|  | EncoderParams & | encp
| ) |

  | Constructor. Creates a sequence compressor, and prepares to begin compressing with the first frame.Sets up frame padding in the picture input if necesary Parameters:
  | pin | an input stream containing a sequence of frames
  | outfile | an output stream for the compressed output
  | encp | parameters for the encoding process
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().

SequenceCompressor::~SequenceCompressor | ( |  | ) |

| Destructor. Destructor. Must delete IO objects created by constructor. Definition at line 160 of file seq_compress.cpp.

## Member Function Documentation

Frame & SequenceCompressor::CompressNextFrame | ( |  | ) |

| 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. Returns: reference to the next locally decoded frame available for display 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().

bool dirac::SequenceCompressor::Finished | ( |  | ) | `[inline]`

| Determine if compression is complete. Indicates whether or not the last frame in the sequence has been compressed. Returns: true if last frame has been compressed; false if not Definition at line 129 of file seq_compress.h. Referenced by DiracEncoder::CompressNextFrame(), and DiracEncoder::LoadNextFrame().

bool SequenceCompressor::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. Returns: true - if frame load succeeded. false - otherwise Definition at line 174 of file seq_compress.cpp. References dirac::StreamPicInput::End(), dirac::FrameBuffer::GetFrame(), and dirac::FrameBuffer::PushFrame(). Referenced by DiracEncoder::LoadNextFrame().

The documentation for this class was generated from the following files:

- C:/guliverkli/src/filters/parser/diracsplitter/libdirac/libdirac_encoder/seq_compress.h
- C:/guliverkli/src/filters/parser/diracsplitter/libdirac/libdirac_encoder/seq_compress.cpp