FredThompson
16th July 2003, 04:28
I'm looking at what you've created for Valentim Batista's Smart Smoother and trying to use it as a model for his Pops VirtualDub filter.
As an example:
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\shadowsmoother07.vdf", "_VD_ShadowSmoother")
return clip._VD_ShadowSmoother(default(threshold,4), default(strength,15), default(difference,2),
\ default(pixellock,false)?1:0, default(noiselock,false)?1:0, default(postsmooth,false)?1:0)
OK, there is no checkbox called "pixellock" in the configuration window for Shadow Smoother. There IS something labelled, "Pixel Locking." Would this mean the Pops setting for "Color Tolerance" could be called "colortolerance?"
Here's what I've coded but I'm not sure it's correct. Would you please look this over and let me know if it looks proper?
Here are the relevant lines from a VirtualDub vcf of the defaults:
VirtualDub.video.filters.Add("pops (0.1)");
VirtualDub.video.filters.instance[0].Config(12,64,192,12,48,1,4689095);
As a second question, is there a way to define the legal range for an int such that attempting to pass an invalid one will generate a script error?
(darn space filter is making this harder to read. :mad: )
###########################################
# Pops by Valentim Batista, v0.1 #
# threshold (0-20) d=8 #
# black level (0-128) d=64 #
# white level (0-128) d=192 #
# color tolerance (0-24) d=12 #
# maximum pop width (0-128) d=48 #
# stability window (frames) (5-8) d=7 #
# denoise (T/F) d=T #
# debug (T/F) d=F #
###########################################
function VD_Pops(clip clip, \
int "threshold", \
int "blacklevel", \
int "whitelevel", \
int "colortolerance", \
int "maximumpopwidth", \
int "stabilitywindow", \
bool "denoise", \
bool "debug" )
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\pops01.vdf", "_VD_Pops")
return clip._VD_Pops(default(threshold,8), \
default(blacklevel,64), \
default(whitelevel,192), \
default(colortolerance,12), \
default(maximumpopwidth,48), \
default(stabilitywindow,7), \
default(pixellock,true)?1:0, \
default(debug,false)?1:0)
}
# example:
# ConvertToRGB()
# VD_Pops()
# ConvertToYUY2()
As an example:
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\shadowsmoother07.vdf", "_VD_ShadowSmoother")
return clip._VD_ShadowSmoother(default(threshold,4), default(strength,15), default(difference,2),
\ default(pixellock,false)?1:0, default(noiselock,false)?1:0, default(postsmooth,false)?1:0)
OK, there is no checkbox called "pixellock" in the configuration window for Shadow Smoother. There IS something labelled, "Pixel Locking." Would this mean the Pops setting for "Color Tolerance" could be called "colortolerance?"
Here's what I've coded but I'm not sure it's correct. Would you please look this over and let me know if it looks proper?
Here are the relevant lines from a VirtualDub vcf of the defaults:
VirtualDub.video.filters.Add("pops (0.1)");
VirtualDub.video.filters.instance[0].Config(12,64,192,12,48,1,4689095);
As a second question, is there a way to define the legal range for an int such that attempting to pass an invalid one will generate a script error?
(darn space filter is making this harder to read. :mad: )
###########################################
# Pops by Valentim Batista, v0.1 #
# threshold (0-20) d=8 #
# black level (0-128) d=64 #
# white level (0-128) d=192 #
# color tolerance (0-24) d=12 #
# maximum pop width (0-128) d=48 #
# stability window (frames) (5-8) d=7 #
# denoise (T/F) d=T #
# debug (T/F) d=F #
###########################################
function VD_Pops(clip clip, \
int "threshold", \
int "blacklevel", \
int "whitelevel", \
int "colortolerance", \
int "maximumpopwidth", \
int "stabilitywindow", \
bool "denoise", \
bool "debug" )
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\pops01.vdf", "_VD_Pops")
return clip._VD_Pops(default(threshold,8), \
default(blacklevel,64), \
default(whitelevel,192), \
default(colortolerance,12), \
default(maximumpopwidth,48), \
default(stabilitywindow,7), \
default(pixellock,true)?1:0, \
default(debug,false)?1:0)
}
# example:
# ConvertToRGB()
# VD_Pops()
# ConvertToYUY2()