VirtualDub Plugins
(Yeah, there's only one right now.)
NoDrops
Download filter with source code
README file:
"NoDrops" video filter for
VirtualDub
v0.1 (3 Oct 2005)
by Charles Boling
Source code adapted from the
tutorial included with the VirtualDub SDK.
Do whatever you want with it.
INTRO
-----
This filter was created to get
rid of the annoying solid lavender fields put out
by my Osprey 100 video capture
card when capturing video from some
worn-out VHS video tapes.
They apparently represent fields it dropped because
it couldn't get a clean signal.
Most often, one field of a frame
will be dropped, while the other is okay.
In fact, many times that one
field will be dropped for several frames (i.e. it's
catching every other
field). Sometimes an entire frame will be dropped, or even
several consecutive frames.
The filter works with both
interlaced and non-interlaced sources, though it was
designed specifically for
interlaced.
HOW IT WORKS
------------
Note: "Blank" refers to a dropped
frame that matches the specific lavender color.
It scans each row in a frame to
see if it's "blank"or not. If not, it keeps it
unchanged. If it's blank,
it attempts to reconstruct an approximation of the
original frame in one of two
ways: temporal duplication or spacial duplication.
If the corresponding row in the
previous frame is okay, it will copy it. If the
row in the previous frame is
blank too, it will instead grab the previous row
of the current frame (or next
row, if we're looking at the 1st row) and use it.
SIDE EFFECTS
------------
When the preferred temporal
duplication is used, the "comb effect" is increased
in moving parts of interlaced
frames where a single field is missing, but the
increased resultion is maintained
in the non-moving parts.
In non-interlaced video, or in
interlaced frames with both fields missing, this
will show up as jumpiness, since
the entire frame is copied, rather than every
other row.
When Spacial Duplication, or
"scan line doubling" is used in an interlaced video
stream, a temporary loss of
vertical resolution occurs over the entire frame.
If an more than one entire frames
are missing in a sequence, only the first one
will be repaired (unless half the
previous one was dropped too, in which it will
only have half the scan lines
repaired), but the rest of the frames in the
sequence will still be blanked
out.
It's not perfect, but it's a vast
improvement over the constant "pink flashes".
FUTURE IMPROVEMENTS
-------------------
This filter was created to
fulfill a pretty specific need for myself.
Things I can think of to improve,
but haven't because of a lack of time, as well
as not really knowing much about
either C programming or video filters:
1. Add MMX Optimizations
2. Allow user to change "dropped"
color (maybe not needed. I don't know if
other video cards do
a similar thing or not, or if a different setting on
the Osprey would
change the output color.)
3. Interpolate rather than
duplicate. Lots of interpolating filters out there
to copy; perhaps no
need to reinvent the wheel.
4. decide on each frame (or row,
or piece of a row) whether temporal or spacial
interpolation would
be more accurate; maybe use both when available to
produce a more
accurate estimation.
Comments? Send email to:
vdub <at> boling.us