|
|
![]() |
|
|
|
|
|
#1 | Link |
|
|
AVS Special Member
|
Using Avisynth LimitedSharpen pre-processing with ffdshow for DVD playback!
I was perusing the Avisynth forum and read a post about a LimitedSharpen script for Avisynth that produces superior sharpening. Here is a blurb from that thread from Didée the LimitedSharpen author:
Quote:
Last edited by Socio; 11-13-04 at 04:41 PM.. |
|
|
|
|
|
|
#2 | Link |
|
AVS Special Member
|
I found that using LimitedSharpen with Denoise3d and applying the Denoise prior to LimitedSharpen gives me the best results with between 53% &56% processor usage.
Here are some of my results so far what do you think?: Empire Strikes BackNormal ![]() Empire Strikes BackNormal with LimitedSharpen and Denoise3d ![]() Episode 1 Normal ![]() Episode 1 with LimitedSharpen and Denoise3d ![]() Normal LOTR ![]() LOTR with LimitedSharpen and Denoise3d ![]() Last edited by Socio; 11-13-04 at 04:37 PM.. |
|
|
|
|
|
#3 | Link |
|
AVS Special Member
|
Here is a another before and after :
Pirates of the Caribbean Normal ![]() Pirates of the Caribbean with limitedSharpen + denoise3dl ![]() Open Range Normal ![]() Open Range with limitedSharpen + denoise3dl ![]() Open Range with limitedSharpen + denoise3dl with modified hue & saturation tweak See 5 posts down for explanation. ![]() Last edited by Socio; 11-13-04 at 09:22 PM.. |
|
|
|
|
|
#6 | Link | |
|
AVS Special Member
|
Quote:
Assuming you already have ffdshow you will need to download Avisynth 2.55 and install it. Next you will ned to download the pluginWarpsharp and the Masktools 1.5.4 if you have AMD or other non P4 processor or the Masktools for P4 dll for P4 users and install both the Warpsharp and masktool dll files in avisynth's plugin folder. Now go to this thread go to Didée's second post and copy the script starting at "# LimitedSharpen()" Copy it to notepad then save it to your avisynth plugin folder and call it LimitedSharpen.avs and close notepad. Open your ffdshow config and click on avisynth, in the text box enter these two lines: Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpen.avs") LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40) Put a check in the avisynth box and you are set! Oh and enable denoise3d and adjust to taste for best results! NOTE: If you installed Avisynth some place other than C:\program files you will need to change the first line accordingly. You can change the ss_x and ss_y parameters up to 2.0 but it will slow it down to a crawl, the smode choices are 1, 2, or 3 and strength can be set from 0 to 100. The way it is now is what I use. NOTE: This works with the latest non-SSE SSE2 version of ffdshow it will give you a script error if you try it in the SSE-SSE2 versions. Last edited by Socio; 11-13-04 at 08:33 PM.. |
|
|
|
|
|
|
#7 | Link | |
|
AVS Special Member
|
Quote:
I have not tried it yet but you could probably adjust hue and saturation to compensate if it bothers you to much, I might experiment with that tomorrow if I have time. Last edited by Socio; 11-13-04 at 08:34 PM.. |
|
|
|
|
|
|
#8 | Link |
|
AVS Special Member
|
*Hue & Saturation tweak
As imf4 pointed out this uber sharping seems to wash out a bit of the color and the easiest way I could find to fix it was in ffdshow by enabling the "Picture Properties" and adjusting the Hue and Saturation to taste. Once fine tuned you should not need to adjust it again while using the Avisynth LimitedSharpening because it seems to remove the exact same amount of color no matter the source. I did a quick experiment I bumped the Saturation from 64 to 78 and the hue from O to 2 and got the sharpened Open Range pic (see a few posts up) pretty close to the color in the original Open Range normal pic. It's not perfect, I will have to adjust a little more but once done it should be set for everything. |
|
|
|
|
|
#9 | Link | |
|
AVS Special Member
|
Update!
No Hue-Saturation tweak needed! Re-Sizing in 100% doable! First, I found that the color fading was due to using VMR9 as renderer in Zoomplayer I switched to Overlay as renderer and get zero color fade with a pristine image. So unless you insist on VMR9 NO tweaking of the Hue & Saturation is needed. Second, Re-sizing is doable! I have found the best way to re-size while using this sharpening method is to do it from within Avisynth and keep as much of the image processing as you can in one procedure. Because this Limitedsharpen takes some processing power it is better to resize after it has processed the image. You can add either of these lines after the LimitedSharpen call and change the size according to your needs; BicubicResize(1280,720) LanczosResize(1280,720) Lanczos4Resize(1280,720) All do a nice job with Lanczos4 giving you the best quality but taking the most processing power. You can also try this resizing method during the sharpening process by including dest_x= and dest_y= in the LimitedSharpen call. For example here is 1280x720 resize: LimitedSharpen(ss_x=1.0,ss_y=1.0,dest_x=1280,dest_y=720,Smod e=3,strength=40) Another thing you can to save some processing power is to crop before the LimitSharpen call by entering this line crop(0,0,-0,-0,) or crop(0,0,-0,-0,true) The true parameter is supposed to make it a little faster I think? Here is what I am using now with Avisynth in ffdshow for trimming the black borders and resizing to 1280x720 and it looks awesome! Quote:
Last edited by Socio; 11-14-04 at 11:17 AM.. |
|
|
|
|
|
|
#11 | Link | |
|
AVS Special Member
|
Quote:
What are you trying to import? I have no such error and no such file in my Avisynth plugin folder. |
|
|
|
|
|
|
#15 | Link | |
|
AVS Special Member
|
First , all you need are the MaskTools.dll, warpsharp.dll, and the LimitedSharpen.avs, added to your plugin folder not the other stuff that came with the dll files you downloaded. They also have to be in the first folder not a sub folder.
What processor do you have P4? AMD? The Masktool dll will cause Zoomplayer to crash if you are using the wrong version. Also, using Avisynth in ffdshow you do not have to load plugins it will load them automatically for you. |
|
|
|
|
|
|
#16 | Link | |
|
AVS Special Member
|
Update #2
VMR9 fix Here is the fix for using VMR9 as your renderer and not having washed out color! Just download the ColorMatrix Avisynth plugin and install just the Colormatrix.dll in the Avisynth plugin folder then add this parameter to your setting in Avisynth in ffdshow "ColorMatrix()". This is what mine looks like now: Quote:
Normal ![]() Using above settings except resize with VMR9 renderer ![]() Last edited by Socio; 11-14-04 at 06:16 PM.. |
|
|
|
|
|
|
#18 | Link |
|
AVS Special Member
|
Try this Masktools.dll I have a P4 and it works for me. Just make sure you delete the old one in your plugin folder.
I only have 7 files in my Avisynth plugin folder they are and should be all you need: DirectShowSource.dll LimitedSharpen.avs TCPDeliver.dll warpsharp.dll ffavisynth.dll MaskTools-p4-5.dll ColorMatrix.dll If you have any thing besides those remove them to a backup folder or delete them. You don't want ffdshow to try to load any thing oddball that could make it crash. |
|
|
|
|
|
#19 | Link |
|
Senior Member
|
That did it. thanks. Now i just have to figure out what its doing. it looks better, but i dont know why. Its not harshing the edges like unsharp mask used to do, but its also improving something else. Like its smoother or something, less edginess. Hell i cant tell anything from freeze frames. Its like explaining how dvi looks better then component, freeze frames look the same but dvi runs alot smoother.
|
|
|
|
|
|
#20 | Link |
|
AVS Special Member
|
Awesome!
Love to see some pics! You are alo right, the pics are good but seeing it live it is even a hole lot lbetter! Remember to try Denoise3d with it but low settings or it will wash out some detail and see what you think. Mine is set to: L:0 C:0.78 T:3.98 with HQ enabled. You can also try these settings seems to be a bit more cleaner. LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=2,strength=60) |
|
|
|
|
|
#22 | Link |
|
AVS Special Member
|
You can try Tom Barry's UnDot Avisynth plugin. Just instal it in to your plugin folder and add the UnDot() parameter to start of your settings should look like this, make sure to include the period;
UnDot().LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40 ) This is very light so it should not slow you down at all! |
|
|
|
|
|
#23 | Link | |
|
Member
|
Quote:
I had the odd LimitedSharpen.avs copied to my avs plugin dir and the dlls and all the other junk that went with them. now I delete all junk,it works,but the cpu loaded 95% and i just use blurr and limitedsharpen,no resize! LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40) why?
__________________
chen |
|
|
|
|
|
|
#24 | Link |
|
AVS Special Member
|
Not sure,
Try not using the blur and use the Undot plugin in above post it takes much less procesing power, or just try it with out either and see what is does. Make sure you are using nothing in ffdshow but avisynth and double check your settings, if ss_x=1.0,ss_y=1.0 are set to anything above 1.0 it will slow you down to a crawl. What processor are you using? One other thing to try, set your ffdshow blur before Avisynth in ffdshow. One thing I noticed on my setup was if I did any thing other than re-size after LimitedSharpen it would slow me down big time. Besides that doing any denoise after the sharpen would just degrade the sharpening anyway. Last edited by Socio; 11-14-04 at 09:47 PM.. |
|
|
|
|
|
#25 | Link |
|
Member
|
Very cool...
This really is an excellent sharpening technique.
Very happy with the results I'm getting here. I've been playing with the settings so see how this all works. So far my favorite results have been using this combo:TT2 w/ NV 4 codecs NVPP (Film mode) FFDSHOW (July 9th SSE AndyIEG version): 1) AVISYNTH: Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpen.avs") crop(0,0,-0,-0,true) LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40) 2) Resize: 1280x720 Lanczos4 w/ .6 chroma For some reason doing the resize afterward in FFDshow is faster for me then in AVISYNTH. I'm am using this with the July 9th *SSE2 optimized* version of FFDshow from Andy. So maybe his optimizations are just that much better for the resize. The filter does take some serious CPU power though. I would love to let it have at a 1280x720 input but that seems quite out of reach at this point w/ my 3.52 (OC'd) P4. Still messing with everything though. THANKS for the find... -James Last edited by jpooton; 11-14-04 at 10:16 PM.. |
|
|
|
|
|
#26 | Link | |
|
AVS Special Member
|
Re: Very cool...
Quote:
I am running a P4 3.06 and can do 1280x720 nicely I am also using the latest reclock and it sems to help. I will post some re-size pics in a while I am still fine tuning my settings. Glad you like it, It does need some processing power but the results live are remarkable. |
|
|
|
|
|
|
#27 | Link | |||
|
Member
|
Re: Re: Very cool...
Quote:
Quote:
Reclock I haven't tried at this point. Things are smooth for me, just a somewhat heavy cpu load. It's there to be used though. ![]() Quote:
|
|||
|
|
|
|
|
#28 | Link | |
|
Member
|
Quote:
avisynth,cpu still loaded 75%. ffdshow version 20041012 non sse.dscaler 5 decoder in zplayer,colourspace yv12.
__________________
chen |
|
|
|
|
|
|
#29 | Link |
|
Member
|
I just get
Evaluate: Unrecognized exception! (ffdshow_filter_avisynth_scipt. line 1) What does this mean? I tried everything, followed the instructions carefully, toggled Hyperthreading, made sure I had the P4 dll, etc. but no matter what I do I get this message. Can somebody help? Thanks, Martin. |
|
|
|
|
|
#30 | Link | |
|
AVS Special Member
|
Quote:
I am not completely familiar with all the AMD processors but if yours is has SSE you can try the July 9th version of ffdshow with SSE/SSE2 and see if that improves performance and as jpooton pointed out it no Avisynth script errors with this one. What version of Masktools plugin are you using? |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|