View Single Post
Old 21st November 2012, 23:15   #19  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
As a side thought: To facilitate bug finding, the function could throw an error if the expression does not end with 1 entry on the stack, and dump the stack. What do you think about this?
What I think is that it already does this

Code:
compiler error - check your string (x) # where x is how many values are left on the stack

Code:
x 128 - 0 < 0 x 128 - ?
In my RPN machine, this can be written:

Code:
x 128 - 0 min
as you know, but with user variables it could possibly be written:

Code:
x 128 - q= 0 < 0 q ?
The "q=" would have to be a pseudo-operator, since it doesn't really work like RPN should (and it has no effect on the stack - a stack reset operator could also be useful), but it would be useful.

Quote:
You allow an implicit cropping with the parameters w and h
True, but that's for speed reasons. No sense doing all those heavy calculations only to crop them away.

Quote:
Imagine the cool color gradients possible with just xyremapping a BlankClip, even x="x", y="y" and using the variables x,y in the brightness RPN expression (shiver).
I don't see any sensible interpretation for the rgba values except when using x="x" and y="y" - in which case it may as well be a separate filter (maybe in the same DLL, but a separate keyword - rgbaremap). Plus, I already used the variables a and b

Warping an image in two dimensions is hard enough - warping it in 6 is crazy!

David

PS x="x" and y="y" are the defaults for those expressions, so don't need to be specified.

Last edited by wonkey_monkey; 21st November 2012 at 23:36.
wonkey_monkey is offline   Reply With Quote