View Full Version : LSFmod [v1.9 - Update 2009/10/05]
Manaka
17th April 2009, 19:37
I can't use LFSmod, AvsP report that "there is no function named repair". Help me guys!
Keiyakusha
17th April 2009, 19:50
Manaka
### +--------------+
### | DEPENDENCIES |
### +--------------+
###
### -> Masktools (v2a35)
### -> Removegrain (v1.0pre)
### -> Warpsharp (2003.11.03) [for Smode=1]
### -> Variableblur (v0.30) [for Smode=2]
BigDid
17th April 2009, 20:02
I can't use LFSmod, AvsP report that "there is no function named repair". Help me guys!
Hi and welcome to the forum,
Repair is part of removegrain package.
As indicated by previous poster (from 1st post 1st page this thread) you need the "Removegrain (v1.0pre)"
If you have difficulty finding it you may (not sure) get it from a link for animeivtc:
http://forum.doom9.org/showthread.php?p=1144440#post1144440
Did
Hi LaTo, i have a question.
Until ver. 1.5 the default value for SdmpHi was 24, the same as the original SeeSaw function and according to Didée the useful range is 15-30.
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
From ver 1.6 the default value for SdmpHi is 128.
Why such a big change?
Thanks again for your excellent work.
LaTo
12th June 2009, 18:18
v1.8:
changed preblur to allow more tweaking (bool->string)
tweaked settings
cleaned the code
updated documentation
Nikos> I don't know, just a mistake... it's corrected ;)
Gengero
8th July 2009, 17:22
THX LaTo for your last update, n' THX for your help today :p
travolter
21st July 2009, 01:04
congrats pal!! its an amazing script!!!
I cannt live without it and also without framerate doubling
These 2 are the perfect combo for HD videos ;)
currently I use this one for realtime processing:
LSFmod(defaults="old",ss_x=1.0,ss_y=1.0,secure=true,strength=40)
PLz can you give me a settings example for do Deringing into your scrpit? I hate the stupid halo in some videos
LaTo
21st July 2009, 07:14
PLz can you give me a settings example for do Deringing into your scrpit? I hate the stupid halo in some videos
Ringing and haloing aren't the same!
LSFmod has a function to AVOID these stuff when sharpening, but it can't kill them if they are already in the source before processing.
If you want to avoid ringing:
LSFmod(preblur="ON") or LSFmod(preblur="MinBlur()")
But you can set what you want in this script, for example if you want to prevent halo sharpening:
LSFmod(preblur="dehalo_alpha()")
If you doesn't want to sharp the noise in a video:
LSFmod(preblur="dfttest()")
[...]
They are just examples, try and look by yourself...
If someone find a good and useful *combo* for preblur, please post it here!
travolter
21st July 2009, 12:42
Ringing and haloing aren't the same!
LSFmod has a function to AVOID these stuff when sharpening, but it can't kill them if they are already in the source before processing.
oh thanks pal! I understand much better how LSFmod works.
I need to find a deringing filter to apply before LSFmod.. cause I notice that many videos can increase in quality just removing ringing effect.
ANyone know/use some deringing script that consume few CPU to apply in real time?
Thanks for the settings that you posted.. Ill do experiments with them.
EDIT.-
These settings (preblur="ON") (preblur="dehalo_alpha()") are very cpu hungry for realtime.. anyway I dont notice so much difference when using low quality videos (things from youtube)
About BLUR and remove ringing... currently I use the Gaussian Blur sliders thats appear into FFDshow resize tab (remember that Im using FFDshow and avisynth scripts for live playing... no encoding) the problem is that they apply Blur to all the image so I lose definition.. and if I sharp later with LFSmod.. the result is not so good that without Blur
LaTo
21st July 2009, 13:12
About BLUR and remove ringing... currently I use the Gaussian Blur sliders thats appear into FFDshow resize tab (remember that Im using FFDshow and avisynth scripts for live playing... no encoding) the problem is that they apply Blur to all the image so I lose definition.. and if I sharp later with LFSmod.. the result is not so good that without Blur
You should look at MCTemporalDenoisePP(edgeclean=true) or HQDering()
travolter
21st July 2009, 14:24
MCTemporalDenoisePP(edgeclean=true) or HQDering() are powerful scripts.. but they are not fast enough to work in realtime (neither with MT)
some less CPU hungry scripts are needed or.. wait some years for much better CPUs ;)
rkalwaitis
22nd July 2009, 08:13
Nice to know about the ringing and halos Lato.
Adub
23rd July 2009, 21:25
Actually, I've gotten HQDering() to work in realtime before. What kind of machine are you running?
D'zzy
1st August 2009, 16:44
### +--------------+
### | DEPENDENCIES |
### +--------------+
###
### -> Masktools (v2a35)
### -> Removegrain (v1.0pre)
### -> Warpsharp (2003.11.03) [for Smode=1]
### -> Variableblur (v0.30) [for Smode=2]
LSF is already very impressive to me, LSFmod (seen from LaTo's samples), for my personal taste, looks even better!
Thanks very much LaTo, I'm gonna try this nice script! Just in case, my question here:
Are Masktools-v2a36 and Variableblur-v0.4 OK ? Or the versions are strictly required?
Also, If I never use Smode=1 or 2, I don't have to load Warpsharp or Variableblur, right?
LaTo
1st August 2009, 16:49
Are Masktools-v2a36 and Variableblur-v0.4 OK ? Or the versions are strictly required?
It should be OK ;)
D'zzy
1st August 2009, 16:53
It should be OK ;)
Nice!
Also, Another newbie question:
If I never use Smode=1 or 2, I don't have to load Warpsharp or Variableblur, right?
LaTo
2nd August 2009, 18:28
Nice!
Also, Another newbie question:
If I never use Smode=1 or 2, I don't have to load Warpsharp or Variableblur, right?
right!
colargol7
9th August 2009, 19:20
Hi
Thanks for the mod, LaTo :)
As you are french, you may help me with french DVB-T HD.
What parameters would you advise if I want to resize a 1080i TV show into 720p with x264?
LSFmod(ss_x=1.0, ss_y=1.0, dest_x=1280, dest_y=720, Smode=3, strength=60)I tried with that but I'm not sure it's the best choice. It's really hard to make conclusions.
Should I use higher "strength" param?
I never used sharpen before :confused:
Thanks
LaTo
9th August 2009, 20:35
Hi
Thanks for the mod, LaTo :)
As you are french, you may help me with french DVB-T HD.
What parameters would you advise if I want to resize a 1080i TV show into 720p with x264?
LSFmod(ss_x=1.0, ss_y=1.0, dest_x=1280, dest_y=720, Smode=3, strength=60)I tried with that but I'm not sure it's the best choice. It's really hard to make conclusions.
Should I use higher "strength" param?
I never used sharpen before :confused:
Thanks
ss_x=1.0 & ss_y=1.0 aren't good for aliasing... Don't change this unless you want realtime.
Smode=3 or Smode=5 is a taste's choice, test and pick the best for you.
The same for strength.
If it is slow, try defaults="fast".
colargol7
9th August 2009, 20:56
Ok thanks you very much! ;-)
I'll try Smode=5...
actarusfleed
9th August 2009, 23:28
Hi to all,
I'm a new HTPC entusiast.
I want to try this sharpener but i do not find any Installation guide with the links of the files to download.
Can you help me please?
thank you,
Francesco.
leon1789
4th October 2009, 16:25
Source (http://latoninf.free.fr/d9/LM/SRC.png)
LimitedSharpenFaster(strength=300) (http://latoninf.free.fr/d9/LM/LSF.png)
LSFmod(defaults="slow",strength=300) (http://latoninf.free.fr/d9/LM/SLOW.png)
LSFmod(defaults="fast",strength=300) (http://latoninf.free.fr/d9/LM/FAST.png)
It's not a revolution, but LSFmod is better than LSF for me...
I try it with SoftSharpen(preset="film",sharp=38,AA=30,dering=0,deban=1.2) : http://img121.imageshack.us/img121/1816/frame3ss.th.png (http://img121.imageshack.us/i/frame3ss.png/)
I try it with SoftSharpen(preset="film",sharp=38,AA=30,dering=0) : http://img200.imageshack.us/img200/9898/frame3ssdeban.th.png (http://img200.imageshack.us/i/frame3ssdeban.png/)
LSFmod(source=mt_adddiff(last,mt_makediff(last,last.removegrain(17,-1),U=1,V=1),U=1,V=1)
\ ,Smethod=1,soothe=false,Lmode=0,soft=0)
Source (http://latoninf.free.fr/d9/LM/orig.png)
Code above (http://latoninf.free.fr/d9/LM/shrp.png)
:)
An other attempt with SoftSharpen(sharp=26,AA=17,derin=0,denois=0) : http://img504.imageshack.us/img504/1755/origss.th.png (http://img504.imageshack.us/i/origss.png/)
Please, what do you think about these two screenshots ? (for instance compressibility, ringing, aliasing, halos... details on the roof of the house :()
LaTo
4th October 2009, 16:35
SoftSharpen destroy too much the picture :eek:
Sorry but, I think that it's very ugly!
Maybe bad settings... Maybe not :p
And compressibility isn't much better:
Screenshot 1 : 790kb vs 622kb (-21%)
Screenshot 2 : 3092kb vs 2606kb (-16%)
:)
McCauley
4th October 2009, 17:56
Hi LaTo,
i asked before, but since Softsharpen was mentioned in this thread i'll ask again: :)
Softsharpen features Sharpening only for the static parts, it would be nice to see this integrated in LSFmod too.
Any chance for that?
Regards
McCauley
LaTo
4th October 2009, 18:19
Hi LaTo,
i asked before, but since Softsharpen was mentioned in this thread i'll ask again: :)
Softsharpen features Sharpening only for the static parts, it would be nice to see this integrated in LSFmod too.
Any chance for that?
Regards
McCauley
Arf, adapt=true in MCTD...
I think that using MVTools to build only a motion mask is a bit "too much" :rolleyes:
But a little workaround:
LSFmod(keep=10,edgemode=1)
keep=10, less sharpening in motion area
edgemode=1, less sharpening in flat area
;)
If you really want your stuff, it's easy :
source = last
sharpened = source.LSFmod(strength=200,soothe=false)
denoised = source.FFT3Dfilter(sigma=2,plane=0,bt=1)
super = source.MSuper(chroma=false)
back = super.MAnalyse(isb=true, delta=1,chroma=false)
forward = super.MAnalyse(isb=false,delta=1,chroma=false)
mask_b = source.MMask(back)
mask_f = source.MMask(forward)
mask = mt_lutxy(mask_b,mask_f,"x y +",U=1,V=1)
mt_merge(sharpened,denoised,mask,U=2,V=2)
# OR if you don't want to denoise:
# mt_merge(sharpened,source,mask,U=2,V=2)
It works well! :)
edit: Updated the code
leon1789
5th October 2009, 06:55
SoftSharpen destroy too much the picture :eek:
Sorry but, I think that it's very ugly!
Maybe bad settings... Maybe not :p
And compressibility isn't much better:
Screenshot 1 : 790kb vs 622kb (-21%)
Screenshot 2 : 3092kb vs 2606kb (-16%)
:)
...so I change the setting (with quite smaller constants for the second frame) and the result in post #122... :)
LaTo
5th October 2009, 11:28
v1.9:
- tweaked settings
- default preset is now defaults="fast" /!\
...so I change the setting (with quite smaller constants for the second frame) and the result in post #122... :)
Ok, so I have updated these screenshots with LSFmod v1.9:
Source [685kb] (http://latoninf.free.fr/d9/LM/compare/3src.png)
LimitedSharpenFaster(strength=200) [820kb] (http://latoninf.free.fr/d9/LM/compare/3lsf.png)
LSFmod(defaults="slow",strength=200) [721kb] (http://latoninf.free.fr/d9/LM/compare/3slow.png)
LSFmod(defaults="fast",strength=200) [720kb] (http://latoninf.free.fr/d9/LM/compare/3fast.png)
Screenshot1: SoftSharpen() 616kb - LSFmod() 720kb = -14%
Screenshot2: SoftSharpen() 2842kb - LSFmod() 3092kb = -8%
Around 10% gain, but I really doesn't like the result of SoftSharpen...
MatLz
5th October 2009, 12:21
(Concurrence?)
It's not a race guys!
;)
MadRat
5th October 2009, 14:30
So to mod LFSmod back to having the default set to "slow" like it used to be change the line
defaults = default(defaults,"fast")
to
defaults = default(defaults,"slow")
Is that correct?
MatLz
5th October 2009, 14:51
@MadRat
I think that's correct.
LaTo
5th October 2009, 15:44
So to mod LFSmod back to having the default set to "slow" like it used to be change the line
defaults = default(defaults,"fast")
to
defaults = default(defaults,"slow")
Is that correct?
Yes :)
Speed comparaison:
LimitedSharpenFaster() = 17.4 fps
LSFmod(defaults="fast") = 16.8 fps
LSFmod(defaults="slow") = 7.6 fps
Some screenshots:
1. Source [583kb] (http://latoninf.free.fr/d9/LM/compare/1src.png)
1. LimitedSharpenFaster(strength=200) [713kb] (http://latoninf.free.fr/d9/LM/compare/1lsf.png)
1. LSFmod(defaults="slow",strength=200) [622kb] (http://latoninf.free.fr/d9/LM/compare/1slow.png)
1. LSFmod(defaults="fast",strength=200) [616kb] (http://latoninf.free.fr/d9/LM/compare/1fast.png)
2. Source [838kb] (http://latoninf.free.fr/d9/LM/compare/2src.png)
2. LimitedSharpenFaster(strength=200) [1010kb] (http://latoninf.free.fr/d9/LM/compare/2lsf.png)
2. LSFmod(defaults="slow",strength=200) [909kb] (http://latoninf.free.fr/d9/LM/compare/2slow.png)
2. LSFmod(defaults="fast",strength=200) [904kb] (http://latoninf.free.fr/d9/LM/compare/2fast.png)
3. Source [685kb] (http://latoninf.free.fr/d9/LM/compare/3src.png)
3. LimitedSharpenFaster(strength=200) [820kb] (http://latoninf.free.fr/d9/LM/compare/3lsf.png)
3. LSFmod(defaults="slow",strength=200) [721kb] (http://latoninf.free.fr/d9/LM/compare/3slow.png)
3. LSFmod(defaults="fast",strength=200) [720kb] (http://latoninf.free.fr/d9/LM/compare/3fast.png)
4. Source [448kb] (http://latoninf.free.fr/d9/LM/compare/4src.png)
4. LimitedSharpenFaster(strength=200) [555kb] (http://latoninf.free.fr/d9/LM/compare/4lsf.png)
4. LSFmod(defaults="slow",strength=200) [482kb] (http://latoninf.free.fr/d9/LM/compare/4slow.png)
4. LSFmod(defaults="fast",strength=200) [475kb] (http://latoninf.free.fr/d9/LM/compare/4fast.png)
:devil:
Keiyakusha
16th October 2009, 20:24
Hi. Is there any benefits in using first line instead of second?
1: LSFmod(defaults="slow",edgemode=1,dest_x=768,dest_y=432)
2: Spline36resize(768,432).LSFmod(defaults="slow",edgemode=1)
canuckerfan
16th October 2009, 20:49
Hi. Is there any benefits in using first line instead of second?
1: LSFmod(defaults="slow",edgemode=1,dest_x=768,dest_y=432)
2: Spline36resize(768,432).LSFmod(defaults="slow",edgemode=1)
I believe the first line sharpens then resizes all from LSFmod. The second line Resizes externally and then sharpens. So the calls are reversed.
However, in terms of speed the first line will be faster. LSFmod already resizes, thus saving you a step in your filter chain if your resize internally from LSFmod. Someone correct me if I'm wrong.
LaTo
17th October 2009, 09:49
However, in terms of speed the first line will be faster. LSFmod already resizes, thus saving you a step in your filter chain if your resize internally from LSFmod. Someone correct me if I'm wrong.
Yes but, LSFmod works on a higher resolution in the first line... So, it will be slower...
Simply:
Spline36resize(768,432).LSFmod(defaults="slow",edgemode=1)
is faster than:
LSFmod(defaults="slow",edgemode=1,dest_x=768,dest_y=432)
is faster than:
LSFmod(defaults="slow",edgemode=1).Spline36resize(768,432)
You need to test the speed, it depends on your source's resolution ;)
travolter
19th October 2009, 12:11
hi!
I use
-----------------------------------
a= last
b=a.Spresso()
SeeSaw(a,b)
LimitedSharpenFaster(strength=11)
LimitedSharpenFaster(strength=11)
-----------------------------------
and gives nice sharpenning.
My cpu cannt handle 1080 movies with these scripts realtime
So I need to resize before but all the resizers (ffdshow, avisynth (spline ones) kill much details of image.
Exist any resizer than dont remove the detail of the image? or any player that do resize before ffdshow/avisynth?
Im trying also with
LimitedSharpenFaster(dest_x=1280,dest_y=720,strength=60)
but it seems to apply the resize after the sharpenning?
There is any way to apply the resize before the sharpenning in LSF?
rkalwaitis
19th October 2009, 12:26
Lato,
I think I read somewhere to help avoid sharpening noise and reduce ringing it is whise to use lsfmod(preblur "your denoiser). To use this handy tip, do you need to know the specifics of the denoiser, or say for example with mctemporal denoise, could I put lsfmod(preblur "mctemporaldenoise(my settings)"? Or perhaps im just simply trying to overdo it Thanks K.
I know never mind as always use SEARCH!
leon1789
21st October 2009, 18:05
Speed comparaison:
Some screenshots:
Hi LaTo :)
Please, let's have a look here http://forum.doom9.org/showthread.php?p=1336664#post1336664 (LSFMod 1.9 vs SoftSharpen 7.6)
Don't hesitate to write what you find ugly in the softsharpen's results. :)
LaTo
25th November 2009, 18:41
Lato,
I think I read somewhere to help avoid sharpening noise and reduce ringing it is whise to use lsfmod(preblur "your denoiser). To use this handy tip, do you need to know the specifics of the denoiser, or say for example with mctemporal denoise, could I put lsfmod(preblur "mctemporaldenoise(my settings)"? Or perhaps im just simply trying to overdo it Thanks K.
I know never mind as always use SEARCH!
Yes, LSFmod can avoid sharpening noise... But something like FFT3Dfilter is enough, no need of MCTD for this :D
Simply, apply FFT3Dfilter directly to the source:
FFT3Dfilter(sigma=xx)
You need to choose the sigma which remove most of noise without blurring too much the details...
When it's good, remove this line and add this one:
LSFmod(preblur="FFT3Dfilter(sigma=xx)")
You can tweak a little the sigma value directly in LSFmod, just compare and pick the best...
preblur is really useful on grainy source, it help to save much bitrate and avoid to make noise stronger ;)
mastrboy
3rd December 2009, 02:26
how is LSFmod's compatibility with SetMTMode() ?
Using LimitedSharpenFaster and SetMTMode(2,0) it used 99% cpu on i7-860, can't seem to get LSFmod to use more than a average of 70%, the FPS is about the same though..
mastrboy
3rd December 2009, 02:41
thanks for the quick reply, i'll test it out, and check quality with soothe=false vs =true to see if it's worth it...
Edit:
Worked great, can't see any difference in quality even if i resize it 2x, did not check compression difference though..
Again thanks :)
Keiyakusha
3rd December 2009, 21:49
Just out of curiosity... something cool is planned for 2.0? ^_^
LaTo
4th December 2009, 07:30
Just out of curiosity... something cool is planned for 2.0? ^_^
The only thing on my todo list is to optimize all the different process with MVTools, but... lack of time :mad:
LSFmod is mature and bug-free, v2.0 will need some searching & thinking to do it in the best way...
MatLz
4th December 2009, 08:06
Hi!
Why not a mode with adaptive radii and masks expansions depending on resolution?
For animes it will be usefull.
Keiyakusha
19th December 2009, 02:56
After sharpening some pixels is pushed beyond TV limit. How do I avoid that?
Keiyakusha
25th December 2009, 02:30
Sorry for bump but I still want to know. Should I limit levels by myself or I missing something in LSFmod settings?
LaTo
25th December 2009, 11:41
Sorry for bump but I still want to know. Should I limit levels by myself or I missing something in LSFmod settings?
Yes, simply use Limiter() after.
Happy Christmas everyone!
Gamestar
7th January 2010, 02:12
hey i was wondering if im doing anything wrong. i'm not seeing any results from the filtering. my input and output looks the same. here's what my script looks like.
AVCSource("C:\Users\~\Documents\Test Encodes\00000.dga")
#deinterlace
#crop
LanczosResize(1280,720) # Lanczos (Sharp)
Undot() # Minimal Noise
LSFmod(defaults="slow")
jmartinr
7th January 2010, 12:41
The script looks OK to me. Do some debugging by varying the settings or the script.
Gamestar
7th January 2010, 20:18
i dont know that the problem is. i think anytime i put in a value for any script. it wont work.
for example. i tried out LimitedSharpenFaster(strength=200)
it doesn't do anything. i then tried out LimitedSharpenFaster()
that actually sharpen the video.
rkalwaitis
14th January 2010, 22:58
Neuron or maybe Lato once showed me how to show the difference between two clips. So you could see what your filtering does. It is not two pictures but black background with grey shading showing the changes. I think it was like this.
orig=YourSourceFilter("file")
denoised=orig.YourDenoiser()
subtract(orig,denoised)
Then maybe you can see what was changed in a different way. May more change than one thinks.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.