pinterf / masktools

MaskTools v2 fork
Other
46 stars 11 forks source link

need scale inputs for int's too #1

Closed realfinder closed 6 years ago

realfinder commented 7 years ago

hi

we need new parameter scale_inputs="int" or "float" or "both" (default) or "none"

and keep only clamp_f out of another clamp_f_XX (to keep it clean)

more info https://forum.doom9.org/showthread.php?t=174752

realfinder commented 6 years ago

or maybe scale_inputs="int" or "float" or "both" (default if there are no scale operators in expr) or "none" (default if there are scale operators in expr)

pinterf commented 6 years ago

I have ported Vapoursynth Expr into Avisynth+ core, then added i8 i10 .. f32 similar to masktools syntax. But did not add these clamp_xxx things, they are not nice at all, you are right, its usage has to be cleaned up.

realfinder commented 6 years ago

I have some idea, what about make masktools2 use Expr if available in mt_lut? this way we will not need to add another lines code in existing scripts

and Expr will not be full replace of all mt_lut**'s things right? since there are some 2D (mt_luts) and other things

pinterf commented 6 years ago

Expr is a bit different (aside from the fact that it is 32 bit float internally instead of 64 bit double), there are some rarely used shift operators that are not supported. But in general Expr can replace mt_lutx, xy, xyz, xyza. Note, that perhaps at 8 bits mt_lutx...xzy are still faster (expression complexity dependant?) but it has to be tested.

Scaling inputs automatically is a hack. It should be handled on the application side. Let's check that problematic formula in your provided link and see why it is too specific, and why does it fails for data in the 0..1 range.

realfinder commented 6 years ago

what about make it use Expr in same situations that need realtime now?

even if it a hack, it's better than edit hundreds of scripts just for high bit, and you already did something similar in paramscale, and if someone edit them then he can use scale operators to make them clean and fast

realfinder commented 6 years ago

or maybe added useexpr parameter, and make it auto by default

realfinder commented 6 years ago

last discussion https://forum.doom9.org/showthread.php?p=1824513#post1824513

pinterf commented 6 years ago

Ready in 2.2.16