PDA

View Full Version : Proof of Concept Filter and a Couple Questions


tritical
24th October 2004, 12:02
Alright, well I've been jumping around between a couple projects and thought I'd take a stab at an idea for a filter with a gui with real time preview (mainly just seeing if I could get one working). Meaning you see the changes immediately as you change the filter parameters in the gui instead of having to advance a frame in vdub. Pretty much like previews for vdub filter configs. After quite a bit of trial and error here it is:

TUnsharp v0.9.3 (http://bengal.missouri.edu/~kes25c/TUnsharpv093.zip)

It currently supports YV12 and YUY2 colorspaces. To enable the gui use gui=true when calling the filter. The gui is pretty much like the other avisynth filter gui's, but also has a preview button that will pop up a new window that loads the current (last processed) frame. You can then change the filter parameters in the gui and the changes will show up immediately on the frame in the preview window.

The main problems and limitations are:

1.) The preview window is limited to the last processed frame. Meaning there is no frame advance in the preview window so you must change the frame in the vdub window to change the frame in the preview window.

2.) Only one instance of TUnsharp can exist with a gui... you can have multiple instances of the filter in a script but only one can have a gui. This isn't really a big deal in my opinion (how many instances of a gui for one filter do you really need? :D).

3.) YUY2 display on the preview window seems to screw up on colors. The problem is most visible around sharp color transitions in areas of high saturation (bright reds, etc...). I'm not super fimilar with the DrawDib stuff so if anyone knows how to fix this or what is causing it please share :D. YV12 seems to be fine...

Now, I'm not sure the actual filter is all that useful. It's just a basic unsharpmasking filter that implements a few different operators and some basic sharpen limiting ideas from Didee's LimitedSharpen() script. It was really more a proof of concept to see if the preview stuff could be done and if it would be any good. Hopefully someone else might find it useful or expand on it for another project sometime.

EDIT: (May 01, 2005)
Finally got around to fixing all the gui related bugs in TUnsharp, there were thread sync and thread termination problems. Everything should work fine now, and I also added the method of sharpening from XSharpen as another option.

EDIT: (May 24, 2005)
Fixed a few more bugs.

Mug Funky
24th October 2004, 15:58
the release version crashes VDM on opening. no surprise from what i understand.

the debug version works pretty well. the realtime preview does it's job, and the filter sharpens things up for sure (needs supersampling, i think :))

keep it up. there's a lot of filters out there that could use GUIs.

tritical
31st October 2004, 05:53
It would definitely benefit from super-sampling and a few other things, though atm I don't think it would really be worth it to add it. I wasn't tired off messing with the gui stuff yet though, and needed the win32 programming experience so I decided to make yet another gui based filter.. this one is probably a little more useful. It is a take off on AVSMon and is basically a monitor type filter. It allows previewing of the video at the point where the filter is inserted in the script, it has an extended info dialog you can pop up that will display pretty much all the relevant information about the clip, and it allows for adjusting the audio delay through the gui. The other main thing is unlike TUnsharp and AVSMon it supports multiple instances (as many as you want) per script. So anyways, here it is (plus a sample screen shot with only one instance open):

TMonitor v0.9.3 (bengal.missouri.edu/~kes25c/TMonitorv093.zip)

I think it could or would be useful for a couple of applications. It supports all colorspaces. Now, I think it's time to get back to TDeint and TFM :D.

EDIT: (May 02, 2005)
Fixed a few thread sync/exit issues that would sometimes cause random crashes when multiple instances of TMonitor were used in a script. Also fixed a few resource leak bugs.

EDIT: (May 24, 2005)
Fixed 2 remaining thread sync/exit issues... should always exit correctly now.

Mug Funky
1st November 2004, 12:51
nice :)

hmm... a filter GUI would be good for manual tweaks, especially with IVTC patterns. of course, if the automatic matching is clever enough there'll be no need for a GUI.