[FFmpeg-devel] [PATCH 2/2] lavfi/WIP: port IVTC filters from vapoursynth.
Clément Bœsch
ubitux at gmail.com
Sun Mar 24 21:01:26 CET 2013
On Sun, Mar 24, 2013 at 03:22:18PM +0100, Nicolas George wrote:
> Le quartidi 4 germinal, an CCXXI, Clement Boesch a écrit :
> > +static int filter_frame(AVFilterLink *inlink, AVFrame *in)
>
> > + if (inlink == ctx->inputs[INPUT_MAIN]) {
> > + SLIDING_FRAME_WINDOW(fm->prv, fm->src, fm->nxt);
> > + fm->got_frame[INPUT_MAIN] = 1;
> > + } else {
> > + SLIDING_FRAME_WINDOW(fm->prv2, fm->src2, fm->nxt2);
> > + fm->got_frame[INPUT_CLEANSRC] = 1;
> > + }
>
> You could use FF_INLINK_IDX.
>
Will look at it.
> Reading your code, I see no synchronization mechanism: in->pts is used only
> in a debug message. OTOH, your other message suggest that one possible use
> is to have one input connected to decimate and the other not: this will not
> work, since decimate skips frames, and therefore does not maintain
> frame-per-frame synchronization.
>
Yes there is no synchronization mechanism: the two inputs are supposed to
be exactly in sync; the difference is that one is visually altered, but
the number of frames, pts etc should be exactly the same.
I'm not sure to get your point about decimate; fieldmatch is picking from
two sources in sync, and decimate is also picking from two sources in
sync. Decimate is indeed dropping some frames, but this only concerns its
output. Am I missing something?
Just to be sure, this is what it would looks like in case of fieldmatch
and decimate using two inputs each:
split
[fmneedpp][fmclean];
[fmneedpp] field, denoise, tinterlace [fmpp];
[fmpp][fmclean] fieldmatch=ppsrc=1,
<eventually a deinterlacer such as yadif here>
split
[dmneedpp][dmclean];
[dmneedpp] denoise [dmpp];
[dmpp][dmclean] decimate=ppsrc=1
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130324/61e4a8ab/attachment.asc>
More information about the ffmpeg-devel
mailing list