[FFmpeg-devel] [PATCH] [2/??] [3/3] Filter graphs - Parser for a graph description

vmrsss vmrsss
Fri Mar 21 17:28:07 CET 2008


On 19 Mar 2008, at 00:16, Aurelien Jacobs wrote:
> BTW, both syntax are not mutually exclusive. Just replace () by []
> in the original syntax and we could combine advantages.
> Just an example with two "branches" plus a feedback:
>
> (X)filter1(T1),filter2,filter3,(T2)filter4;(T1)filter5(X,T2)
> VS.
> [X]filter1,filter2*filter5[X],filter3*nop,filter4

Not entirely sure what you meant here, but indeed a feedback operator  
based on names rather than indices could be something like this (not  
necessarily simple to understand, but I repeat: feedback is hard, it's  
an intrinsically difficult beast)

(1) In the absence of a specific indication, there are no loops (even  
if names coincide): eg in

> 	(X)filter1(T1),filter2,filter3,(T2)filter4;(T1)filter5(X,T2)

the two occurrencs of X and thos of T1 and T2 are different, do not  
form a loop: this is a filter with no feedback.

(2) We have a feedback operator [X] which acts like ! on the specific  
name X. Eg

	 [T1] (X)filter1(T1),filter2,filter3,(T2)filter4;(T1)filter5(X,T2)

where there is only one loop on name T1, or

	 [X T1 T2] (X)filter1(T1),filter2,filter3,(T2)filter4;(T1)filter5(X,T2)

where all the loops are closed. I know this is buggy and needs more  
thinking, eg in a term like

	(X Y) filter (K H)

one would never be able to add feedback without hacking in the code,  
because there isn't any shared variable. So perhaps a more useful  
operator would be

	[X0,Y0  X1,Y1 ... ]  FILTER  meaning feedback Y0 to  X0, Y1 to  
X1, .... in FILTER

Hmm, not sure perhaps [X] is better but need to be paired with some  
renaming mechanism.

If there is interest, I will think about this.





More information about the ffmpeg-devel mailing list