View Full Version : MCTemporalDenoise [v1.4.20 - Update 2010/07/02]
Pages :
1
2
3
4
5
6
7
8
9
10
[
11]
12
13
14
15
16
17
18
19
Zep
23rd February 2011, 16:56
To put an analogy ...
lol good stuff :p
Zep
23rd February 2011, 17:04
Hint: this ain't a straight compliment.
so break it down into more specialized functions that can be called from other scripts that may not need the over kill that MCTD is for most.
Maybe this is a chance to optimize a few things as well. :)
-Vit-
23rd February 2011, 19:03
I face the same monster-script problem with QTGMC. But there simply aren't the language constructs in AviSynth to create nicely componentized scripts. The advantage of monster scripts is that they can resuse processing from earlier steps. QTGMC performs motion analysis once, then reuses the motion vectors about 8 or 9 times. When using standalone scripts, motion vectors might get calculated several times - slower, and possibly inconsistent. And it's not just motion vectors. Within QTGMC, there are many other intermediate clips that are reused in multiple places (dunno about MCTD in this regard tho'). So a huge script can be faster (and more consistent), although you do need to script carefully (http://forum.doom9.org/showthread.php?p=1477993#post1477993) to stop the code bloat from impacting performance. And it becomes hard to maintain of course.
I guess the best current example of how things could be done is in MVTools. You use MAnalyse to return a "super" clip, then that clip can be used in any number of subsequent MVTools calls. But those super clips are special - many images embedded into one, with the audio stream used for data too I think. A necessary hack because of the language constraints. It's not so difficult to do in a C++ plugin, but not something you would want to do in plain script. The only other option would be lots of globals I suppose...
Gavino
23rd February 2011, 19:49
there simply aren't the language constructs in AviSynth to create nicely componentized scripts.
What constructs would you like to see?
cretindesalpes
23rd February 2011, 22:02
Being able to pass variables as references would be great to return multiple data from a function. Regarding QTGMC, it would be really helpful to reuse the motion vectors for subsequent filtering.
-Vit-
24th February 2011, 00:36
Yeah, reference parameters would be excellent (or output parameters, nearly the same thing). Would allow us to take the same approach of MVTools more easily
Some way to share data between scripts that isn't as clumsy as a global - better scoping, simple namespaces or something. That being said, what are the potential problems of defining "global QTGMC_bVec1", because that would be the idea...
My goal would be to split QTGMC into discrete components, which could be flexibly chained to perform the QTGMC algorithm. And also make some key intermediate clips available to the caller (e.g. motion vectors, temporal min/max, NNEDI'd clip). Some of the QTGMC components could be used stand-alone by other scripts. Most obviously the motion analysis, but also how about the noise-bypass - involves two steps "wrapped" around an "arbitrary" process, the second step needing to access results of the first. So far the only way I see to do this is a host of globals...
Gavino
24th February 2011, 00:54
That being said, what are the potential problems of defining "global QTGMC_bVec1", because that would be the idea...
Using globals with fixed names can make it awkward to use the associated function more than once in a script, but since the variables would only be used at compile-time, the user just needs to be careful and you don't get the sort of problems that come up with globals and ScriptClip et al.
-Vit-
24th February 2011, 02:52
I wonder if using globals like this would be safer:
function CalculateMotionVectors( clip c, string GlobalPrefix, ...other settings... )
{
# Calculate the vectors...
bVec1 = ....
fVec1 = ....
# Store in user defined globals
Eval( "global " + GlobalPrefix + "_bVec1 = bVec1" )
Eval( "global " + GlobalPrefix + "_fVec1 = fVec1" )
}
#...
clip1.CalculateMotionVectors( "C1", ... )
clip2.CalculateMotionVectors( "C2", ... )
#...
s1 = clip1.MDegrain( super, C1_bVec1, C1_fVec1 )
s2 = clip2.MDegrain( super, C2_bVec1, C2_fVec1 )
Could provide extra code to assert on overwriting existing globals (funky try catch statements), or require an explicit override to do so.
Gavino
24th February 2011, 10:33
^ Yes, all good ideas.
The GlobalPrefix could be made optional with a suitable default for simple use.
SilaSurfer
24th February 2011, 17:24
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.
Didée
MCTemporalDenoise is a shiny jewel. :) Let's take a avarege beginner, not me, not you, for those MCTD is very simple to use. I don't consider myself a beginner, but I use it in about 10% of my work. I have sources where MCTD(preset="very low") works like a charm. It saves me time and effort. For 90% of cases its MDegrain 2\3 for me where I do my own scripting based on the source. It is a jewel if you take in consideration LaTo's time, effort and willingness to share his work with us here just like you, Vit, cretindesalpes, Tritical and others....
BTW, the Swiss knife from the second picture, whats the retail price on one of those I would like to buy one.:p :D
StainlessS
27th February 2011, 02:50
BTW, the Swiss knife from the second picture, whats the retail price on one of those I would like to buy one.:p :D
Sorry, cant help on retail price, but, I believe I saw a fairly
similar (not quite as many attachments) item in a shop
in the main street alongside the river in Zurich about
1992 (near a hotel called the "Red House", I think). It was
about 4 foot across and animated, ie all the
blades were opening and closing all the time. I assume that
it might be possible to just take the battery out to stop the
animated action, you would however need big pockets. :)
mastrboy
7th May 2011, 12:24
When using a prefiltered clip (p=clip) does MCTemporalDenoise then skip FFT3DFilter, or do i also need to set sigma=0 ?
And how is the prefiltered clip used? (only for motion vector search?)
Basicly I want to use NLMeansCL instead of FFT3DFilter for prefiltering with something like:
pre=NLMeansCL(h=1.5)
MCTemporalDenoise(settings="high",stabilize=true,p=pre,sigma=0)
When using a prefiltered clip (p=clip) does MCTemporalDenoise then skip FFT3DFilter, or do i also need to set sigma=0 ?
And how is the prefiltered clip used? (only for motion vector search?)
Basicly I want to use NLMeansCL instead of FFT3DFilter for prefiltering with something like:
pre=NLMeansCL(h=1.5)
MCTemporalDenoise(settings="high",stabilize=true,p=pre,sigma=0)
No need to set sigma=0, it's automatically off.
MCTemporalDenoise:
http://img16.imageshack.us/img16/8671/messer9b.jpg
:D:D:D
Where can I get all Needed filters for MCTemporalDenoise in rar (zip) archive?
Give please link. :thanks:
You might try reading the thread some. :rolleyes: It's posted only a couple of pages from the end.
mastrboy
25th May 2011, 18:50
How can i reuse the motion vectors in MCTermporalDenoise later in the avs script?
asarian
11th June 2011, 06:46
Is using FFT3Dgpu still pointless with this filter? (I used to get terrible ghosting with it).
aNToK
18th June 2011, 11:57
Has anyone else gotten a drastic speed reduction with the latest version of MCTD? I've used version 1.3.09 for quite a while with no issues and consistent speed, but today I tried v 1.2.40 and my speeds dropped from 1-2fps to 0.08.
I'm running Win7 64bit and avisynth version 2.5.8 (non-MT 32 bit version) on an i5 computer with 4gigs of ram and a 2 year old ati video card. I've replaced all of the older required files with the ones listed at the beginning of the function, but it's going so slow that I moved back to the earlier version and it's still running fine.
I'm filtering a very grainy blu-ray disk with the high presets. I know with the resolution being so high I can expect a slow encode (disk 1 of this set took 3 days and 20 hours, but the results were worth the wait). Here's my script, all required plugins are in the avisynth plugin folder. Any thoughts on the slowdown?
LoadPlugin("C:\VIDEO PROGRAMS\MeGUI_1989_x86\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("E:\ROCKY TEST\ROCKY II\DGAVCindex\Rocky2.dga")
MCTemporaldenoise(settings="high")
asarian
18th June 2011, 12:08
Has anyone else gotten a drastic speed reduction with the latest version of MCTD?
(...)
LoadPlugin("C:\VIDEO PROGRAMS\MeGUI_1989_x86\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("E:\ROCKY TEST\ROCKY II\DGAVCindex\Rocky2.dga")
MCTemporaldenoise(settings="high")
I think it's the 'stabilize' that makes 'high' take like forever. I never use 'high' anyway, as 'medium', for all purposes and intent, really already is extremely high.
aNToK
18th June 2011, 12:18
Stabilize does slow it down some, but in this particular one it improves the picture quite a bit. There's so much light-colored dancing grain all over this vid that the medium setting just doesn't get it there so high is my best option.
Stabilize is active on the high preset in both versions though, so I don't think it would account for a 90% slowdown between the old and new scripts. The only significant change in the high presets that I saw was that the later version of MCTD dropped the radius to 2 instead of 3 and that should speed it up a bit if anything.
If nobody else is getting this kind of slowdown, it must be me. Just would love to figure out why it's happening...
SilaSurfer
19th June 2011, 16:28
Hey LaTo.
Pluggins needed for your function, is it Ok to use newer versions? (Masktoolsa48, MvTools2.5.11.2)
asarian
20th June 2011, 16:58
Hey LaTo.
Pluggins needed for your function, is it Ok to use newer versions? (Masktoolsa48, MvTools2.5.11.2)
Yeah, I'd like to know this too, please.
LaTo
20th June 2011, 17:04
Yes it should be OK.
aNToK
21st June 2011, 07:54
I'd like to know if anyone else has experienced the major slow-down I mentioned earlier.
Carpo
21st June 2011, 10:36
is it advised to use this script on old SD anime as well as newer HD releases? at the moment i am using only toon() and i am wondering if this will complement it or not?
mightydre
9th July 2011, 10:04
Stabilize does slow it down some, but in this particular one it improves the picture quite a bit. There's so much light-colored dancing grain all over this vid that the medium setting just doesn't get it there so high is my best option.
Stabilize is active on the high preset in both versions though, so I don't think it would account for a 90% slowdown between the old and new scripts. The only significant change in the high presets that I saw was that the later version of MCTD dropped the radius to 2 instead of 3 and that should speed it up a bit if anything.
If nobody else is getting this kind of slowdown, it must be me. Just would love to figure out why it's happening...
I've noticed that stabilize does drop my fps down to 10% of what it would be without stabilize--MCTemporalDenoise(settings="high",stabilize=false)--on 1080p content, but I don't see this level of slowdown on lower resolution content (ie. 720p).
Regardless, I wish this stuff made use of multiple cores.
pereant
9th July 2011, 14:18
It doesn't miss "a" scenechange. It does miss *every* scenechange. To my knowledge, temporal processing of FFT3DFilter simply doesn't check or care for that.
Just set bt=5,sigma=16, and watch what happens.
Of course it's mostly not a problem with lower sigmas. But that doesn't mean the issue isn't there. It's just that the problem becomes much harder to notice (and that's why people aren't complaining) ... but *present* it is all the time.
Argh you're right... Hardly noticeable but it's here with high sigma in FFT3Dfilter :(
Good to see it's not completely my fault. I was wondering why it happens. ;)
Thanks anyway LaTo for this great filter and all your efforts. Hope you can fix it :)
Carpo
11th July 2011, 20:29
how the hell can i get this script to work with SetMTMode() ? Every thing i have tried only gets x264 using one core :(
Boulder
11th July 2011, 20:41
Post your script so we can take a look. I'm running MCTD as part of my processing chain and have no problems having so high CPU usage that I also get frequent crashes ;)
Carpo
11th July 2011, 20:51
SetMTMode(2,0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("F:\DISC_RIPS\aliens.dgi",fieldop=0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 0, 132, 0, -132)
Spline36Resize(1920,816) # Spline36 (Neutral)
SetMTMode(2)
MCTemporalDenoise(settings="medium")
#denoise
I have tried SetMTMode(2,4) and SetMTMode(5,4) nothing seems to help, if i use MeGUI it shows xfw4x264.exe at 25% and x264_64.exe at about 5-10% , same happens if i call x264.exe from command line, same if i use avs4x264.exe
Boulder
11th July 2011, 20:56
Nothing wrong there, except that you shouldn't use SetMTMode(2) before the source filter.
Does the number of threads used by the encoder process change when you change the number of threads in the first SetMTMode call?
Carpo
11th July 2011, 20:58
if you mean SetMTMode(2,0) i have changed that to other values, but didnt help, if you mean the SetMTMode(2) before the MCTemporalDenoise(settings="medium") filter i have not changed that, from what i was reading on the wiki it seemd to show i should do that before most filters, changing it to maybe (5) or (6), should i remove that and see if it helps?
Boulder
11th July 2011, 21:08
Basically it's always SetMTMode(5) before the source filter and SetMTMode(2) after that unless there are filters that do not work properly when multithreading. But you can check if the script is running/trying to run multithreaded by looking at the number of threads per encoder process. If it changes when you change the number of threads in the first SetMTMode call, it's definitely trying to do something.
Carpo
11th July 2011, 21:12
This seems to work
SetMTMode(2,0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("F:\DISC_RIPS\MainMovie\ERGO_PROXY_ep1\VIDEO_TS\ergo_ep1.d2v", info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
Load_Stdcall_Plugin("C:\Program Files (x86)\MeGUI\tools\yadif\yadif.dll")
Yadif(order=1)
crop( 4, 2, 0, 0)
Spline36Resize(720,400) # Spline36 (Neutral)
MCTemporalDenoise(settings="medium", gpu=false)
#denoise
which atm has xfw4x264.exe at about 70% , x264_64.exe is still at 10%
will try from cli and see if its better
levi
13th July 2011, 01:46
I've not had success using setmtmode before dgdecode. I just put SetMTMode(2,0) after that line.
Boulder
13th July 2011, 03:29
You have to put SetMTMode before the source is loaded or there will be no multithreading. Also the number of threads to use must be defined in that first call.
shroom
15th July 2011, 12:11
This script does wonder !
:thanks:
nibus
1st August 2011, 12:28
Does the "fixband" parameter for FFT3D do what "enhance" (gradfun2dbmod) does, or is it something only for an issue with FFT3D?
LaTo
4th August 2011, 09:26
Does the "fixband" parameter for FFT3D do what "enhance" (gradfun2dbmod) does, or is it something only for an issue with FFT3D?
"fixband" removes banding created by FFT3D.
If you use "enhance" it may be overkill to leave fixband ON, try the 2 and pick the best for you ;)
asarian
9th August 2011, 20:21
Has anyone else gotten a drastic speed reduction with the latest version of MCTD? I've used version 1.3.09 for quite a while with no issues and consistent speed, but today I tried v 1.2.40 and my speeds dropped from 1-2fps to 0.08.
Actually, had the same issue the other week, with Der Untergang. At first (and, in hindsight, on earlier occassions) I thought MCTemporalDenoise was simply hanging; but it's not: it simply drops to like 0.08 fp/s. This was on a full 1080p source, uncropped, and with 'medium' for settings. Switching to 'low' made the problem go away, but that was obviously not what I wanted.
I experienced the issue again, soon thereafter, with The Shadow, cropped to 1040p, and also on 'medium' settings.
I eventually 'solved' the matter by simply splitting the film up vertically into 2x 540p parts (each with a 16px overlap), and processing each with MCTemporalDenoise individually, only to splice them back together later on. Not ideal, of course.
totya
28th September 2011, 11:47
Hi,
I think I found all needed filters (with exact version), except this:
Deblock_QED (25.may.2010)
This (http://avisynth.org/mediawiki/Deblock_QED) version date is 2010-10-16. This is good or not?
Second question: Of many needed filters they are newer version, these better than (recommended) olders, or not?
Example latest MVTools version is 2.5.11.3 etc...
Thanks!
the_weirdo
28th September 2011, 12:45
Hi,
I think I found all needed filters (with exact version), except this:
Deblock_QED (25.may.2010)
This (http://avisynth.org/mediawiki/Deblock_QED) version date is 2010-10-16. This is good or not?
Second question: Of many needed filters they are newer version, these better than (recommended) olders, or not?
Example latest MVTools version is 2.5.11.3 etc...
Thanks!
IMHO, you should use latest version of those needed filters, except RemoveGrain + Repair.
totya
28th September 2011, 12:56
IMHO, you should use latest version of those needed filters, except RemoveGrain + Repair.
Hi,
thx, but recommended version (http://avisynth.org/mediawiki/RemoveGrain) of RemoveGrain + Repair already latest: v1.0PR, this is mean I think: "v1.0 pre-release - latest edition with SSE3 fix"
the_weirdo
28th September 2011, 13:42
Hi,
thx, but recommended version (http://avisynth.org/mediawiki/RemoveGrain) of RemoveGrain + Repair already latest: v1.0PR, this is mean I think: "v1.0 pre-release - latest edition with SSE3 fix"
You're right. I've misremembered :o
jmac698
28th September 2011, 15:42
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec
totya
28th September 2011, 17:12
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec
Hi, I don't see this link on first post... and anywhere.
Symtomps:
- Default instal path is wrong, if avisynth installed outside on default path (good path from registry)
- Deblock_QED_MT2.avsi is not recommended version too
- mt_masktools-25.dll is not recommended version (latest), and recommended avisynth-MT verison is 2.60 see (http://forum.doom9.org/showthread.php?t=148117), and this version need mt_masktools-26.dll
But nice pack :)
jmac698
28th September 2011, 18:03
Thanks for the feedback! (finally)
I had mentioned it here:
http://forum.doom9.org/showthread.php?t=162622
It's also here:
http://avisynth.org/mediawiki/MCTemporalDenoise#Required_Filters
But this is a good thread, it just wasn't a top thread lately so I didn't know about it. I guess people are not finding information, but at least check the avisynth wiki as there's some good information there.
- Default instal path is wrong, if avisynth installed outside on default path (good path from registry)
That's why I made it customizable. To do it properly, I have to make a more advanced installer which can read the registry.
I should warn you that I put a few files in system32, fft3w.dll (required) and avsrecursion (often used, but not required by this filter). Ideally I want to make an installer for many things "filter pack".
You can open the .exe in 7-zip and see everything.
- Deblock_QED_MT2.avsi is not recommended version too
Can you point me to the correct file?
- mt_masktools-25.dll is not recommended version (latest), and recommended avisynth-MT verison is 2.60 see, and this version need mt_masktools-26.dll
I didn't install any avisynth-mt. mt_masktools-25.dll *should* be from a48. I can also include mt_masktools-26.dll, there's no problem there. I only use 2.58 myself, haven't used mt yet :)
asarian
28th September 2011, 18:08
Actually, had the same issue the other week, with Der Untergang. At first (and, in hindsight, on earlier occassions) I thought MCTemporalDenoise was simply hanging; but it's not: it simply drops to like 0.08 fp/s. This was on a full 1080p source, uncropped, and with 'medium' for settings. Switching to 'low' made the problem go away, but that was obviously not what I wanted.
I experienced the issue again, soon thereafter, with The Shadow, cropped to 1040p, and also on 'medium' settings.
I eventually 'solved' the matter by simply splitting the film up vertically into 2x 540p parts (each with a 16px overlap), and processing each with MCTemporalDenoise individually, only to splice them back together later on. Not ideal, of course.
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?
jmac698
28th September 2011, 18:19
Ok, the installer version is correct masktools, latest version
58440c2964e3b8a3899d265b644d05bc *mt_masktools-25.dll
totya
28th September 2011, 18:41
Deblock_QED_MT2.avsi is not recommended version too
Can you point me to the correct file?
No, this is my already qestion (http://forum.doom9.org/showpost.php?p=1529075&postcount=542).
I didn't install any avisynth-mt. mt_masktools-25.dll *should* be from a48
But recommended version is MaskTools (v2.0a43).
I can open your installer with 7z, and I see, fftw3.dll is very outdated. New version (http://www.fftw.org/install/windows.html).
Thanks, and I see wiki (http://avisynth.org/mediawiki/MCTemporalDenoise#Required_Filters) too...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.