[FFmpeg-devel] [PATCH] [1/??] [2/3] Basic infrastructure

Michael Niedermayer michaelni
Sun Feb 10 15:55:41 CET 2008


On Sun, Feb 10, 2008 at 11:03:48AM +0100, Vitor Sessak wrote:
> Hi and thanks for the review
[...]
> >>         switch(link->init_state) {
> >>         case AVLINK_INIT:
> >>             continue;
> >>         case AVLINK_STARTINIT:
> >>             av_log(filter, AV_LOG_ERROR, "circular filter chain detected\n");
> >>             return -1;
> >>         case AVLINK_UNINIT:
> >>             link->init_state = AVLINK_STARTINIT;
> >>
> >>             if(avfilter_config_links(link->src))
> >>                 return -1;
> >>
> >>             if(!(config_link = link_spad(link).config_props))
> >>                 config_link  = avfilter_default_config_output_link;
> >>             if(config_link(link))
> >>                 return -1;
> >>
> >>             if((config_link = link_dpad(link).config_props))
> >>             if(config_link(link))
> >>                 return -1;
> >>
> >>             link->init_state = AVLINK_INIT;
> >>         }
> >>     }
> > 
> > what does the above mean for filter graphs like:
> > 
> > ->mix--->duplicate--->
> >    ^         |
> >    |         v
> >     \------delay
> > 
> > aka an infinite impulse response video filter :)
> > it looks like it would return -1 for that ...
> 
> What should be done in these cases? Something like av_log("Circular 
> video chain, expect trouble\n")?

Well, id say avfilter should work with circular chains as well. Of course
not with all, one can easily build ones which would deadlock ...
Actually most random circular chains would deadlock, but above would not
as long as the duplicate filter is carefully implemented. That is if
a request from the delay filter would be satifies with whatever last
frame the duplicate filter has and never be passed on to the mix filter.


[...]

> All the other points I don't mention, agreed and changed. New code in 
> http://svn.mplayerhq.hu/soc/libavfilter/avfilter.c?content-type=text%2Fplain&view=co 
> (Diego, nits changed in the soc tree too).

This is just one file the patch contained more, thus i cant review it and
you should send patches anyway instead of links to non constant files.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080210/5f72d657/attachment.pgp>



More information about the ffmpeg-devel mailing list