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
Stereodude
6th July 2013, 19:13
Is anyone having issues with MCTemporalDenoise.v1.4.20 and AVIsynth 2.6 MT (2013.03.09)? It works fine for me with AVIsynth 2.6 MT (2012.08.28).
With 2013.03.09 I get this even without invoking any of the multi-threading:
avs2pipemod[error]: Cache: Filter returned invalid response to CACHE_GETCHILD_CACHE_MODE. 708374672
(MCTemporalDenoise.v1.4.20.avsi, line 831)
Swapping out the .dll to the 2012.08.28 one gets it working again.
Also, has anyone come up with a way to actually speed this thing up? MT with 4-5 threads (1920x1080 video) is the fastest method I've found so far, but it still only uses 30-40% of my i7's CPU. Increasing threads to 6 slows it down.
Stereodude
8th July 2013, 16:16
What kind of update do you need?I'd like an update to make it much more usable with multi-threading (even basic MT). MCTD is powerful with impressive output but it's terribly inefficient on today's multicore processors. It runs a piles of processes in a single thread. MT AVIsynth helps a little with that, but the situation is far from ideal.
Also, integrating it into a single dll (or as few as possible) would be nice too instead of having to track down specific version of a whole stack of individual filters the script calls.
Boulder
8th July 2013, 16:59
MCTD uses a lot of functions which means it is difficult to multithread properly. You might want to try cretindesalpes's version of MVTools (in the Dither package), it is internally multithreaded and might help a bit.
Stereodude
8th July 2013, 18:09
MCTD uses a lot of functions which means it is difficult to multithread properly.I guess that depends on the definition of proper. Each function call could be a unique thread. Now that might not be the right way to multithread it or give ideal results, but it certainly seems like it could be multithreaded without drastic changes.
Frankly, at high level it seems obvious that at least some multithreading is possible. An analysis of every frame is done. Multiple input frames can be processed simultaneously. The math that looks across multiple frames is the tricky part, maybe that can't be easily multithreaded, but the application of the processing decisions to the output frames can also be simultaneously processed. I don't have a clue how much performance could be gained by this sort of "dumb" multithreading, but the way MCTD does things now seems like the worst case scenario.
You might want to try cretindesalpes's version of MVTools (in the Dither package), it is internally multithreaded and might help a bit.I'll have to try that later.
Boulder
8th July 2013, 18:14
Each function call could be a unique thread.It probably wouldn't help much since the next filter needs data from the previous one etc. If you have the HD space to spare, you could split your project into multiple parts and encode them separately into lossless files, and combine them in your script for the final encode. That is what I do when I need to use QTGMC on HD stuff.
Stereodude
8th July 2013, 18:30
It probably wouldn't help much since the next filter needs data from the previous one etc. If you have the HD space to spare, you could split your project into multiple parts and encode them separately into lossless files, and combine them in your script for the final encode. That is what I do when I need to use QTGMC on HD stuff.I've found QTGMC to be tolerable enough running in an x64 AVIsynth flow fed directly into x264 for 1920x1080 content.
QTGMC settings:
QTGMC( Preset="Medium", InputType=1, EZDenoise=1.0, NoisePreset="Medium", DenoiseMC=true, ChromaNoise=True, ShowNoise=false )
MCTemporalDenoise(settings="medium") is several times slower. What intermediate lossless file type are you using? Lagarith?
Boulder
8th July 2013, 18:35
x64 Avisynth would probably make it, but SEt's 32-bit build crashes at some point due to the huge memory requirements. I use ffdshow's FFV1 or HuffYUV, the latter is faster but compresses less.
Stereodude
9th July 2013, 02:01
Across how many frames does MCTD carry information? IE: If you're using it on a clip and it's processing frame 100, how far ahead and behind frame 100 has it analyzed and considered? Is that the radius : Temporal radius [1...6] parameter?
Boulder
9th July 2013, 07:48
Yes, the temporal radius tells you that.
qwerty1983
20th July 2013, 18:46
I'm editing some dvb-t recordings (h264+mp2) and i'm using this script :
.......
QTGMC(Preset="slow",TR2=2,Sharpness=0.5)
MCTemporalDenoise(settings="low",twopass=true,chroma=true)
.......
The result is somewhat over-sharpened for my own taste. What if i disable the sharp tool of MCtemporaldenoise? How can i do that?
I'm trying this : MCTemporalDenoise(settings="low",twopass=true,chroma=true,sharp=0) but i get this message 'the named argument "sharp" to MCtemporaldenoise had the wrong type'
Sorry for the naive question.
poisondeathray
20th July 2013, 19:01
I'm editing some dvb-t recordings (h264+mp2) and i'm using this script :
.......
QTGMC(Preset="slow",TR2=2,Sharpness=0.5)
MCTemporalDenoise(settings="low",twopass=true,chroma=true)
.......
The result is somewhat over-sharpened for my own taste. What if i disable the sharp tool of MCtemporaldenoise? How can i do that?
I'm trying this : MCTemporalDenoise(settings="low",twopass=true,chroma=true,sharp=0) but i get this message 'the named argument "sharp" to MCtemporaldenoise had the wrong type'
Sorry for the naive question.
sharpness is adjusted by "strength" parameter
strength=0
Yellow_
21st July 2013, 21:46
Not only the strength parameter there's also different modes, whole bunch of settings, if you read the avsi file it's all in there documented.
Or am I confusing this with Taro's 16bit stacked mod version, which is the only one I use.
**EDIT**
My bad, thought you were sharpening with MCTD. Which offers numerous modes and parameters for sharpening. :-)
cihub
13th August 2013, 12:01
Can anyone upload working MCTD with all the required plugins/scripts? Preferably both taro_06's and the one from topic starter.
matfra
13th September 2013, 14:10
Is there a new build coming soon ?
Mystery Keeper
13th September 2013, 17:19
Is there a new build coming soon ?Why would you need one?
cihub
19th September 2013, 10:57
Maybe anyone knows what this means: "Avisynth: access violation at %memory-adress% in c:\windows\system32\fftw3.dll, attempting to write to %memory-adress% (MCTemporalDenoise.v1.4.20.avs, line 700)"? Here (http://forum.doom9.org/showthread.php?p=1329288&highlight=violation#post1329288) some guy asked about this, but no one answered... It's obvious that it has something to do with FFT3DFilter, but what? BTW everything is OK with other SD/HD videos (this one is demuxed BD FHD .h264 from eac3to).
loadplugin("MCTD\AddGrainC.dll")
loadplugin("MCTD\DctFilter.dll")
loadplugin("MCTD\deblock.dll")
loadplugin("MCTD\EEDI2.dll")
loadplugin("MCTD\FFT3DFilter.dll")
loadplugin("MCTD\FFT3dGPU.dll")
loadplugin("MCTD\gradfun2db.dll")
loadplugin("MCTD\mt_masktools-26.dll")
loadplugin("MCTD\mvtools2.dll")
loadplugin("MCTD\RemoveGrainSSE3.dll")
loadplugin("MCTD\RepairSSE3.dll")
loadplugin("MCTD\SangNom.dll")
loadplugin("MCTD\TTempSmooth.dll")
import("MCTD\Deblock_QEDmod.avs")
import("MCTD\GradFun2DBmod.v1.5.avs")
import("MCTD\LSFmod.v1.9.avs")
import("MCTD\MCTemporalDenoise.v1.4.20.avs")
loadplugin("DGAVCDecode.dll")
SetMTMode(3)
avcsource("F1_T2_Video-dgavc-project.dga")
ConvertToYV12
SetMTMode(2)
MCTemporalDenoise()
It seems that the issue is with multithreaded AviSynth (SEt's). When I used 2.5.8 everything worked as it should. So the problem is from AS 2.6 + FFTW3.dll.
matfra
19th September 2013, 14:30
Why would you need one?
Sitting on our hand and wait is not good for progress. There is ALWAYS a way to upgrade or ameliorate stuff. We went on the moon ***
szabi
20th October 2013, 15:07
I got this failure message:
http://abload.de/img/mctempdenoise_failure3op0c.png
Avisynth 2.6 MT (http://forum.doom9.org/showthread.php?t=148782) is used with latest MCTemporalDenoise [v1.4.20 - Update 2010/07/02] (http://forum.doom9.org/showthread.php?p=1162204#post1162204).
Script is the following:
SetMemoryMax(512)
SetMTMode(5, 4)
DirectShowSource("d:\diectory\mymovie.mkv", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)
ConvertToYV12()
SetMTMode(2)
MCTemporalDenoise(settings="low")
crop(0, 140, 0, -140)
What is wrong?
by
szabi
manono
20th October 2013, 20:04
What is wrong?
From the FFT3DFilter doc:
You MUST put FFTW3.DLL file from this package (not fft3dfilter.dll) to some directory in path (for example, C:\WINNT\SYSTEM32).
Filter will NOT work without it!
Have you done that?
szabi
2nd November 2013, 21:53
Yes, it is copied there.
Marsu42
4th December 2013, 10:43
I got this failure message:
http://abload.de/img/mctempdenoise_failure3op0c.png
I've got the about the same error message here from line 700 ("Evaluate System Exception - Access Violation") using avisynth 2.6.0a5 non-mt ... it would be nice to get this one solved :-o
Rumbah
4th December 2013, 12:12
If you're on 64 bit Windows you must put the fftw3.dll in the C:\Windows\SysWOW64 folder, not in C:\Windows\system32 .
tObber166
19th January 2014, 08:42
Using v1.4.20 , I still get MOD16 error when using deblock=true ?
Seeing that it should have been corrected in previous versions.
Same thing in MCTemporalDenoisePP. Any idea why?
Everything else works flawlessly.
/Cheers
bcn_246
17th February 2016, 15:08
Any way to use KNLMeansCL as an alternative to fft3dGPU?
feisty2
17th February 2016, 15:11
Any way to use KNLMeansCL as an alternative to fft3dGPU?
that would be pointless
NLMeans is an even more advanced block matching algorithm than motion compensation
luigizaninoni
1st August 2016, 18:28
Any way to use KNLMeansCL as an alternative to fft3dGPU?
Yes, it can be used as a prefilter instead of fft3dfilter or ff3dGPU
See this post for more information:
http://forum.doom9.org/showthread.php?p=1498990#post1498990
The above post is about TNLmeans, but the concept is the same
The results are good, but FFt3dGPU is about 50% faster than KnlmeansCL on my lowly Intel HD4600. Quality however looks a little better to me, so it might be worth the while. Not a dramatic difference, anyway. Ah, bitrate is 2-3% less with knlmeans.
I am using the same parameters as in Smdegrain when Knlmeans is used as a prefilter, so the script is more or less:
DGSourceIM("prova.ts")
clip=last
prefilter = KNLMeansCL(h=7.0,d=1,a=1)
MCTemporalDenoise(clip,radius=1,chroma=true,strength=65,enhance=true,thsad=230,blksize=16,overlap=8,search=4,pelsearch=0,p=prefilter)
vs.:
DGSourceIM("prova.ts")
clip=last
MCTemporalDenoise(clip,sigma=3,radius=1,chroma=true,strength=65,enhance=true,thsad=230,blksize=16,overlap=8,search=4,pelsearch=0,p=prefilter)
Talking about MCTD, Chikuzen has just released a 64-bit version of DCTfilter, so at last every single plugin is available in 64bit. MCTD works beautifully in AVS+ 64, by the way
asarian
1st August 2016, 20:41
^^ Thank you for that great post, luigizaninoni!
Lathe
18th October 2016, 06:26
Sigh... I really hate to be a total newbie about this, but I TRIED to install this package in my Avisynth 2.6/plugins folder (that is the folder chosen during the install of the .exe from this thread) and when I added the script to my already running AVS file: 'MCTemporalDenoise(settings="medium")' then it threw an error.
Now, I am seriously VERY new to Avisynth, but all I saw when this install was done was that the MCTemporal.dll was in the main plugins folder and also another folder was created there called 'original packages' which LOOKED like it had all these other plugins in it. Now, was I 'done' at that point and was this MCTD actually already installed? I just saw that folder inside the plugins folder and they were all zip files, so I unzipped each one and tried to add the contents to my plugins folder. Of course there were many dlls that I already had newer versions of, so I did not copy over the ones that were already there, but I put all the other files from each zip file in the 'original packages' folder in my main plugins folder.
And, still, I get the error...
I truly do NOT understand how this was 'installed' or if it was all automatically done or if I just screwed up everything by unzipping all those new files in that 'packages' folder and putting the contents in my main plugins folder. I have NO idea...
What do I do...?
Thanks!
manono
18th October 2016, 08:01
Post your complete AviSynth script. Post the actual error message from Virtual Dub. Always do those things when asking about AviSynth script problems.
Lathe
19th October 2016, 07:05
Post your complete AviSynth script. Post the actual error message from Virtual Dub. Always do those things when asking about AviSynth script problems.
Okay I will. Also, Sharc suggested that we discuss this on one thread over at videohelp, if that is okay with you. I think this is the page:
http://forum.videohelp.com/threads/358043-A-comparison-of-AVIsynth-denoise-filters?p=2463399#post2463399
Here is the new script I tried when one of the other guys told me that the source is NOT deinterlaced, but telecined (which I really don't fully understand yet) So, I used his simpler script and took out the deinterlacing script, but it still threw an error. Here is the script:
DirectShowSource("C:\x\00000.mkv")
TFM().TDecimate()
Addborders(80,0,80,0)
I know the AR is weird, but I'm padding out the width so that when I encoded it with x264 with the CMD line it would create (close) to a 16x9 AR so that when it plays as a Blu-ray on my OPPO it will look okay. I had already done that with the older script (deinterlace + deen) and it turned out a little better, but I guess I really need to do somthing about the telecine and that's what I'm trying to figure out.
Here is the snapshot of the VD error when I tried to load this new script above:
Uh, actually it was Hello-Hello that suggested that... :)
18fps
19th October 2016, 09:38
You probably need http://avisynth.nl/index.php/TIVTC .
Lathe
19th October 2016, 21:51
You probably need http://avisynth.nl/index.php/TIVTC .
Yes, thank you kindly Bro! I did get that from someone and that was exactly what helped and was a good start! Any more discussion though, if any, will be at the thread listed above if you have any more thoughts.
Thanks again!
Stereodude
4th May 2018, 18:54
What is the possibility of MCTD supporting the >8bit color depths offered in AVIsynth+?
I attempted to test it by removing the YV12 checks that block it directly in the AVSI to see if it would work, but I didn't get too far. mt_edge gives an unsupported color space error for masktools. The masktools dll I'm using (masktools2-v2.2.14\x86\masktools2.dll) is a pinterf build that is being used by other AVS+ >8-bit capable script. I thought it might have been modified to support the >8bit color depths, but maybe I'm mistaken or not all functions of the DLL were updated.
Khun_Doug
9th May 2018, 06:41
I am encountering a problem with this script that pertains to the value of sharp. If I leave sharp as the default or set it to sharp=true, I get a script error where the mt_clamp function is called, telling me that the parameters to the function are incorrect. If I set sharp=false then the script appears to be working correctly.
Is it possible the supporting dll is an incompatible version?
pinterf
9th May 2018, 10:48
mt_edge gives an unsupported color space error for masktools. The masktools dll I'm using (masktools2-v2.2.14\x86\masktools2.dll) is a pinterf build that is being used by other AVS+ >8-bit capable script. I thought it might have been modified to support the >8bit color depths, but maybe I'm mistaken or not all functions of the DLL were updated.
Check if no other masktools version exists, avisynth probably finds the old one. Running "avsmeter -avsinfo" could help you in listing your dlls. Masktools2 filters are supporting 8-32 bit formats.
Stereodude
9th May 2018, 12:38
Check if no other masktools version exists, avisynth probably finds the old one. Running "avsmeter -avsinfo" could help you in listing your dlls. Masktools2 filters are supporting 8-32 bit formats.
You were right. There was another older version getting loaded. Stopping that got me past that, but some other scripts used by MCTD complained about the lack of a YV12 clip. Commenting out those checks them out ultimately caused the whole thing to not just sit and spin locked up. I need to take a closer look at it when I have more time.
lansing
9th May 2018, 16:34
You were right. There was another older version getting loaded. Stopping that got me past that, but some other scripts used by MCTD complained about the lack of a YV12 clip. Commenting out those checks them out ultimately caused the whole thing to not just sit and spin locked up. I need to take a closer look at it when I have more time.
Do not mod the script if you don't know what you're doing.
The error you're getting is telling you that the filter need video in yv12 colorspace, so all you need to do is convert it to yv12
avisource("abc.avi")
converttoyv12()
mctd()
Stereodude
9th May 2018, 21:35
Do not mod the script if you don't know what you're doing.
The error you're getting is telling you that the filter need video in yv12 colorspace, so all you need to do is convert it to yv12
avisource("abc.avi")
converttoyv12()
mctd()
Uh, that totally defeats the idea of having high bit depth support. I'm trying to see what part(s) of MCTD are incompatible with the new AVIsynth+ >8-bit color depth formats. I can only do that if I eliminate the hard scripted checks for YV12 color space. If the underlying .dll has been updated, like masktools2 or mvtools2 the restrictions in the script may no longer be valid.
Khun_Doug
10th May 2018, 21:57
Is there anyone on this list that can help me debug or diagnose why this script (filter) crashes if I allow sharp to be true. I have checked my version of masktools2 and I have the latest. Even using some older versions I get the same error. Sharp set to false the script operates.
When set to true there is an error where the mt_clamp function is called. The error tells me invalid arguments to the function mt_clamp. To be sure mt_clamp works on my install I tested LimitedSharpenFaster that also uses the mt_clamp function. I used the same source file. For that script it works fine, no errors. I would conclude I have the correct version of masktools2.
Any help in diagnosing this would be greatly appreciated.
Stereodude
10th May 2018, 22:19
I've never tried it before today, but I was able to set sharp=true without any error message and get an image back from the filter. I'm using v1.4.20 of MCTD & AviSynthPlus-MT-r2664-with-vc_redist. Most of my filters are old from prior installs of AVIsynth going back many years.
Khun_Doug
11th May 2018, 00:57
According to the settings/defaults grid, sharp is always defaulted to true. The only reason I tested with sharp set to false is because the script crashes when set to true. I looked through the code at the line in question and followed the execution flow. Once I saw the test for sharp leads to the failing statement I tried with false and the mt_clamp statement is bypassed. Doing that at least allows the script and filter to function.
So far I have tested masktools2 version 2.2.13 and 2.2.14. I even grabbed the version specifically mentioned in the comments of the script, version 2.0a48, and that also fails. At the very top of the script the version information reads "v1.4.20 by "LaTo INV.", mod4.2 by 06_taro", and the date is 09 Feb 2013.
The piece of code that fails is this:
shrp = (sharp==false) ? smE
\ : (Tlimit==true) ? Sclp.mt_clamp(Tmax, Tmin, Tovershoot, Tovershoot, U=1, V=1)
Since this is obviously working for most, it is possible there is another function or library that is involved. I am using AviSynth+ version 2580. The CPU is an I7-6850K on Windows 10 64 bit, 64GB RAM.
Any diagnostic or trace tips are very welcome. I would love to see this work so I can do some testing and comparisons.
lansing
11th May 2018, 04:03
According to the settings/defaults grid, sharp is always defaulted to true. The only reason I tested with sharp set to false is because the script crashes when set to true. I looked through the code at the line in question and followed the execution flow. Once I saw the test for sharp leads to the failing statement I tried with false and the mt_clamp statement is bypassed. Doing that at least allows the script and filter to function.
So far I have tested masktools2 version 2.2.13 and 2.2.14. I even grabbed the version specifically mentioned in the comments of the script, version 2.0a48, and that also fails. At the very top of the script the version information reads "v1.4.20 by "LaTo INV.", mod4.2 by 06_taro", and the date is 09 Feb 2013.
The piece of code that fails is this:
shrp = (sharp==false) ? smE
\ : (Tlimit==true) ? Sclp.mt_clamp(Tmax, Tmin, Tovershoot, Tovershoot, U=1, V=1)
Since this is obviously working for most, it is possible there is another function or library that is involved. I am using AviSynth+ version 2580. The CPU is an I7-6850K on Windows 10 64 bit, 64GB RAM.
Any diagnostic or trace tips are very welcome. I would love to see this work so I can do some testing and comparisons.
Are you using avpmod for your preview?
Khun_Doug
11th May 2018, 09:17
I have been using AvsPmod (32 bit) for the previews. I also tried using the .avs script as input to VirtualDub and I get the same error.
As additional information, I updated AviSynth+ to the latest version this evening, AviSynthPlus-MT-r2664. The results are the same.
Khun_Doug
11th May 2018, 20:00
As a thought that perhaps using 64 bit plugins versus 32 bit might resolve this, I changed all the loadplugin commands to the 64 bit equivalents. The script opens properly but as soon as I switch to sharp=true I get the same error, even in a 64 bit config. So the problem is following the PC and source, not the plugins.
Khun_Doug
12th May 2018, 05:12
One final update. I downloaded avsmeter and used avsmeter -avsinfo, The plugins are listing as expected so there are no sneak 64 bit plugins when I am expecting 32 bit. I have tried changing from dgdecode.dll to ffms2.dll and get the same error. I then tried a different source and still get the same error. If I use the filter with all defaults (no parameters), or any parameters, as long as sharp is true, the filter crashes with an error, invalid arguments to function mt_clamp. Set sharp to false and it operates. I have tested another filter that uses mt_clamp and that filter is not crashing.
Any other suggestions or debugging ideas? I'm about to give up wanting to test this filter.
MysteryX
12th May 2018, 06:34
invalid arguments to function mt_clamp
That's not a crash but a syntax error. The other script uses the right syntax. Perhaps it changed between versions of that DLL. You can look up where it is being referenced and see whether it corresponds the doc of that function. It's possible it was written for an older version of the DLL and the syntax changed slightly in a newer version.
Taurus
12th May 2018, 07:54
Any other suggestions or debugging ideas? I'm about to give up wanting to test this filter.
Out of curiosity I tested MCTD (v1.4.20) again with all the required plugins in an uptodate status.
No fiddling around with older or depreciated dll's.
Worked right out of the box with sharp=true.
I would happily test the Taro mod, but cant find it.
The links in the thread to the script and advised plugins gave me zero bytes downloads.
So I gave up.
This is on avisynth 2.606 32bit MT.
Did not test on 8bit->.... just plain yv12 :D
StainlessS
12th May 2018, 10:01
That's not a crash but a syntax error.
MysteryX is totally correct there.
Khun_Doug, what is your exact calling script, I shall try to assist.
StainlessS
12th May 2018, 10:21
I've never used this script before, and after getting it and also GradFun2DBmod.v1.5.avsi,
tried this
Import("McTemporalDenoise.avs")
Import("LSFmod.avs")
Import("GradFun2DBmod.v1.5.avsi")
Colorbars.killaudio.ConvertToYV12
McTemporalDenoise(Sharp=true)
No error, have you made some copy/ paste error (in any of your downloaded scripts).
EDIT: Dont know offhand if I have all of the required scripts/plugs, but as above, it works without any problems at all.
EDIT: I'm using the script from the Wiki (from 2010, not the 2013 taro version, there may well be a reason the the 2010 version is on wiki):-
http://avisynth.nl/index.php/MCTemporalDenoise
EDIT: You missed out a part of the below statement, check if yours is the same (missing bit in blue)
shrp = (sharp==false) ? smE
\ : (Tlimit==true) ? Sclp.mt_clamp(Tmax, Tmin, Tovershoot, Tovershoot, U=1, V=1)
\ : Sclp
sL = (sharp==true&&adapt==true) ? mt_merge(smE,shrp,mL,U=chr21,V=chr21)
\ : shrp.mergechroma(smE)
EDIT: No, if above missing, then outputs something like "Script error, expecting ':'".
MysteryX
12th May 2018, 18:16
I want to see the line(s) where mt_clamp is being called.
According to doc
http://manao4.free.fr/mt_masktools.html#mt_clamp
mt_clamp : clip c, clip bright_limit, clip dark_limit, int overshoot(0), int undershoot(0)
Forces the value of the first clip to be between bright_limit + overshoot and dark_limit - undershoot.
Gives unwanted results if bright_limit + overshoot < dark_limit - undershoot.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.