Deinterlace frames using the "bob" method. More...
#include <Transport/BobDeinterlacer.H>
Public Member Functions | |
BobDeinterlacer (OptionManager &mgr) | |
Constructor. | |
virtual | ~BobDeinterlacer () |
Destructor. | |
void | setListener (rutz::shared_ptr< FrameListener > listener) |
Install a FrameListener. | |
virtual GenericFrameSpec | peekFrameSpec () |
Return the specifications of the next frame. | |
virtual SimTime | getNaturalFrameTime () const |
Get the natural deinterlaced frame (this will be half the frame time of our delegate). | |
virtual bool | setFrameNumber (int n) |
Advise the deinterlacer of the current frame number; pass along to our delegate. | |
virtual void | startStream () |
Get a streaming grab started; reset our timing variables. | |
virtual GenericFrame | readFrame () |
Get the next bob-deinterlaced frame. | |
Protected Member Functions | |
virtual void | start2 () |
This is called from within start() after the subcomponents have started. | |
virtual void | stop2 () |
This is called from within stop() after the subcomponents have stopped. |
Deinterlace frames using the "bob" method.
In short, the "bob" method separates the top and bottom half-frames, rescales each of them up to full size, and then displays a video stream at double the normal rate. It is named "bob" for the slight bobbing up and down that may occur due to the one-pixel vertical offset between the top and bottom half frames; however in practice this bobbing usually imperceptible.
See http://en.wikipedia.org/wiki/Deinterlacing and http://www.100fps.com/ and for lots of information on various deinterlacing methods.
Definition at line 57 of file BobDeinterlacer.H.
BobDeinterlacer::BobDeinterlacer | ( | OptionManager & | mgr | ) |
Constructor.
Definition at line 47 of file BobDeinterlacer.C.
BobDeinterlacer::~BobDeinterlacer | ( | ) | [virtual] |
Destructor.
Definition at line 61 of file BobDeinterlacer.C.
SimTime BobDeinterlacer::getNaturalFrameTime | ( | ) | const [virtual] |
Get the natural deinterlaced frame (this will be half the frame time of our delegate).
Reimplemented from FrameIstream.
Definition at line 121 of file BobDeinterlacer.C.
GenericFrameSpec BobDeinterlacer::peekFrameSpec | ( | ) | [virtual] |
Return the specifications of the next frame.
Implements FrameIstream.
Definition at line 71 of file BobDeinterlacer.C.
References ASSERT, Deinterlacer::getDelegate(), GenericFrame::GRAY_F32, GenericFrame::GRAY_U16, GenericFrame::GRAY_U8, GenericFrame::NONE, FrameIstream::peekFrameSpec(), GenericFrame::RGB_F32, GenericFrame::RGB_U16, GenericFrame::RGB_U8, and GenericFrame::RGBD.
GenericFrame BobDeinterlacer::readFrame | ( | ) | [virtual] |
Get the next bob-deinterlaced frame.
Implements FrameIstream.
Definition at line 151 of file BobDeinterlacer.C.
References GenericFrame::asVideo(), Deinterlacer::getDelegate(), VideoFrame::initialized(), VideoFrame::makeBobDeinterlaced(), FrameIstream::readFrame(), SimTime::usecs(), rutz::time::wall_clock_now(), and SimTime::ZERO().
bool BobDeinterlacer::setFrameNumber | ( | int | n | ) | [virtual] |
Advise the deinterlacer of the current frame number; pass along to our delegate.
Reimplemented from FrameIstream.
Definition at line 127 of file BobDeinterlacer.C.
References ASSERT, Deinterlacer::getDelegate(), and FrameIstream::setFrameNumber().
void BobDeinterlacer::setListener | ( | rutz::shared_ptr< FrameListener > | listener | ) | [virtual] |
Install a FrameListener.
NOTE! The listener will get the NON-DEINTERLACED frames!
Reimplemented from FrameIstream.
Definition at line 65 of file BobDeinterlacer.C.
References Deinterlacer::getDelegate(), and FrameIstream::setListener().
void BobDeinterlacer::start2 | ( | ) | [protected, virtual] |
This is called from within start() after the subcomponents have started.
Reimplemented from ModelComponent.
Definition at line 232 of file BobDeinterlacer.C.
References Deinterlacer::getDelegate(), FrameIstream::getNaturalFrameTime(), SimTime::hertz(), isSimplePackedMode(), FrameIstream::peekFrameSpec(), and SimTime::usecs().
void BobDeinterlacer::startStream | ( | ) | [virtual] |
Get a streaming grab started; reset our timing variables.
Reimplemented from FrameIstream.
Definition at line 143 of file BobDeinterlacer.C.
References Deinterlacer::getDelegate(), and FrameIstream::startStream().
void BobDeinterlacer::stop2 | ( | ) | [protected, virtual] |
This is called from within stop() after the subcomponents have stopped.
Reimplemented from ModelComponent.
Definition at line 261 of file BobDeinterlacer.C.