pinterf / masktools

MaskTools v2 fork
Other
46 stars 11 forks source link

adding new dup and swap things #13

Closed realfinder closed 4 years ago

realfinder commented 4 years ago

Hi 1st is in infix/polish https://forum.doom9.org/showpost.php?p=1879768&postcount=328

2nd is new dupN and swapN as in avs+ expr() in both mt_lut* and infix/polish

thanks

pinterf commented 4 years ago

Not tested, please have a look at it: https://drive.google.com/file/d/1WGU7NH9KP6FzCN-jLIYhU_ZuRLZdEZ1O/view?usp=sharing

realfinder commented 4 years ago

I tried this Mt_lutxy(last, blur(1), "x y - abs dup dup 111 < swap2 2 ?") base on some VS code and it give same output as expr(last, blur(1), "x y - abs dup dup 111 < swap2 2 ?") so I think it work, didn't find code with dupN now (since vs guys post code in discord so its not something organized)

anyway, with MessageClip(mt_infix(" x range_half - dup dup y range_half - dup + / range_max ")) will be image and MessageClip(mt_infix("x y - dup 3 * x y + range_size - 2 ^ - range_half +")) will be image both from srestore I think it's not look good but better than nothing

pinterf commented 4 years ago

I am not able to implement infix (even a simple dup) without deeper modification, stack operations are not too friendly in this aspect.

pinterf commented 4 years ago

Did any further tests happen on dupN swapN?

realfinder commented 4 years ago

I did another simple test

Mt_lut("range_max range_half + range_min dup1 - -") expr("range_max range_half + range_min dup1 - -")

the output of Mt_lut not same as expr here, I think dupN not work or something

but this work

Mt_lut("range_min range_half + range_min dup1 + +") expr("range_min range_half + range_min dup1 + +")

edit: also this work Mt_lut("range_min range_half + range_half dup1 - +") expr("range_min range_half + range_half dup1 - +")

pinterf commented 4 years ago

Thanks, try this build https://drive.google.com/file/d/1cmlSOFCPRy5uCAXQCSjy6sIQn7v_i8QB/view?usp=sharing

realfinder commented 4 years ago

yes, that work for the first one, thanks