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.
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.