View Full Version : VirtualdubMod's Levels filter
nicksteel
12th July 2012, 02:31
Is there an Avisynth equivalent to VirtualdubMod's Levels filter?
StainlessS
12th July 2012, 03:58
Closest is the Levels filter. (based on Vdub version)
http://avisynth.org/mediawiki/Levels
nicksteel
12th July 2012, 04:26
Thanks.
I interphet this as:
Levels(0, .83333, 255, 0, 255)
StainlessS
12th July 2012, 06:46
Thanks.
I interphet this as:
Levels(0, .83333, 255, 0, 255)
Yes, looks correct to me.
EDIT: Not sure if chroma is handled identically between VDUB and Avisynth versions when gamma <> 1.0.
EDIT: Also, assume you are using on a YUV format ie YUY2 or YV12, to match the
"operate in luma instead of RGB".
ConvertToYUY2() or ConvertToYV12(), beforehand.
TheSkiller
12th July 2012, 15:37
I think ticking the "Operate in luma instead of RGB" checkbox makes VDub leave the choma alone (well, basically, as that's mathematically not possibe in case of RGB video).
So you would need something like this to mimic it in AviSynth:
MergeLuma(Last, Levels(0,0.83,255, 0,255)) #does not touch chroma
poisondeathray
12th July 2012, 15:52
I think Didee's YLevels processes luma only as well
http://avisynth.org/mediawiki/Ylevels
StainlessS
12th July 2012, 17:57
Also, ColorYUV(Gamma_Y= -43) is equiv to gamma 0.83203125
without touching chroma.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.