Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 21st April 2017, 20:09   #1  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,130
How to do these tasks

I still am not familiar with most plugins, and would like to know which plugin to look for to do the following tasks.

To divide all pixel values in half, is there a better way than
Code:
Levels(0, 1, 255, 0, 128, coring=false) ?
Currently, ConditionalFilter doesn't work with MT. Is there an alternative to this that will work with MT?
Code:
ConditionalFilter(EM, BlankClip(EM, color=color_white), Sc, "AverageLuma()", ">", string(SkipOver))
And finally, I've seen this around some lines of code which I never saw before. What does [* *] do? [** abc *] also seemed to be used as a comment.
Code:
[*.ColorYUV(cont_y=_f2c(2.0))  *]
Thanks
MysteryX is offline   Reply With Quote
Old 21st April 2017, 20:43   #2  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
>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
Old 21st April 2017, 21:10   #3  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,130
I think what happens is that MMask sets the Luma and leaves other planes with random data -- and the background dirt is what confused me.
MysteryX is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:11.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.