PDA

View Full Version : Donald Graft's Xsharp filter help with syntax please


markrb
15th March 2002, 01:44
I am trying to test Donald Graft's Xsharp filter on DVD material and I am able to get it to load into Avisynth through Vdub using vdfilters.avs as a basis for syntax. I can only get it to work with no values input into it. The moment I try to add a value avisynth says there is an error and it was expecting other input. I have not been able to find any in depth explanation of the syntax expected.
This is what I have successfully used so far:
function VD_Xsharpen(clip clip, int "strength", int "threshold")
{
LoadVirtualdubPlugin(VirtualDub_plugin_directory+"\xsharpen.vdf", "_VD_Xsharpen", 1)
return clip._VD_Xsharpen
}

If I try and add this line on the end it errors out

(default(strength,100), default(threshold,100),


I am new to avisynth files and syntax. I have tried to find as much as I can to read around, but I have not found much.

Thanks,
Mark

ARDA
15th March 2002, 02:00
If you wrote this:

(default(strength,100), default(threshold,100),

you should write this:

(default(strength,100), default(threshold,100))

I hope that can help you

Arda

Guest
15th March 2002, 02:11
function VD_Xsharpen(clip clip, int "threshold", int "strength")
{
LoadVirtualdubPlugin("d:\virtualdub\plugins\xsharpen.vdf", "_VD_Xsharpen")
return clip._VD_Xsharpen(default(threshold,255),default(strength,255))
}

AVISource("sampledivx.avi")
ConvertToRGB()
VD_Xsharpen(10,128)

markrb
15th March 2002, 02:11
You are my new hero. It worked perfect. Now on to figure out what settings to use. Fun, Fun.

Mark

Guest
15th March 2002, 02:15
No, not perfect!!!

The threshold parameter comes first. I know because I wrote the filter. :)

ARDA
15th March 2002, 02:25
@neuron2

Just two questions:

1 .If I read the values in virtualdub filters dialog the orden is

strength,threshold.Question: if you define in the script anohter order
is it the same?

2. According to you own advice in another thread about Dinamic Noise Reduction .Wouldn't it be better?

(threshold,strength)
without any default values?

Thanks Arda

pd:We were writing together still the second questions thanks

Guest
15th March 2002, 02:43
@ARDA

1. The best way to determine the required parameter order is to look at the source code. But many people are not equipped to decipher it. An alternative is to set distinctive parameters through the dialog box and then do "Save processing settings" and inspect the resulting VCF file. Best yet is to let someone who knows write the import function for you. :)

2. Yes, sir, you are correct! I didn't like defaults because it lets you invoke a filter without the parentheses, which can be a performance problem due to a quirk in Avisynth. Why did I give them this time? I guess the poster wanted to know the correct syntax. I still don't like defaults. To get rid of them, just use:

return clip._VD_Xsharpen(threshold,strength)

Wilbert
15th March 2002, 13:10
@neuron2

From time to time I see avs-syntax of VDub filters. Sometimes I save them. I would be nice if all those functions would be contained in a single file (just like the vdfilters.avs from LabDV) which is updated when necessary.

Guest
15th March 2002, 13:38
Sure it would be nice, but a lot of work, especially to track new filter versions from the many sources of filters! Wanna take it on? :)

Wilbert
15th March 2002, 15:47
I will give it a try.