View Single Post
Old 21st April 2017, 20:43   #2  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
>To divide all pixel values in half...
I don't know if there's a difference between Levels, ColorYUV/RGBAdjust, or mt_lut("x 2 / "), except that Levels has optional dithering.

>Is there an alternative to this that will work with MT?
Don't know, sorry

>What does [* *] do?
It's like /* */ but multiple levels can be nested.
http://avisynth.nl/index.php/Grammar#Comments
Code:
/* this is a
    block comment
  [* this is
     a nested comment
     [* and another one *]
  *] 
*/
I commented out an experimental 2x contrast adjustment and forgot to delete it. BTW, here is _f2c:
Code:
#######################################
### scale "normal" float arguments to 
### ColorYUV's "gain_x", "gamma_x" & "cont_x" (AVS*)  
##
function _f2c(float f) {
    return Round((f - 1.0) * 256.0) 
}
...and that (AVS*) in the description is my cryptic code for it works with AVS and AVS+, including high bit depth (you don't have to scale "256.0" to the current bit depth - unlike Levels BTW)

Last edited by raffriff42; 21st April 2017 at 20:58.
raffriff42 is offline   Reply With Quote