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. |
24th August 2006, 08:54 | #22 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
Owen says that the Noise is mostly in Chroma, and I use HQDN3D(0.0, 2.0, 0.0, 4.0) so Chroma is affected but not Luma. It would sure be nice if you could make a Spresso for Chroma only. |
|
24th August 2006, 11:09 | #23 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Supposely this "reduced-medianfilter" method isn't so awfully effective for removing chroma noise. Temporal filters should be a better choice here.
But, for what it's worth, here's SPresso extended to work on either luma, chroma, or both: ( EDIT 2006-09-04: corrected a BIG bug.) Code:
function SPresso(clip clp, int "limit", int "bias", int "RGmode", int "limitC", int "biasC", int "RGmodeC") { limit = default( limit, 2 ) limitC = default( limitC, 4 ) bias = default( bias, 25 ) biasC = default( biasC, 50 ) RGmode = default( RGmode, 4 ) RGmodeC = default( RGmodeC, 0 ) yy = (RGmode ==0) ? 2 : 3 uv = (RGmodeC==0) ? 2 : 3 LIM1 = (limit>0) ? string( round(limit*100.0/bias-1.0) ) : string( round(100.0/bias) ) LIM2 = (limit<0) ? "1" : string(limit) BIA = string(bias) LIM1c = (limitC>0) ? string( round(limitC*100.0/biasC-1.0) ) : string( round(100.0/biasC) ) LIM2c = (limitC<0) ? "1" : string(limitC) BIAc = string(biasC) expr = (limit<0) ? "x y - abs "+LIM1+" < x x 1 x y - x y - abs / * - ?" \ : "x y - abs 0 <= x x "+LIM1+" + y < x "+LIM2+" + x "+LIM1+" - y > x "+LIM2+" - " \ + "x 100 "+BIA+" - * y "+BIA+" * + 100 / ? ? ?" exprC = (limit<0) ? "x y - abs "+LIM1c+" < x x 1 x y - x y - abs / * - ?" \ : "x y - abs 0 <= x x "+LIM1c+" + y < x "+LIM2c+" + x "+LIM1c+" - y > x "+LIM2c+" - " \ + "x 100 "+BIAc+" - * y "+BIAc+" * + 100 / ? ? ?" # For (old) MaskTools v1.5.8 : # yv12lutxy( clp, clp.removegrain(RGmode,RGmodeC), expr,exprC,exprC, Y=yy,U=uv,V=uv) # For (new) MaskTools v2.x : mt_lutxy( clp, clp.removegrain(RGmode,RGmodeC), yexpr=expr,uexpr=exprC,vexpr=exprC, Y=yy,U=uv,V=uv) return( last ) }
__________________
- 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; 4th September 2006 at 01:58. |
24th August 2006, 12:52 | #24 | Link |
Registered User
Join Date: Jan 2006
Posts: 25
|
Sorry, Spresso is mentioned in a LimitedSharpen thread, http://forum.doom9.org/showthread.ph...137#post867137 but can some kind soul point me to an explanation of what Spresso does and when to apply it ? Jeremy's link http://forum.doom9.org/showthread.ph...137#post867137 has the some flash-looking code. ... but I'm unsure what is it that SPresso is meant to do and why. It seems to be used in the context of noise filtering ?
Last edited by frednerk33; 24th August 2006 at 12:55. |
24th August 2006, 22:01 | #28 | Link | |
Registered User
Join Date: Jan 2006
Posts: 80
|
Quote:
function SPresso(clip clp, int "limit", int "bias", int "RGmode", int "limitC", int "biasC", int "RGmodeC") the variables with 'C' are the chroma settings right? Last edited by n3w813; 24th August 2006 at 22:04. |
|
24th August 2006, 22:05 | #29 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
limit = default( limit, 2 ) limitC = default( limitC, 4 ) bias = default( bias, 25 ) biasC = default( biasC, 50 ) RGmode = default( RGmode, 4 ) RGmodeC = default( RGmodeC, 0 ) SPresso(0, 4, 0, 40, 1, 17) |
|
24th August 2006, 22:22 | #30 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
NO NO NO, it's the order in the function definition that's important, and this is a good time to reiterate:
Don't call functions with bare arguments, use names, never worry about the order. Otherwise it happens all the time, you upgrade a dll or script and the video turns green and looks vertically blurred, or whatever, because the order of arguments changed. Or an argument was swapped out with one with an entirely different meaning. Named optional arguments are one of the biggest conveniences of avisynth; even if the calls get wider they get much more understandable. Btw, SPresso is essentially what SeeSaw does when you supply no denoised argument, right? (Its effect is that high freqency noise is smoothed out somewhat, though I'm not entirely sure of the details; a quick n' dirty one.) Last edited by foxyshadis; 24th August 2006 at 22:25. |
24th August 2006, 22:42 | #31 | Link | |
Registered User
Join Date: Jan 2006
Posts: 80
|
Quote:
MT("SPresso(limit=0, bias=0, RGmode=0, limitC=4, biasC=50, RGmodeC=4)",3) Sorry, I'm a REAL n3w813 when it comes to avisynth scripts. :P |
|
25th August 2006, 13:42 | #33 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
Code:
MT("SPresso(limit=0, limitC=4, bias=0, biasC=40, RGmode=1, RGmodeC=17)",3) I've bolded in the quote the setting that needs to be at least # 1. |
|
25th August 2006, 20:08 | #34 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,733
|
RGMode=0 should mean that luma is simply copied as it is - it shouldn't do anything to the colors. If it does, there's something wrong in Didée's function.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
25th August 2006, 20:37 | #35 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
Code:
SPresso(limit=0, limitC=4, bias=0, biasC=40, RGmode=1, RGmodeC=17) |
|
25th August 2006, 20:49 | #36 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
I can't reproduce that. There's nothing wrong in the function, as far as I can see, and RGmode=0 / limit=0 works fine for me.
@ foxyshadis Lol, good description of might happen. You forgot "video might start playing backwards". Quote:
Generally, Spresso is just a limited Removegrain(4). Put in words, SPresso(RGmode=4,bias=25,limit=2) reads: "Apply 25% of RemoveGrain(4), with a maximum pixelchange of +/- 2".
__________________
- 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; 25th August 2006 at 20:52. |
|
25th August 2006, 21:10 | #37 | Link | |
Actually in reserve
Join Date: Oct 2004
Posts: 1,605
|
Quote:
I really need to learn scripting more Did
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first Want to exchange on AutoGK? try doom10.org In reserve (inactive) for an undefined period of time. |
|
26th August 2006, 01:27 | #38 | Link | |
Registered User
Join Date: Jan 2006
Posts: 25
|
Quote:
|
|
4th September 2006, 01:22 | #39 | Link | |
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
Code:
function SPresso(clip clp, int "limit", int "bias", int "RGmode", int "limitC", int "biasC", int "RGmodeC") { limit = default( limit, 2 ) limitC = default( limitC, 4 ) bias = default( bias, 25 ) biasC = default( biasC, 50 ) RGmode = default( RGmode, 4 ) RGmodeC = default( RGmodeC, 0 ) yy = (RGmode ==0) ? 2 : 3 uv = (RGmodeC==0) ? 2 : 3 LIM1 = (limit>0) ? string( round(limit*100.0/bias-1.0) ) : string( round(100.0/bias) ) LIM2 = (limit<0) ? "1" : string(limit) BIA = string(bias) LIM1c = (limitC>0) ? string( round(limitC*100.0/biasC-1.0) ) : string( round(100.0/biasC) ) LIM2c = (limitC<0) ? "1" : string(limitC) BIAc = string(biasC) expr = (limit<0) ? "x y - abs "+LIM1+" < x x 1 x y - x y - abs / * - ?" \ : "x y == x x "+LIM1+" + y < x "+LIM2+" + x "+LIM1+" - y > x "+LIM2+" - " \ + "x 100 "+BIA+" - * y "+BIA+" * + 100 / ? ? ?" exprC = (limit<0) ? "x y - abs "+LIM1c+" < x x 1 x y - x y - abs / * - ?" \ : "x y == x x "+LIM1c+" + y < x "+LIM2c+" + x "+LIM1c+" - y > x "+LIM2c+" - " \ + "x 100 "+BIAc+" - * y "+BIAc+" * + 100 / ? ? ?" # For (old) MaskTools v1.5.8 : # yv12lutxy( clp, clp.removegrain(RGmode,RGmodeC), expr,exprC,exprC, Y=yy,U=uv,V=uv) # For (new) MaskTools v2.x : mt_lutxy( clp, clp.removegrain(RGmode,RGmodeC), yexpr=expr,uexpr=exprC,vexpr=exprC, Y=yy,U=uv,V=uv) return( last ) } |
|
4th September 2006, 01:56 | #40 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Not bad. But I prefer the one some posts above.
__________________
- 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!) |
|
|