[FFmpeg-devel] [PATCH] [1/??] [2/3] Basic infrastructure
Vitor Sessak
vitor1001
Sun Feb 10 17:59:43 CET 2008
Hi
Michael Niedermayer wrote:
> 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.
Ok. So I think a warning is more appropriated.
>
>
> [...]
>
>> 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.
>
Ok. Attached.
-Vitor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: allfilters.h
Type: text/x-chdr
Size: 884 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080210/2c97f071/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avfilter.c
Type: text/x-csrc
Size: 11267 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080210/2c97f071/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avfilter.h
Type: text/x-chdr
Size: 21987 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080210/2c97f071/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defaults.c
Type: text/x-csrc
Size: 4333 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080210/2c97f071/attachment-0001.c>
More information about the ffmpeg-devel
mailing list