[FFmpeg-devel] [RFC] AVFilter Parser
Wed Mar 26 18:47:57 CET 2008
Michael Niedermayer wrote:
> On Tue, Mar 25, 2008 at 10:57:34PM +0100, Vitor Sessak wrote:
>> Michael Niedermayer wrote:
>>> On Tue, Mar 25, 2008 at 09:41:14PM +0100, Vitor Sessak wrote:
>>>>>> 2- Let the ';' be interpreted like vrmsss's '*'
>>>>>> Advantages, Disadvantages: Same as (1)
>>>>> I don't think the choice of a symbol is important, it is the syntactic
>>>>> mechanisms to combine streams which are important. I suppose we can
>>>>> take everybody agrees on the key elements for that (functional or
>>>>> sequential composition of filters --meaning outputs of the preceding
>>>>> filter feed into inputs of the following one-- parallel or non-
>>>>> sequential composition, rearrangement of streams via appropriate
>>>>> namings, and feedback or looping). I don't think we are yet reached
>>>>> the perfect way to express these, but we're close.
>>>> Maybe having both my ';' and your '*'. My ; is the last symbol in
>>>> precedence, yours is the first. Mine operates in chains with no unlinked
>>>> pads. Yours operates in chains with one or more.
>>> I think using () to override precedence is more natural than having 2
>>> identical operators but with different precedence.
>> I agree in general. But in this case, I see this operator as two
>> different things: '*' means parallel processing, ';' means "end of a
>> description block - beginning of an unrelated description block". Note
>> also that if we extends the comma to link an arbitrary number of streams
>> (including 0), it can replace the semi-colon (but I think it would make
>> it more obfuscated).
> how do you plan to do parallel processing of filter chains then?
> (scale,crop,brightness)*(contrast,rotate,flip)*(gray,scale,rotate,saturation) , picinpic*nop , picinpic
> scale*contract*gray , crop*rotate*scale , brightness*flip*rotate, nop*nop*saturation , picinpic*nop , picinpic
> I think its clear which is more readable ...
Yes. But this is about implementing parenthesis or not, not about the
semi-colon. Another example
(in1) --> split --> scale --> crop ----------> picinPic -->(out1)
\--> split --> vflip --> rotate --> picInpic--/
\-----> gray --> scale ------/
(in2) --> crop --> vflip --> (out2)
(in3) --> scale --> crop --> (out3)
(in1) split,nop*split, (scale,crop)*(vflip,rotate)*(gray,scale) ,
picinpic*nop , picinpic (out1);
(in2) crop, vflip (out2);
(in3) scale,crop (out3);
(split,nop*split, (scale,crop)*(vflip,rotate)*(gray,scale) ,
picinpic*nop , picinpic)*(crop,vflip)*(scale,crop)
This example could be worse, I was just too lazy to draw more
complicated graphs for the other inputs.
More information about the ffmpeg-devel