Created by the British Broadcasting Corporation.
#include <seq_compress.h>
Collaboration diagram for dirac::SequenceCompressor:
dirac::SequenceCompressor::SequenceCompressor | ( | StreamPicInput * | pin, | |
SourceParams & | srcp, | |||
EncoderParams & | encp, | |||
DiracByteStream & | dirac_byte_stream | |||
) |
Creates a sequence compressor, 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 | |
srcp | parameters for the input source | |
encp | parameters for the encoding process | |
dirac_byte_stream | Output destination for compressed data |
dirac::SequenceCompressor::~SequenceCompressor | ( | ) |
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.
bool dirac::SequenceCompressor::LoadNextFrame | ( | ) |
Load one frame of data into the Sequence Compressor. Sets m_all_done to true if no more data is available to be loaded.
Frame& dirac::SequenceCompressor::CompressNextFrame | ( | ) |
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.
const Frame* dirac::SequenceCompressor::GetFrameEncoded | ( | ) |
const MEData* dirac::SequenceCompressor::GetMEData | ( | ) |
DiracByteStats dirac::SequenceCompressor::EndSequence | ( | ) |
bool dirac::SequenceCompressor::Finished | ( | ) | [inline] |
Indicates whether or not the last frame in the sequence has been compressed.
SequenceCompressor& dirac::SequenceCompressor::operator= | ( | const SequenceCompressor & | rhs | ) | [private] |
Assignment = is private and body-less. This class should not be assigned..
void dirac::SequenceCompressor::Denoise | ( | Frame & | frame | ) | [private] |
void dirac::SequenceCompressor::DenoiseComponent | ( | PicArray & | pic_data | ) | [private] |
ValueType dirac::SequenceCompressor::Median | ( | const ValueType * | val_list, | |
const int | length | |||
) | [private] |
SequenceCompressor& dirac::SequenceCompressor::operator<< | ( | AccessUnitByteIO * | p_accessunit_byteio | ) | [private] |
p_accessunit_byteio | Output destination |
int dirac::SequenceCompressor::CodedToDisplay | ( | const int | fnum | ) | [private] |
Uses the GOP parameters to convert frame numbers in coded order to display order
fnum | the frame number in coded order |
void dirac::SequenceCompressor::MakeSequenceReport | ( | ) | [private] |
void dirac::SequenceCompressor::MakeFrameReport | ( | ) | [private] |
bool dirac::SequenceCompressor::m_all_done [private] |
bool dirac::SequenceCompressor::m_just_finished [private] |
Flag which is false if we've been all-done for more than one frame, true otherwise (so that we can take actions on finishing once only).
FrameBuffer* dirac::SequenceCompressor::m_fbuffer [private] |
int dirac::SequenceCompressor::m_current_display_fnum [private] |
int dirac::SequenceCompressor::m_current_code_fnum [private] |
int dirac::SequenceCompressor::m_current_accessunit_fnum [private] |
int dirac::SequenceCompressor::m_show_fnum [private] |
int dirac::SequenceCompressor::m_last_frame_read [private] |
int dirac::SequenceCompressor::m_delay [private] |
© 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.