Thread: mt_lutxy
View Single Post
Old 12th May 2012, 10:55   #5  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by lisztfr9 View Post
this is not RPN :

(o,g,"x x y - abs "+string(z)+"

The first "x" must belong to the syntax of the function, but seems also be a part of an RPN expression.

But for being RPN, it would need 2 operators behind, where there is only 1.

Also, there are 2 levels of quotes, around variables and around expressions ! The "abs" statement, applies to a parameter inside quotes, which usually enclose strings variables.
The added source of confusion here is that the expression string is being constructed dynamically by string concatenation. This is necessary because it needs to include the literal value of 'z' which is a script variable, so the string() function is used. Similarly for the other variables in the original expression.

You cannot in general make sense of a fragment of RPN without considering the whole string. The operator that goes with a particular operand may be much further on in the string.

Quote:
And finally, x y usually refer to coordinated along X and Y axis in a plan...
They have that interpretation in mt_lutspa, but forget that here - in mt_lutxy, they refer to the pixels from the two clips.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote