#include <frame_buffer.h>
Public Member Functions | |
FrameBuffer (ChromaFormat cf, int xlen, int ylen) | |
Constructor. | |
FrameBuffer (ChromaFormat cf, int L1sep, int xlen, int ylen) | |
Constructor. | |
FrameBuffer (ChromaFormat cf, int numL1, int L1sep, int xlen, int ylen) | |
Constructor. | |
FrameBuffer (const FrameBuffer &cpy) | |
Copy constructor. | |
FrameBuffer & | operator= (const FrameBuffer &rhs) |
Operator=. | |
~FrameBuffer () | |
Destructor. | |
Frame & | GetFrame (unsigned int fnum) |
Get frame with a given frame number (NOT with a given position in the buffer). | |
const Frame & | GetFrame (unsigned int fnum) const |
Get frame with a given frame number (NOT with a given position in the buffer). | |
PicArray & | GetComponent (unsigned int frame_num, CompSort c) |
Get component with a given component sort and frame number (NOT with a given position in the buffer). | |
const PicArray & | GetComponent (unsigned int frame_num, CompSort c) const |
Get component with a given component sort and frame number (NOT with a given position in the buffer). | |
PicArray & | GetUpComponent (unsigned int frame_num, CompSort c) |
Get upconverted component with a given component sort and frame number (NOT with a given position in the buffer). | |
const PicArray & | GetUpComponent (unsigned int frame_num, CompSort c) const |
Get upconverted component with a given component sort and frame number (NOT with a given position in the buffer). | |
size_t | Size () const |
Return the number of frames in the buffer. | |
void | PushFrame (unsigned int frame_num) |
Put a new frame into the top of the buffer. | |
void | PushFrame (const FrameParams &fp) |
Put a new frame into the top of the buffer. | |
void | PushFrame (const Frame &frame) |
Put a copy of a new frame into the top of the buffer. | |
void | PushFrame (StreamPicInput *picin, const FrameParams &fp) |
Read a new frame into the buffer. | |
void | PushFrame (StreamPicInput *picin, unsigned int fnum) |
Read a new frame into the buffer. | |
void | Clean (int fnum) |
Delete expired frames. | |
const FrameParams & | GetFParams () const |
Return the default frame parameters. |
The buffer holds frames in a stack to overcome both reordering due to bi-directional prediction and use as references for subsequence motion estimation. Frames, and components of frames, can be accessed by their frame numbers. GOP parameters can be included in the constructors so that frames can be given types (I frame, L1 frame or L2 frame) on being pushed onto the stack; alternatively, these parameters can be overridden.
Definition at line 59 of file frame_buffer.h.
|
Constructor. Creates a FrameBuffer using the chroma format. Suitable for compressing when there are no L2 frames, or when the temporal prediction structure is to be determined on the fly.
Definition at line 43 of file frame_buffer.cpp. |
|
Constructor. Creates a FrameBuffer using the chroma format and the separation in frames between L1 frames. Suitable for compressing when there is no GOP structure, only an initial I-frame, or when the temporal prediction structure is to be determined on the fly.
Definition at line 51 of file frame_buffer.cpp. |
|
Constructor. Creates a FrameBuffer using the chroma format, the number of L1 frames between I frames and the separation in frames between L1 frames. Suitable for compressing when there is a full GOP structure or when the temporal prediction structure is to be determined on the fly.
Definition at line 59 of file frame_buffer.cpp. |
|
Copy constructor. Copy constructor. Removes the current contents of the frame buffer and copies in the contents of the initialising buffer. Definition at line 80 of file frame_buffer.cpp. References m_frame_data. |
|
Delete expired frames. Delete frames which have been output and which are no longer required for reference. Expiry times are set in each frame's frame parameters. Definition at line 308 of file frame_buffer.cpp. Referenced by dirac::SequenceCompressor::CompressNextFrame(), and dirac::SequenceDecompressor::DecompressNextFrame(). |
|
Operator=. Operator=. Assigns all elements of the rhs to the lhs. Definition at line 102 of file frame_buffer.cpp. References m_fnum_map, m_fparams, and m_frame_data. |
|
Read a new frame into the buffer. Read a new frame into the buffer. Frame parameters associated with the frame will be derived from the frame number and the internal GOP parameters in the frame buffer.
Definition at line 277 of file frame_buffer.cpp. References PushFrame(). |
|
Read a new frame into the buffer. Read a new frame into the buffer. Frame parameters associated with the frame will be as given by the frame parameter object.
Definition at line 269 of file frame_buffer.cpp. References PushFrame(), and dirac::StreamPicInput::ReadNextFrame(). |
|
Put a copy of a new frame into the top of the buffer. Put a copy of a new frame into the top of the buffer. Definition at line 254 of file frame_buffer.cpp. References dirac::FrameParams::FrameNum(), and dirac::Frame::GetFparams(). |
|
Put a new frame into the top of the buffer. Put a new frame into the top of the buffer. Frame parameters associated with the frame will be as given by the frame parameter object. Definition at line 241 of file frame_buffer.cpp. References dirac::FrameParams::FrameNum(). |
|
Put a new frame into the top of the buffer. Put a new frame into the top of the buffer. Frame parameters associated with the frame will be the built-in parameters for the buffer.
Definition at line 227 of file frame_buffer.cpp. References dirac::FrameParams::FrameNum(), and dirac::FrameParams::SetFrameNum(). Referenced by dirac::FrameDecompressor::Decompress(), dirac::SequenceCompressor::LoadNextFrame(), and PushFrame(). |