[FFmpeg-devel] [PATCH] [2/??] [3/3] Filter graphs - Parser for a graph description
Michael Niedermayer
michaelni
Thu Mar 20 15:54:28 CET 2008
On Thu, Mar 20, 2008 at 11:32:33AM +0000, vmrsss wrote:
> Hi Michael,
>
> Thanks for this email, it really helps!
>
> > You do NOT solve anything by ommiting names, its just that you then
> > have no names.
>
> I suspect we might be talking across purposes, which makes us miss
> each other's point, and in fact we might both partly right (and both
> partly wrong). I understand from you code below:
>
> > a system with names:
> >
> > (main, left, right, bot)my_overlay=
> > "(main, left)picinpic,
> > (right)picinpic,
> > (bot)picinpic"
> >
> > use of it is the same either way:
> > movie= main.avi
> > *movie= left.avi
> > *movie= right.avi
> > *movie=bottom.avi , my_overlay
>
>
> that you are now using a positional binding for parameters (viz the
> name of the parameter is irrelevant for invocation, only relevant
> inside the body). This is much better, not so far from what I meant, I
> have much fewer problems with it, and like its style: very readable.
>
> Now, question: will you allow forms like this?
>
> (main,second)my_overlay =
> (main,main)picinpic;
> (main) picinpic
>
> If the answer is no, then this is just a convenient way to use
> numbered inputs and swaps, and I have no problems with it, good idea,
> I am all for it! (Advantage: more readable; disadvantage: the parser
> has to check the unique occurrence of each parameter in the body.)
>
> If the answer is yes, then we need to ask whether this is good style,
> as it leaves a number of copy/split/kill operations implicit, but I
> agree it looks very natural and readable. More importantly, we need to
> ask: what happens in the following?
I would have awnsered no
But this is largely a high level (clean simple syntax) vs. low level (do what
i say syntax) question.
>
> my_overlay * my_overlay
>
> Has this got two input streams (1 copied 6 times, 1 dropped), or four
> input streams (1st and 3rd copied 3 times each, the 2nd and 4th
> dropped)? If parameters can be used more than once in the filter body,
> then both answers are natural.
>
> The point is that both forms should be allowed (with different syntax
> clearly), and my opinion is that if we answer "no" to the first
> question above (and therefore "four" the the second one), the we are
> close to a winner.
>
> Regards to all,
> -vmrsss
>
> PS. Michael, would you please stop pinning me down to the nop*swap
> thing? This misrepresents my proposal, as I I have already explained
> twice that those are the elementary filters under the bonnet, the same
> as MOVs and JMPs in an assembly language, and I was not advocating
> their direct use for end users: I thought we agreed a form
> swap=1:2:3... was superior both in readability and to simplify the
> parser.
The issue is just that without swap * nop your proposal is very similar
to mine. The remaining difference being !() vs. (tmp1)filter(tmp2) stuff
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- 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/20080320/b561377b/attachment.pgp>
More information about the ffmpeg-devel
mailing list