Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th April 2012, 18:09   #1  |  Link
annovif
Registered User
 
Join Date: Apr 2012
Location: Italy
Posts: 41
Lsfmod : The definitive sharpening script for bluray

The limitations inside lsfmod script are not good for the modern near perfection bluray image
(for example : Red Riding Hood, Lord of the Ring, Green Lantern and so on)

With no limitations the image processed by my corei5 @4300Mhz pc is the best that i can see with my too soft Sony Lcos, but it is not perfect, not yet.

I would know your expert opinion , guys, to increase quality more an more .

This is the avisynth 2.6 script in windows 7 - 32 bit version :

### defaults="slow" : - strength = 100
### ----------------- - Smode = 5
### - Smethod = 3
### - kernel = 11
###
### - preblur = "OFF"
### - secure = true
### - source = undefined
###
### - Szrp = 16
### - Spwr = 4
### - SdmpLo = 4
### - SdmpHi = 48
###
### - Lmode = 4
### - overshoot = strength/100
### - undershoot = overshoot
### - overshoot2 = overshoot*2
### - undershoot2 = overshoot2
###
### - soft = -2
### - soothe = true
### - keep = 20
###
### - edgemode = 0
### - edgemaskHQ = true
###
### - ss_x = 1.50
### - ss_y = ss_x
### - dest_x = ox
### - dest_y = oy
###
### - show = false
### - screenW = 1280
### - screenH = 1024
SetMemoryMax(512)
SetMTMode(3,6)
ffdshow_source()
SetMTMode(2)
LSFmod(defaults="slow",soft=0,ss_x=1.4,ss_y=1.4,strength=150,Smethod=4,kernel=19,lmode=0,sdmphi=0,sdmplo=0,keep=100,dest_x=3072,dest_y=2160)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last


You can see that i've changed some parameters from the default :

- The first thing is soft=0, because the image was too.....soft, and i don't want see a fuzzy image .
- The ss_x (supersampling factor) for antialiasing is only 1.4, but with a better overclocking or a new 22nn processor, i want to go near 2.0 (an antialiasing by Gpu would be the best, but i didn't found it) .
- Strenght=150 for me is very good . A 300 value is just too much full of ringing.
- Smethod=4 and Kernel=19 are the sharpest the script can do, i think.
- lmode=0 to eliminate the overshoot and undershoot limitations ; the image become brightest and blacks are so 'blacks who drowned details, but with projector adjustment i hope i can control it .
- sdmphi and sdmplo are = 0 (another limitation setting off) , but i am not sure, because I have not yet fully understood the effects , like the Szrp and Spwr that i have not touched .
- keep=100 is another value that i've setted to the maximum because i've seen a better image ; i've tried soothe=0 too to eliminate the keep setting, but the image and 'worst .

With Madvr i can joke with chroma parameters if i have a simple mkv with grain or a perfect bluray film to see, but The dest_x and y resize the image to quad hd resolution, so my ati 6670 can downscaling it and
i can joke with luma parameters too . There is a problem that in this way i've lost the correct aspect ratio, can you teach me what have i to do to mantain it?

What do you think ? I'm waiting for your suggestions .

Thanks, Fabio

P.s: I don't need frame interpolation to have a sharpest image, because my projector has just perfect motionflow inside, so i can concentrate all my cpu power for the best quality sharpness .
annovif is offline   Reply With Quote
Old 7th April 2012, 19:07   #2  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
You upsample from 1920 to 1920*1.4, do a limited sharpening there, then upsample from 1920*1.4 to 1920*1.6, to then let it get downscaled again?

Kind of interesting, but not very efficient.


For realtime sharpening (of HQ sources) upon playback, somehow the following code has crept into my Avisynth tab:

Code:
some_video

sD = mt_lutxy(last,last.removegrain(11,-1).removegrain(4,-1),
 \   "128 x y - abs 1.49 / 1 1.25 / ^ 3.49 * x y - x y - abs 0.001 + / * +",U=1,V=1)
#                                     ^^^^                                          # 1.0 ~ 9.876
last.mt_adddiff(sD,U=2,V=2)
last.mt_makediff(sD.mt_lut("x 128 - 1.00 * 128 +").removegrain(20,-1),U=2,V=2) # or 11 instead of 20
#                                   ^^^^                                      # 0.5 ~ 1.5

# Similar to XSharpen, but more passive
mt_lutxy(last,last.removegrain(20,-1),"x x y - 9.9 * +",U=2,V=2)
 \.repair(last,12,0).mergeluma(last,0.801) # 1.0-strength
It could be named with impressing buzzwords like "Highpass Sharpening" or even "Energy-conserving Sharpening", but the acc. function I've simply named "FineSharpen". (Not quite finished, Im unsure which knobs to expose and which not. Don't want to make a 20-parameters-monster when in fact it's such a simple operation.)
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)
Didée is offline   Reply With Quote
Old 7th April 2012, 20:49   #3  |  Link
annovif
Registered User
 
Join Date: Apr 2012
Location: Italy
Posts: 41
...thanks for the advice, although I did not understand what you mean by "do a limited sharpening there". I've lost a lot of time testing this lsfmod script and I would prefer it to work the best, but I want to also try your "Finesharpen" . I just need to know more about 'parameters,' cause I have to enjoy playing it.
Is this an Unsharp masking or a Nonlinear sharpening?
If you have time "definitive version" would be the best thing

Thank you, Fabio
annovif is offline   Reply With Quote
Old 7th April 2012, 22:51   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
I just tried your LSFmod script, exactly like you have posted it, and ... well, I dunno. Maybe we have different versions of LSFmod, somehow? Either that, or we are talking about completely different things.

Consider ... source frame:


This is what I get from your LSF script:


Is that the kind of result you're typically getting with your LSFmod script? I find that hard to imagine, since you started the discussion with "near perfection bluray image". If we start with "near perfection" image, then we don't want to do THAT, do we?


This is what my suggest script gives: (and for its intended scope, that's already quite strong!)
-- edit: script now with "ldmp" :


Either something has gone wrong, or we are talking about very different kinds of sharpening ...
__________________
- We´re at the beginning of the end of mankind´s childhood -

My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!)

Last edited by Didée; 13th April 2012 at 08:12.
Didée is offline   Reply With Quote
Old 8th April 2012, 17:47   #5  |  Link
annovif
Registered User
 
Join Date: Apr 2012
Location: Italy
Posts: 41
Didèe, i can't see all that ringing effect in the image made by my lcos , but adjusting strenght=80 or 100 i am sure you can see the film without ringing . Your photo seems the same when i put the strenght = 300.
Your sharpening script photo is good , but i would set a little more sharpness than that .

Thank you , i will try it . Fabio
Happy Easter

Last edited by annovif; 8th April 2012 at 17:50.
annovif is offline   Reply With Quote
Old 12th October 2012, 12:53   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,923
I have broken out the FineSharp() material into a new thread:

http://forum.doom9.org/showthread.php?t=166082
Guest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.