[FFmpeg-devel] [PATCH] [2/??] [3/3] Filter graphs - Parser for a graph description
vmrsss
vmrsss
Thu Mar 20 12:43:36 CET 2008
Hi Michael,
On 19 Mar 2008, at 17:23, Michael Niedermayer wrote:
> and here is yet another alternative syntax:
>
> my_overlay(main, left, right, bot){
> ret= picinpic(main, left)
> ret= picinpic(ret, right)
> picinpic(ret, bot)
> }
>
> my_overlay(movie:main.avi,
> movie:left.avi,
> movie:right.avi,
> movie:bottom.avi)
yes, if you go for the form in your previous email, that is:
> (main, left, right, bot)my_overlay=
> "(main, left)picinpic,
> (right)picinpic,
> (bot)picinpic"
then you need to name intermediate results, otherwise you won't be
able to rearrange outputs as might be required by the filter at hand.
This the same as a functional programming form:
my_overlay(main, left, right, bot) =
let ret= picinpic(main, left) in
let ret= picinpic(ret, right)
in picinpic(ret, bot)
which is very elegant and meaningful. Natural enough for end-users to
grasp it and like it? I'd tend to say yes...
> Thus we have the following syntax classes
>
> 1. Chain based
>
> swap, !(nop*picInPic , swap , picInPic , denoise)
> or
> (tmp)picInPic , (in2)picInPic , denoise(tmp)
>
>
> 2. infix/prefix based
>
> T= denoise ((in1 picInPic T) picInPic in2)
>
>
> 3. function based
>
> T= denoise( picInPic( picInPic(in1,T), in2) )
>
> This also nicely shows how "clear and readable" the nop*swap chain
> is ...
I think the chain-based ---regardless of the specific syntax used---
is a superior model for this kind of dataflow computation.
Regards,
-vmrsss
More information about the ffmpeg-devel
mailing list