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. |
2nd November 2007, 14:56 | #461 | Link | |
Registered User
Join Date: Oct 2007
Posts: 7
|
Quote:
b/regards |
|
2nd November 2007, 16:04 | #462 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Quote:
@adhoya: Use higher values for "SdampLo" in SeeSaw. The default (SdampLo=Spower+1) might be too low for you. Try e.g. SdampLo=20..25..30. Also, your Spower of "8" is pretty high. Note that the default is "4", and realize it's a power function. With base=5 as an example: Default: 5^4=652. Yours: 5^8=390625. See a difference in those numbers? Powers are growing very quickly, and the default choice for SdampLo works linear, not exponential. Depending on how your "blocking" looks like exactly, the usage of a deblocker might be appropriate indeed. This can't be judged from the mere statement "there is blocking". Throwing in some "SootheS" might help as well. Default is zero (deactivated), try SootheS=20..40..60..75.
__________________
- 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!) |
|
2nd November 2007, 17:08 | #463 | Link |
Registered User
Join Date: Oct 2007
Posts: 7
|
where they are gone? (kidding..^^) really nice no blocks and noise. i used
Code:
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=30, Spower=4, Szp=16,soothet=80,sootheS=75) |
2nd November 2007, 23:04 | #464 | Link | |
Registered User
Join Date: Oct 2007
Posts: 7
|
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repair.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools\mvtools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter\DctFilter.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll") DirectShowSource("d:\new.grf",fps=23.976, audio=false) crop( 0, 144, 0, -136) spline36resize(1920,800) backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16) backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16) forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16) forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16) a = last.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1) b = a.degrainmedian(mode=1) SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=40, Spower=4, Szp=16,soothet=100, sootheS=95) Deblock_QED(quant1=24, quant2=22, aOff1=2, bOff1=4, aOff2=4, bOff2=8, uv=1) Quote:
|
|
3rd November 2007, 04:54 | #465 | Link | |
Silver Über Alles
Join Date: Aug 2006
Location: Australia
Posts: 269
|
Quote:
Deblock_QED is an avs script function, save the following as deblock_qed.avsi in your plugins folder; Code:
function Deblock_QED ( clip clp, int "quant1", int "quant2", \ int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" ) { quant1 = default( quant1, 20 ) quant2 = default( quant2, 40 ) aOff1 = default( aOff1, quant1/2 ) # I've no clue if these are clever values or not! bOff1 = default( bOff1, quant1/4 ) # So: aOff2 = default( aOff2, quant1/4 ) # Also try all these 4 values @ 0 (zero), bOff2 = default( bOff2, quant1/8 ) # and quant1=30, quant2=40~45 instead. uv = default( uv, 1 ) # u=3 -> use proposed method for chroma deblocking # u=2 -> no chroma deblocking at all (fastest method) ox = clp.width() # u=1|-1 -> directly use chroma debl. from the normal|strong deblock() oy = clp.height() # With avisynth scripting, there is no information available about the position of the currently # processed pixel ... there simply is no such thing like an "actual" processed pixel. # So first I've to build up a grid covering the transitions between all 8x8 blocks, # and make some LUTmania with it later. Yes, this is cumbersome. block = blankclip(clp,width=6*4,height=6*4,color=$000000).addborders(4,4,4,4,color=$FFFFFF) block = stackhorizontal( block,block,block,block) block = stackvertical( block,block,block,block) .pointresize(32,32) .binarize(upper=false) block = stackhorizontal( block,block,block,block,block,block,block,block) block = stackvertical( block,block,block,block,block,block) block = stackhorizontal( block,block,block) block = stackvertical( block,block,block) block = block .crop(0,0,ox,oy) block = (uv!=3) ? block \ : YtoUV(block.crop(0,0,ox/2,oy/2),block.crop(0,0,ox/2,oy/2),block) block = block.trim(1,1) .loop(framecount(clp)) # create normal deblocking (for block borders) and strong deblocking (for block interiour) normal = clp.deblock(quant=quant1,aOffset=aOff1,bOffset=bOff1) strong = clp.deblock(quant=quant2,aOffset=aOff2,bOffset=bOff2) # build difference maps of both normalD = yv12lutxy(clp,normal,"x y - 128 +","x y - 128 +","x y - 128 +",U=uv,V=uv) strongD = yv12lutxy(clp,strong,"x y - 128 +","x y - 128 +","x y - 128 +",U=uv,V=uv) # separate border values of the difference maps, and set the interiours to '128' strongD2 = yv12lutxy(StrongD,block,"y 255 = x 128 ?","y 255 = x 128 ?","y 255 = x 128 ?",U=uv,V=uv) normalD2 = yv12lutxy(normalD,block,"y 255 = x 128 ?","y 255 = x 128 ?","y 255 = x 128 ?",U=uv,V=uv) # interpolate the border values over the whole block: DCTFilter can do it. (Kiss to Tom Barry!) # (Note: this is not fully accurate, but a reasonable approximation.) strongD3 = strongD2.yv12lut("x 128 - 1.01 * 128 +","x 128 - 1.01 * 128 +","x 128 - 1.01 * 128 +",U=uv,V=uv).dctfilter(1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0)# .yv12lut("x 128 - 2 / 128 +") # apply compensation from "normal" deblocking to the borders of the full-block-compensations calculated # from "strong" deblocking ... strongD4 = yv12lutxy(strongD3,normalD2,"y 128 = x y ?","y 128 = x y ?","y 128 = x y ?",U=uv,V=uv) # ... and apply it. deblocked= yv12lutxy(clp,strongD4,"x y 128 - -","x y 128 - -","x y 128 - -",U=uv,V=uv) # simple decisions how to treat chroma deblocked = (uv<0) ? deblocked.mergechroma(strong) : uv<2 ? deblocked.mergechroma(normal) : deblocked deblocked return( last ) } |
|
3rd November 2007, 10:38 | #466 | Link |
Registered User
Join Date: Oct 2007
Posts: 7
|
i tested three options (1pass maxspeed profile x264 encoding with 7520kbps with no built-in x264 filter i.e. deblock filter)
only used below filters. thanks to R3Z and Didée(thru googling i found a script to correct qed by Didée ), i could install deblock_qed correctly 1)orginal encoding(without any filter) 2)only seesaw(MVDegrain2+degrainmedian) 3)only seesaw(MVDegrain2+degrainmedian)+deblock_qed these are screenshots original (1 pass maxspeed no x264 analyse ) seesaw only (1 pass maxspeed no x264 analyse ) seesaw + deblocker (1 pass maxspeed no x264 analyse ) seesaw+x264 built-in deblocker (2pass hq slow profile, eqm_avc_hr.cfg matrix) at last blocks gone away. Last edited by adhoya; 3rd November 2007 at 12:24. |
3rd November 2007, 14:46 | #467 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
Somehow it seems your image quality problems lie not with SeeSaw, but rather with x264's settings ...
BTW, at that location where you have placed Deblock_qed, it is pretty much useless. That filter deals for removing blocking artefacts that are in the source. After having filtered the whole thing with MVDegrain+DegrainMedian already, there probably is no more blocking there that Deblock_qed could remove (or at least reckognize). Also, you have a resizer at the start of the script. If that resizer actually does something (i.e. resolution is different than 1920x800 after cropping - not sure if it is, can't tell if your DS decoder spits out 1080p with 1080 or 1088 vertical pixels), then Deblock_qed can no more work correctly no matter what. Prior to deblocking: NO resizing. NO noise filtering. Cropping only at macroblock boundaries.
__________________
- 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!) |
3rd November 2007, 16:46 | #468 | Link |
Registered User
Join Date: Oct 2007
Posts: 7
|
Code:
resolution is different than 1920x800 after cropping - not sure if it is, can't tell if your DS decoder spits out 1080p with 1080 or 1088 vertical pixels and i am wondering why, after encode, colors goes different. it's sharper and has less noise but not that vivid compared to source after encode with seesaw. it could be natural consequense. but i hope to know the method to get back as much as possible. is there any(sharper and vivid)? Last edited by adhoya; 3rd November 2007 at 17:05. |
16th November 2007, 17:00 | #470 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Some bug was found with SeeSaw and Vfapi.
http://forum.doom9.org/showthread.php?t=128611 Didée, here is my bug report VFapi catch all exception internally and report about error in float operation. (Avisynth itselft for some reason skip it). I tried Sharpen2 function alone: it produce the bug too. Then I try read your the extra long yv12lutxy expression. It is really expressive expresion! But now I know what is error. It is substring like: "x y - x y - abs /" In normal notation it is: (x-y)/abs(x-y) Probably you wanted to construct the "sign" function. But if x=y then you have 0/0 What is the result? VFapi works fine (without error) when I replace the expression by "x < y -1 1 ?" or "x y - x y - abs 0.01 + /" or some other, but i do not know your intention about value of 0/0. Please correct it and similar substring like "y 128 - y 128 - abs /"
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. Last edited by Fizick; 16th November 2007 at 20:10. |
16th November 2007, 19:05 | #471 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
How could that be? Note the start of the expression:
Code:
"x y == x [...] x y - x y - abs / * + ?" Same goes for the similar expression with "y 128 -". Moreover, it's "only" in a mt_lutxy call: even if I overlooked something, then the hypothetical division-by-zero occurs only during the LUT building (which is handled by MaskTools without producing an error). There is no reason why there should be a problem from that side. Either the script evaluates, or it does not. From my experience, it does.
__________________
- 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!) |
16th November 2007, 20:08 | #472 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
yes, it is during LUT building (at constructor).
yes, masktools for some reason do not report. The order of internal calulations may differ ( i do not know why). Probably even if you write condition at the left, evaluator may firstly calculate right part of expression. (to produce intermediate LUT). And quite probably, that Avisynth or MaskTools skip "weak" exception like division by 0. It is better to fix even potential bugs. They may appear in some case (next versions etc). From my experience, the script does not evaluated with VFApi (see post above), but modified script does. Simple script: a=version().converttoyv12() b=a.blur(1) yv12lutxy(b,a,"x y /",u=2,v=2) produce the same results. (works itself but do not work with VFapi)
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. Last edited by Fizick; 16th November 2007 at 20:10. |
16th November 2007, 20:30 | #473 | Link |
AviSynth plugger
Join Date: Nov 2003
Location: Russia
Posts: 2,183
|
Mostly for programmers. DGFapi use:
Code:
try { ... *(j->clip) = j->avsEnv->Invoke("Import", AVSValue(args1, 1)).AsClip(); ... } catch (AvisynthError e) { OutputDebugString("DGVfapi: error (Avisynth Error) loading avisynth script!\n"); sprintf(buf,"DGVfapi: %s.\n", e.msg); OutputDebugString(buf); closeAVS(j); return VF_ERROR; } catch (...) { OutputDebugString("DGVfapi: error (Unknown) loading avisynth script!\n"); closeAVS(j); return VF_ERROR; } [3556] DGVfapi: error (Avisynth Error) loading avisynth script! [3556] DGVfapi: Evaluate: System exception - Float Invalid Operation
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick I usually do not provide a technical support in private messages. |
16th November 2007, 20:55 | #474 | Link | |
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Quote:
Code:
x y = y x y / ? Code:
? -> fetch next three values / -> fetch next two values y -> return y x -> return x -> return x / y y -> return y = -> fetch next two values y -> return y x -> return x -> return abs(x-y) < 0.000001 ? 1 : -1 -> return abs(x-y) < 0.000001 ? y : x / y
__________________
|
|
17th November 2007, 15:10 | #475 | Link |
Registered User
Join Date: May 2005
Posts: 236
|
Interesting, thanks for the explanation of how the code is interpreted I never use very complex formula in my scripts so I (think I) never came across such problems, but I will keep that in mind now ^^ I think this example would be worth being added to the masktools doc in the section V) Reverse polish notation
|
16th January 2008, 23:34 | #476 | Link |
Registered User
Join Date: Nov 2007
Posts: 53
|
please could someone tell me what i need and how i put a movie thru this seesaw filter I like the quality pictures of it I have virtualdub virtualdubmod and avisynht installed i alreadty downloaded the first 3 files the seesaw one masktools and the other one i just dont know how to do it.
Thanks CHESH |
26th January 2008, 04:28 | #478 | Link |
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,698
|
Yah. It's called a bitrate calculator.
But, that might not help you, as with the increased sharpness comes the necessity for increased bitrate, meaning larger file size. In short, if you want sharpness, you are going to have to pay for it with bits. |
26th January 2008, 10:06 | #479 | Link |
Registered User
Join Date: Dec 2007
Posts: 39
|
Forgive my ignorance, with which program would one load the following?
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools158\MaskTools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VagueDenoiser\VagueDenoiser.dll") Import("C:\Program Files\AviSynth 2.5\plugins\mvbob\mvbob.avs") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll") MPEG2Source("Z:\DestB\VTS_01_2.d2v") mvbob() Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs") ConvertToYv12() a = last b=a.VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8) SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16) Lanczos4Resize(640,372) |
Thread Tools | Search this Thread |
Display Modes | |
|
|