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. |
11th June 2011, 17:37 | #1 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
Why are these compensated frames blurry?
Code:
AVISource("e:\temp\dvnauha.avi") TDeint(mode=1) super=MSuper(last.Blur(1.58)) fv1=MAnalyse(super, chroma=true, isb=false) bv1=MAnalyse(super, chroma=true, isb=true) mc1=last.MCompensate(super, bv1) mc2=last.MCompensate(super, fv1) interleave(mc2,last,mc1)
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
11th June 2011, 18:16 | #2 | Link |
͡҉҉ ̵̡̢̛̗̘̙̜̝̞̟̠͇̊̋̌̍̎̏̿̿
Join Date: Feb 2009
Location: No support in PM
Posts: 712
|
You need a second, unprocessed superclip for MCompensate. Actually this function directly uses the provided superclip data to reconstruct the frames.
__________________
dither 1.28.1 for AviSynth | avstp 1.0.4 for AviSynth development | fmtconv r30 for Vapoursynth & Avs+ | trimx264opt segmented encoding |
11th June 2011, 18:20 | #3 | Link | |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
Code:
mc1=last.MCompensate(super, bv1) Script adapted, with more-obviously-named clips: Code:
AVISource("e:\temp\dvnauha.avi") TDeint(mode=1) super_search = MSuper(last.Blur(1.58)) super_render = MSuper(last,levels=1) fv1 = MAnalyse(super_search, chroma=true, isb=false) bv1 = MAnalyse(super_search, chroma=true, isb=true) mc1 = last.MCompensate(super_render, bv1) mc2 = last.MCompensate(super_render, fv1) interleave(mc2,last,mc1)
__________________
- 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!) |
|
11th June 2011, 18:48 | #4 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
Oh heck, over 8 years of Avisynth and I still stumble over the simplest things
To my defense, I did read the docs but of course didn't go to the examples where this one would have been pointed out. Thanks, gentlemen
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
11th June 2011, 23:57 | #5 | Link | |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Every time I think I've got something figured out, I read something like this post and realize I'm still a rookie.
The thing that has me puzzled is this line in Didée's post: Quote:
MCompensate (clip source, clip super, clip vectors, bool "scbehavior", etc., etc.) Here is where I will show my ignorance: in AVISynth, if the source clip is provided outside the function ("last." in the quoted line above), doesn't the first parameter in the function become the next item in the list, in this case "super?" If this is true, why aren't the motion compensation vectors, which were created with the blurred "super" clip, being applied to "last?" And if they are applied to "last," which is not blurred (it is the result of TDeint, right?), why would the results of the OP's script return blurred results? A corollary of my question is this: if the motion vectors are being applied to the "super_render" super clip (the one that is not blurred), then is "last" even used? Sorry to be so stupid, but I am confused. |
|
12th June 2011, 02:47 | #6 | Link | ||
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,391
|
Quote:
Quote:
- MVAnalyse works solely on the super clip. The motion search does not require the original base clip, the vector search happens only on the super clip. - Other functions like MCompensate, MDegrain, MFlow etc. work in that way that the compensated pixels are in fact created from the pixels of the super clip. The base clip is used only in so far as its pixels have to contribute any actual weight into the result. (Like e.g. MDegrain2, where the base clip provides basically 20% weight, and the compensations of the prev2, prev1, next1 next2 also 20% each.) [not considering thSAD weighting, for simplicity of explaining.] MCompensate is a bit of a special case because no weighting is taking place. It's a "merciless" compensation, all compensated pixels are taken from the super clip pixels. [safe for "thSAD" which disables compensation for bad blocks, using the base clip's original pixels for such bad blocks. But thSAD is skyrocket-high per default, i.e. disabled) Meh, already too much words for a simple relation. The short version: If any MVTools function creates compensated(interpolated) pixels, they are created from the pixels of the specified super clip. Application example: "Denoise with MDegrain2, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad" Code:
source = whatever sup_srch = source.msuper() sup_rend = source.sharpen(0.6).msuper(levels=1) bv1 = sup_srch.manalyse(isb=true, delta=1) fv1 = sup_srch.manalyse(isb=false,delta=1) bv2 = sup_srch.manalyse(isb=true, delta=2) fv2 = sup_srch.manalyse(isb=false,delta=2) source.blur(0.6).mdegrain2(sup_rend,bv1,fv1,bv2,fv2)
__________________
- 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!) |
||
12th June 2011, 04:17 | #7 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Didée,
Many thanks for the excellent explanation. I am very glad that my understanding of AVISynth itself is OK, but now that you have told me exactly what I needed to know about how the super clip is used, I will go back and re-read the MVTools2 documentation. I need to make sure that the several dozen scripts I've written over the years which use MVTools2 don't include a similar mistake. I think I would have noticed if the results were not what I'd expected, but I want to make sure. Again, thank you. |
13th June 2011, 21:24 | #8 | Link | |
--preset WTF!
Join Date: Feb 2009
Posts: 86
|
Shortly;
Quote:
Last edited by Nephilis; 13th June 2011 at 21:28. |
|
20th October 2011, 04:12 | #9 | Link |
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,730
|
One more thing to this thought of MSupers - can I utilize vectors created under different "pel" in functions that use a different pel value, for example create vectors using pel=2, then use pel=1 for MCompensate and MDegrain and reuse the vectors created earlier?
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
Thread Tools | Search this Thread |
Display Modes | |
|
|