Log in

View Full Version : Realtime SD Sharpening


Pages : 1 [2]

Stormborec
24th December 2014, 18:13
Btw. - unsharp masking, xsharp should be outside my interest for this "DVDrip" content?

Stormborec
24th December 2014, 23:54
feisty2:
and we can use radius less than 1.0 in blur, if we want to achieve blur (0.25) by removegrain (11), we're gonna have to do a 2x supersample

YES - now I understand.

I'm still decreased parameter mode of removegrain and the output was still grainy ...
I don't know, how is it made in LSFmod, but for me is blur more suitable in the "#33" script, than removegrain.

Stormborec
26th December 2014, 02:22
So for my slow PC and colorshifted TV yet appears as the best compromise:

gradfun2db()
sharpen(0.4)
converttorgb()
RGBAdjust(0.9,0.9,1) #removes yellow tint


The sharpening could be improved later, if my computer can handle everything ... But I'm not sure in the filters order ...

StainlessS
26th December 2014, 06:31
Dont know if this will help at all (might spark a little controversy)

But here the order that TmpGenc v2.5 uses (all in RGB IIRC)


Source Range (Trim)
Inverse Telecine
Ghost reduction
Noise Reduction
Sharpen Edge
Color Correction
Deinterlace
Crop
3:2 Pulldown
FrameRate conversion

feisty2
26th December 2014, 10:29
Hey, ur still online
Not gonna have a quality Xmas time with family? :)

StainlessS
26th December 2014, 10:47
You are one to talk, think I saw you on-line at about 04:30 AM (London time),
I like keeping busy, holidays are for wimps :)

feisty2
26th December 2014, 11:26
I keep my pc on 24/7, so it seems I'm always online even sometimes I'm not, yeah, I'm lazy enough to leave my web browser running with my pc so I don't have to type web addresses when I try to visit frequent sites
And Xmas, I only like it cuz it's a holiday and I get to rest on that day
I'm not exactly in the fan club of family union kinda stuff
And I prefer to browse web alone :D

Stormborec
18th February 2015, 20:44
OK:

x+(((((abs((x-y))/4)^(1/4))*4)*1.5)*((x-y)/(abs((x-y))+1)))
x+ ((abs(dif) /4)^(1/4))*4) *1.5* dif/(abs(dif)+1)
zrp pwr zrp str low dump

The low dump is in the Seesaw like: dif^2/(dif^2+1) ...

So, if I'm true - this could be the "Seesaw version":

mt_lutxy(last,last.removegrain(20)\
,"x x y - abs 4 / 1 4 / ^ 4 * 1.5 * x y - 2 ^ x y - 2 ^ 1 + / * x y - x y - abs 0.001 + / * +",U=2,V=2)

Low dump in the above "^2 version" much less impacts another areas, than just the "small differencies areas". Maybe if I put "dif ^3 / abs dif ^3 + low dump, then I could remove the x y - x y - abs 0.001 + / * part ...

mt_lutxy(last,last.removegrain(20)\
,"x x y - abs 4 / 1 4 / ^ 4 * 1.5 * x y - 3 ^ x y - abs 3 ^ 2 + / * +",U=2,V=2)

Yes !

Btw. the "zero point" is there just for ease of tuning, it can be fully replaced by change of the strength parameter ...


The above function can be written:

mt_lutxy(last,last.removegrain(20)\
,"x x y - abs 1 4 / ^ 4.243 * x y - 3 ^ x y - abs 3 ^ 2 + / * +",U=2,V=2)

And it's the same (excepting the rounding of 4.243)

Stormborec
19th February 2015, 23:20
Diary of sharpening :D

http://forum.doom9.org/showthread.php?p=1547017#post1547017
and DIV 0 "if then else" solution + SdampHi (from Seesaw - also by Dideé, of course ...)


mt_lutxy(last,last.RemoveGrain(20,-1),\
"x y == x x x y - abs 4 / 0.25 ^ 4 * 1.5 * x y - 2 ^ x y - 2 ^ 2 + / * x y - x y - abs / * 1 x y - abs 16 / 4 ^ + / + ?",U=2,V=2)


notes:

ZeroPoint - just for Power tuning, else (x/ZP)^P *ZP = (x^P / ZP^P) *ZP = x^P * c :

c = (x^P / ZP^P) *ZP / x^P
c = ZP / ZP^P
c = 2.828

mt_lutxy(last,last.RemoveGrain(20,-1),\
"x y == x x x y - abs 0.25 ^ 4.24 * x y - 2 ^ x y - 2 ^ 2 + / * x y - x y - abs / * 1 x y - abs 16 / 4 ^ + / + ?",U=2,V=2)




Or as much easy as possible (linear lodamp, no hidamp):

"x x y - abs 0.25 ^ 4.24 * x y - x y - abs 2 + / * +"

x + (abs dif)^0.25 * 4.24 * dif / ((abs dif) +2)

Stormborec
21st February 2015, 11:30
just for completeness:

damplo=1
(abs dif)^0.25 * 4.24 * dif / ((abs dif) +1)

damplo=2
(abs dif)^0.25 * 4.24 * dif / ((abs dif) +2)

http://www.imagehosting.cz/thumbs/1djd.png (http://www.imagehosting.cz/?v=1djd.png)


btw.:


(abs dif)^0.25 * 4.24 * dif / ((abs dif) +2)

match the zero point 4, because 1.5 * dif / ((abs dif) +2) = 1 resp. -1

and:

x x y - abs 4 / 1 4 / ^ 4 * 1.5 * x y - x y - abs 2 + / * +

is equal to:

x x y - abs 1 4 / ^ 2.83 * 1.5 * x y - x y - abs 2 + / * +

2.83 * 1.5 = 4.24.... (roundings here and there ...)

Stormborec
21st February 2015, 20:27
But the most pure solution is:

mt_lutxy(last,last.RemoveGrain(20,-1),"x x y - 1 x y - 16 / 4 ^ + / +",U=2,V=2)

= x +dif / (1+(dif/16)^4) ... lower the "16" for increase nonlinearity

http://www.imagehosting.cz/thumbs/1uuu.png (http://www.imagehosting.cz/?v=1uuu.png)

Or

mt_lutxy(last,last.RemoveGrain(20,-1),"x x y - 1.1 * 1 x y - 14 / 2 ^ + / +",U=2,V=2)

And you have practically the same, like:

mt_lutxy(last,last.RemoveGrain(20,-1),\
"x y == x x x y - abs 0.25 ^ 4.0 * x y - 2 ^ x y - 2 ^ 5 + / * x y - x y - abs / * 1 x y - abs 32 / 4 ^ + / + ?",U=2,V=2)