Filter frame lookahead
"Allan N. Snider" <[email protected]> Mon, 26 Jul 2010 12:39:18 -0400
| Newsgroups | gmane.comp.video.transcode.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------070702070404050306060705
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Transcoders:
Just wanted to pop this question out there before I do a code dive.
Somebody might have a quick answer. The yait filter (inverse telecine)
occasionally has to force a keep frame (ie. duplicate) to maintain a/v
sync. Sometimes it needs to do this excessively, which causes stuttered
playback. Instead of simply duplicating a frame, it would be nice to
generate an interpolated frame between the last and next frame. As far
as I know, the next frame isn't available yet to the filter. My
question is this: does the filter API provide any kind of forward
lookahead, ie. maintain a small window of frames as it makes filter
calls? If not, then I'm going to have force two pass encoding, cache
and index raw rgb frames for each interpolation request by the filter,
then do the interpolation on the second pass. Could eat a lot of ram.
For a 2 hour clip, the worst I've seen is around 1200 forced keeps.
Assuming around 1Mb per frame (720x480x3), that's over a GB of ram. I
can handle that, but some might not.
As for the interpolation, I was just going to do a straight forward
pixel averaging between the frames. Unless there are better ways of
doing that.
I know transcode development is pretty much halted now, but it's
still the ideal infrastructure for playing with video filters, so I'm
not letting it go yet.
Allan
--------------070702070404050306060705
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<font size="+1">Transcoders:<br>
Just wanted to pop this question out there before I do a code
dive. Somebody might have a quick answer. The yait filter (inverse
telecine) occasionally has to force a keep frame (ie. duplicate) to
maintain a/v sync. Sometimes it needs to do this excessively, which
causes stuttered playback. Instead of simply duplicating a frame, it
would be nice to generate an interpolated frame between the last and
next frame. As far as I know, the next frame isn't available yet to
the filter. My question is this: does the filter API provide any kind
of forward lookahead, ie. maintain a small window of frames as it makes
filter calls? If not, then I'm going to have force two pass encoding,
cache and index raw rgb frames for each interpolation request by the
filter, then do the interpolation on the second pass. Could eat a lot
of ram. For a 2 hour clip, the worst I've seen is around 1200 forced
keeps. Assuming around 1Mb per frame (720x480x3), that's over a GB of
ram. I can handle that, but some might not.<br>
<br>
As for the interpolation, I was just going to do a straight forward
pixel averaging between the frames. Unless there are better ways of
doing that.<br>
<br>
I know transcode development is pretty much halted now, but it's
still the ideal infrastructure for playing with video filters, so I'm
not letting it go yet.<br>
Allan<br>
<br>
<br>
</font>
</body>
</html>
--------------070702070404050306060705--