View Full Version : MCTemporalDenoise [v1.4.20 - Update 2010/07/02]


LaTo
23rd July 2008, 16:14
####################################################################################################################################
### ###
### Motion-Compensated Temporal Denoise: MCTemporalDenoise() ###
### ###
### v1.4.20 by "LaTo INV." ###
### ###
### 2 July 2010 ###
### ###
####################################################################################################################################
###
###
###
### /!\ Needed filters: MVTools (v2.5.10), MaskTools (v2.0a43),
### ------------------- LSFmod (v1.9), FFT3Dgpu (v0.8.2.7) or FFT3Dfilter (v2.1.1),
### TTempsmooth (v0.9.4), RemoveGrain + Repair (v1.0PR),
### Deblock (v1.2), Deblock_QED (25.may.2010), DctFilter (v0.0.1.4),
### EEDI2 (v0.9.2), SangNom (v1.0beta),
### GradFun2DBmod (v1.5), GradFun2db (v1.0), AddGrainC (v1.5).
###
###
###
### USAGE: MCTemporalDenoise(i, radius, sigma, twopass, useTTmpSm, limit, limit2, post, chroma, interlaced,
### sharp, adapt, strength, SHmode, SHmethod, Slimit, Sovershoot, Tlimit, Tovershoot,
### protect, cutoff, threshold, maxdiff,
### AA, useEEDI2, reduc, maxd, AAthr, method,
### deblock, useQED, quant1, quant2,
### edgeclean, ECrad, ECthr, ECmode,
### stabilize, maxr, TTstr,
### enhance, GFthr, AGstr, bias, temp,
### bwbh, owoh, blksize, overlap,
### GPU, fixband, bt, ncpu, precision,
### thSAD, thSAD2, thSCD1, thSCD2,
### truemotion, MVglobal, pel, pelsearch, search, searchparam, MVsharp, DCT,
### p, settings,
### show, screenW, screenH)
###
###
###
### MCTemporalDenoise's Post Processor :
### ------------------------------------
###
### USAGE: MCTemporalDenoisePP( denoised, source,
### sharp, adapt, strength, SHmode, SHmethod, Slimit, Sovershoot, Tlimit, Tovershoot,
### protect, cutoff, threshold, maxdiff,
### AA, useEEDI2, reduc, maxd, AAthr, method,
### deblock, useQED, quant1, quant2,
### edgeclean, ECrad, ECthr, ECmode,
### stabilize, maxr, TTstr,
### enhance, GFthr, AGstr, bias, temp,
### chroma, settings )
###
### This is the post-processor used internally in MCTemporalDenoise.
### It can be called externally if you want some specific functionality without denoising.
###
### Parameters & defaults are the same as MCTemporalDenoise.
### By default, all filters are OFF!
###
### "Sharp" & "Protect" options need 2 inputs:
### EX: source=last
### denoised=source.FFT3Dfilter()
### MCTemporalDenoisePP(denoised,source,...)
### The others only need "denoised".
###
####################################################################################################################################


Update 2010.07.02 : MCTemporalDenoise v1.4.20 (http://latoninf.free.fr/d9/MCTD/MCTemporalDenoise.v1.4.20.avsi)


v1.4.20 :
tweaked some settings
updated QED_Deblock version

v1.4.18 :
fixed anti-aliasing PP (was broken since v1.4.07)
updated MVTools-MaskTools-AddgrainC version

v1.4.16 :
added switch to avoid loading of unused filters
fixed a bug in anti-aliasing part

v1.4.08 :
fixed MOD16 warning when deblock=true

v1.4.07 :
improved masking in PP-stage
cleaned code (cosmetic)

v1.4.00 :
fixed bug with maxdiff=0
fixed speed issue in MCTemporalDenoisePP (+20%)
added "deblock" to MCTemporalDenoisePP
changed "flat" to "enhance"
cleaned and optimized all the code
changed some settings
updated documentation

v1.3.09 :
added MOD4 restriction
updated MVTools version

v1.3.00 :
added a post-denoising stage (see "post")
fixed a bug with fixFFT3D and defined p clip
changed "very high" to be less insane
renamed fixFFT3D to fixband
cleaned some stuff
adapted to LSFmod v1.8

v1.2.02 :
changed default gpu=true to gpu=false (set gpu=true if you want speed!!!)
adapted to LSFmod v1.7

v1.2.00 :
adapted for LSFmod v1.6 & GradFun2DBmod v1.3
changed sharp int->bool (deleted sharp=1)

v1.1.27 :
fixed a bug in MCTemporalDenoisePP with chroma=false
adapted for LSFmod v1.5

v1.1.26:
changed "flat" post-processing to use GradFun2DBmod
changed int->float for AGstr
fixed a small bug in AA

v1.1.24:
fixed a chroma bug with PP

v1.1.23:
adapted script for MvTools v2.3.0 (deleted MT & idx parameters)
changed MCTemporalDenoisePP's defaults (now the same as MCTD)
deleted safe parameter (slow & useless)
changed some minor things

v1.0.03:
fixed a bug in MCTemporalDenoisePP

v1.0.02:
changed defaults according to new LSFmod v1.2

v1.0.01:
fixed a speed issue in MCTemporalDenoisePP (introduced in beta5)
changed documentation about MCTemporalDenoisePP

v1.0.00:
first stable version
changed sharp=2, need LSFmod v1.0 !
fix a bug introduced in beta5

v1.0beta5:
added new sharpening routine & deleted LSF (SHmode,Slimit,Sovershoot,Tlimit,Tovershoot)
changed some code (cosmetic)

v1.0beta4:
changed some descriptions & blksize default (submitted by Didée)
added auto blksize setting (16:HD & 8:SD, if you want speed use 16)

v1.0beta3:
all post-processing filters are now usable as a standalone function (MCTemporalDenoisePP)
added MC-antialiasing (see reduc parameter)

v1.0beta2:
fixed MOD16 restriction (effective only if deblock=true)
small speedup/fix with limit>0 and/or protect=true&maxdiff>0
added warning about GPU & MT in the documentation

v1.0beta1:
changed name Udegrain --> MCTemporalDenoise (to be more specific and avoid confusion with chroma)
added the choice to use MVDegrain instead of MVCompensate+TTempSmooth (since the chroma bug in MVDegrain is fixed)
added twopass option to do the denoising job in two stage (very effective but slow)
added MT parameter for MVTools (be careful +- unstable)
added fixFFT3D parameter to prevent banding/posterize with limit=-1
added stabilize options (stabilize,maxr,TTstr)
added deblock options (deblock,useQED,quant1,quant2)
added new presets "light"(=low)/"heavy"(=medium) --> 5 presets (very high is 'a bit' extrem)
added check/warning for some settings
added thSAD2 & limit2 parameters for twopass=true
added overrange parameter for controling sharpness (useful for sharpening more than the source)
changed +- much code to implement twopass/MVdegrain/MT, should be bug free (I hope)
changed sharp->MVsharp & post->sharp
changed "light Smode4" --> LimitedSharpenFaster for sharp=2 (strength,Smode,soft,overshoot)
reduce max radius to 6
optimize chroma in PP stage (+20% with all PP on)
fix a bug with external p clip
fix a bug in Star&Bright Point Protection with maxdiff>0
added YV12&MOD16 restriction
changed some settings due to new presets
restriction when using MT=true: bt=1 in FFT3Dgpu & plane=4 in MVDegrainMulti (will be removed when fixed)

v0.9.05a:
changed version number: vX.XX branch -> v0.X.XX branch
added AA options (AA,useEEDI2,maxd,AAthr,method)
changed dering --> edgeclean: you can now use your own script (see docs)
fix bug with show=true
fix bug with chroma in PP stage
fix omission with chroma=false in MVanalyse
changed some settings
added changelog in .avsi

v0.9.01a:
added adapt & SS for sharpening
added dering option (dering, DRGrad, DRGthr, RGmode)
added flat areas processing (flat, AGstr, GFthr, bias)
added modX(=blocksize) checking
changed some default settings
updated documentation in .avsi

v0.8.08c:
fix bug with chroma=false & interlaced=true

v0.8.08b:
added mocomp contra-sharpening (basic contra-sharpening always usable)

v0.7.29a:
added star & bright points protection
changed some default options
added more options for FFT3D
added YV12 checking

v0.7.25a:
set chroma=false for light settings
added temporal limiter for sharpening

v0.7.24a:
replace blankclip by nop

v0.7.23a:
first public release


http://latoninf.free.fr/d9/MCTD/show_mini.png (http://latoninf.free.fr/d9/MCTD/show.png)

LaTo
23rd July 2008, 16:14
Speed comparison: (with blocksize=8 & overlap=4)

MCTemporalDenoise(settings="very low") : 9.4fps
MCTemporalDenoise(settings="low") : 4.8fps
MCTemporalDenoise(settings="medium") : 3.4fps
MCTemporalDenoise(settings="high") : 2.6fps
MCTemporalDenoise(settings="very high") : 0.5fps

GTDegrain() @default : 4.1fps
MC_Spuds() @default : 3.6fps
TemporalDegrain() @default : 2.8fps



Comparison on "normal" movie : (v1.0.00)

Source (http://latoninf.free.fr/d9/MCTD/movie_0SRC.png)

MCTemporalDenoise(settings="very low") (http://latoninf.free.fr/d9/MCTD/movie_1MCTDverylow.png)

MCTemporalDenoise(settings="low") (http://latoninf.free.fr/d9/MCTD/movie_2MCTDlow.png)

MCTemporalDenoise(settings="medium") (http://latoninf.free.fr/d9/MCTD/movie_3MCTDmedium.png)



Comparison on "300" : (v1.0.00)

Source (http://latoninf.free.fr/d9/MCTD/300_0SRC.png)

MCTemporalDenoise(settings="medium") (http://latoninf.free.fr/d9/MCTD/300_1MCTDmedium.png)

MCTemporalDenoise(settings="high") (http://latoninf.free.fr/d9/MCTD/300_2MCTDhigh.png)

MCTemporalDenoise(settings="very high") (http://latoninf.free.fr/d9/MCTD/300_3MCTDveryhigh.png)


Feedback please ;)

g-force
23rd July 2008, 17:47
Wow! beats the crap out of mine, and gives Didée's a run for it's money!

So let me get this straight. You are getting speed improvement by not doing a second degrain stage. So you've compensated the decreased degraining by either turning off truemotion and repairing the compensated frames (light mode) or not post sharpening (heavy mode). Am I reading the script correctly? If so, these are great ideas!

Some thoughts: might want to put some more options in to do the second degrain stage (I know it will slow it down, just don't make it the default)

Also, and this is more a question than anything, isn't "NOP()" faster than "BlankClip"? Seems like it should be, but I don't know for sure. It also seems like it would use less memory, since if a variable isn't needed, it isn't stored as a blank clip. Probably nothing, but might be worth looking into.

One more question. Is the Mask really necessary? isn't everything taken care of by the THSAD in MVCompensate already? I could see this if you weren't repairing after the degrain, but since you are (in the last part of your "Degrain" section) choosing either the degrained output or the prefilter depending on which is closest to the source, you really shouldn't need the mask.

These are just thoughts off the top of my head, and I love this contribution you have made!

-G

LaTo
23rd July 2008, 20:49
So let me get this straight. You are getting speed improvement by not doing a second degrain stage. So you've compensated the decreased degraining by either turning off truemotion and repairing the compensated frames (light mode) or not post sharpening (heavy mode). Am I reading the script correctly? If so, these are great ideas!
Yes, it's correct.

Some thoughts: might want to put some more options in to do the second degrain stage (I know it will slow it down, just don't make it the default)
Maybe, if some people request this... (because it's enough for my use)

Also, and this is more a question than anything, isn't "NOP()" faster than "BlankClip"? Seems like it should be, but I don't know for sure. It also seems like it would use less memory, since if a variable isn't needed, it isn't stored as a blank clip. Probably nothing, but might be worth looking into.
I don't know, some other people could help for this... (I will test tomorrow)

One more question. Is the Mask really necessary? isn't everything taken care of by the THSAD in MVCompensate already? I could see this if you weren't repairing after the degrain, but since you are (in the last part of your "Degrain" section) choosing either the degrained output or the prefilter depending on which is closest to the source, you really shouldn't need the mask.
Yes but repair with prefilter is off by default because it make some artefacts on my stuff.


Let me know if you have any suggestions ;)

Gavino
23rd July 2008, 21:37
Also, and this is more a question than anything, isn't "NOP()" faster than "BlankClip"? Seems like it should be, but I don't know for sure. It also seems like it would use less memory, since if a variable isn't needed, it isn't stored as a blank clip.
I don't know, some other people could help for this.
g-force is correct. Each use of BlankClip will use up memory.
You could assign a single instance of BlankClip to a variable and use that instead, but g-force's suggestion of NOP is the best solution. It also has the merit that if there is something wrong with your logic and the variable ends up getting used as a clip, you will get an error message.

g-force
23rd July 2008, 22:25
Yes but repair with prefilter is off by default because it make some artefacts on my stuff.



Oh, just noticed that. I hate to put the burden back on you, because it really should be up to me to see if I can break your script, but I'd be curious to see an example of the artifacts that the "choose between prefilter or degrain according to whichever is closest to the source" that your approach helps. I'm not saying that you're wrong, I'm just surprised and curious, that's all.

Okay, another suggestion: I just noticed that you have "bt" set to 1 on the fft filter. Just to warn you, Didée's gonna come down hard on you for this one. Might want to put an option in to allow switching this to the other temporal settings as well. This will help with low-frequency flickering due to heavy grain. I only know this by the experience of hounding by Didée. Plus, it seems that changing "bt" to 5 doesn't slow down the filter much.

Yet another suggestion: how about adding a temporal based limiter for the sharpening? Like this:

pshrp = last
pmax = source.MT_Logic(b1c,"max").MT_Logic(f1c,"max")
pmin = source.MT_Logic(b1c,"min").MT_Logic(f1c,"min")
RemoveGrain(3,-1)
MT_MakeDiff(last,last.RemoveGrain(12,-1))
MT_lutxy(pshrp,last,"y 128 - 1.5 * x +",U=2,V=2)
MT_Clamp(pmax,pmin,1,1,U=2,V=2)

That's all for now... Nice work!

-G

LaTo
24th July 2008, 08:22
Oh, just noticed that. I hate to put the burden back on you, because it really should be up to me to see if I can break your script, but I'd be curious to see an example of the artifacts that the "choose between prefilter or degrain according to whichever is closest to the source" that your approach helps. I'm not saying that you're wrong, I'm just surprised and curious, that's all.
it's appear with high sigma value for fft3d, it's like a flat solid color (because of heavy filtering)... I will make screenshot later. (the best is to use another clip for this job and not the prefilter clip)

Okay, another suggestion: I just noticed that you have "bt" set to 1 on the fft filter. Just to warn you, Didée's gonna come down hard on you for this one. Might want to put an option in to allow switching this to the other temporal settings as well. This will help with low-frequency flickering due to heavy grain. I only know this by the experience of hounding by Didée. Plus, it seems that changing "bt" to 5 doesn't slow down the filter much.
So, enable it by default for you... As I said, for me it's enough... :cool:


Yet another suggestion: how about adding a temporal based limiter for the sharpening? Like this:

pshrp = last
pmax = source.MT_Logic(b1c,"max").MT_Logic(f1c,"max")
pmin = source.MT_Logic(b1c,"min").MT_Logic(f1c,"min")
RemoveGrain(3,-1)
MT_MakeDiff(last,last.RemoveGrain(12,-1))
MT_lutxy(pshrp,last,"y 128 - 1.5 * x +",U=2,V=2)
MT_Clamp(pmax,pmin,1,1,U=2,V=2)
Why not...

LaTo
24th July 2008, 08:25
g-force is correct. Each use of BlankClip will use up memory.
You could assign a single instance of BlankClip to a variable and use that instead, but g-force's suggestion of NOP is the best solution. It also has the merit that if there is something wrong with your logic and the variable ends up getting used as a clip, you will get an error message.

Thanks :thanks:

Didée
24th July 2008, 10:39
Didée's gonna come down hard on you for this one.
Not at all. Right now I'm leaving for holiday:p -- Bye! :)

g-force
24th July 2008, 15:46
(the best is to use another clip for this job and not the prefilter clip)


I'd love to see that screenshot, but I agree that that heavy of a prefilter is not the best choice to use as the output sometimes.

-G

LaTo
24th July 2008, 17:45
I'd love to see that screenshot

Here with high sigma value:

Limit = -1 (http://latoninf.free.fr/udegrain/sigma20.limitON.png)
Limit = 0 (http://latoninf.free.fr/udegrain/sigma20.limitOFF.png)

Amrit
25th July 2008, 00:05
WOW

this is amazing, I might start denoising a little bit more now

check this out

Before
http://latoninf.free.fr/udegrain/movie_SRC.png
After (Light)
http://latoninf.free.fr/udegrain/movie_UDlight.png

SOME details are lost but compared to other denoisers this has preserved more than them.

CHEERS!!

Ranguvar
25th July 2008, 03:57
The only complaint I have is that eyes are messed with... When there's a very small white point in someone's eye? With chroma on, it seems to turn blue. With chroma off, it swells.

Otherwise, nice work :)

ficofico
25th July 2008, 10:12
My eyes can see only lost of detail, the above source for me it's quite perfect, no need to use any filter

LaTo
25th July 2008, 16:44
Update 2008.07.25
7.25a:
set chroma=false for light settings
added temporal limiter for sharpening

Ranguvar
25th July 2008, 19:01
Some notes for anyone trying to multithread this script with SetMTMode(). This is current as of v7.25a. LaTo, feel free to add this to the OP.


Call UDegrain from your script in mode 2.

If GPU=true (which is default), you must SetMTMode(4) before the PREFILTER block. You can SetMTMode(2) after it. Note that this is after I modified bt=1 in the fft3dgpu line to bt=3; if bt=1 you may have no problems running without mode 4. I don't know.

Under the DEGRAIN block, if limit==-1 (which is default), the lines:
DD = (limit==-1) ? mt_lutxy(pD,smD,"x 128 - abs y 128 - abs < x y ?",U=3,V=3)
\ : (limit>0) ? mt_lut(smD,"x 128 "+string(limit)+" - < 128 "+string(limit)+" - x 128 "+string(limit)+" + > 128 "+string(limit)+" + x ? ?",U=3,V=3)
\ : NOP()
must run in mode 3. You can go back to mode 2 after.

Two further notes... Some lines might run in mode 1, which uses even less RAM but should be the same speed as mode 2. I have plenty of RAM, so I haven't tested that. Also, I did not test very many features of UDegrain, some might require additional tuning... I only used light settings, radius=1, chroma, and GPU.

martino
25th July 2008, 19:10
The only complaint I have is that eyes are messed with... When there's a very small white point in someone's eye?
I think that's just how MVDegrain works. Try to apply it on some anime with scenes from space and you'll see most of the stars gone.

Ranguvar
25th July 2008, 19:13
I think that's just how MVDegrain works. Try to apply it on some anime with scenes from space and you'll see most of the stars gone.

MC_Spuds has a parameter called starfield that tries to preserve such bright points, though... adding something similar to UDegrain would be fantastic :)

martino
25th July 2008, 19:29
It shouldn't be hard, since what it basically does is create a mask (plus that you'd have to hunt down the other functions that it uses from the script and the required variables). I don't particularly remember why, but when I was writing a function of my own it didn't work as I expected it to have, so I ended up doing a crappy one for my own need. I wish I could remember a bit more about it now...

FUNCTION Starmask(clip input, bool anime, clip nullclp, float thstar, int lumathres)
...
maskstar = ConditionalFilter(maskstarvalidate, nullclp.mt_binarize(upper=false), maskstar.mt_inflate().mt_inflate, "AverageLuma()", "<", string(thStar),false)

LaTo
25th July 2008, 20:44
MC_Spuds has a parameter called starfield that tries to preserve such bright points, though... adding something similar to UDegrain would be fantastic :)
Maybe in the next version ;)

foxyshadis
26th July 2008, 01:22
Curious, if it's titled Ultimate Degrain, why not just call it UltimateDegrain() instead of UDegrain? UDegrain kind of connotates something that works with the chroma channels.

LaTo
26th July 2008, 08:33
Curious, if it's titled Ultimate Degrain, why not just call it UltimateDegrain() instead of UDegrain? UDegrain kind of connotates something that works with the chroma channels.
Ultimate? Xtrem? Awesome? Of Death?

UXADdegrain :eek: :rolleyes:

if someone have a better name... :D

(MCdegrain/MCttempsmooth?)

sarmano
26th July 2008, 17:54
LaTo
Good job!
This script much better then another in public zone, but a few moment:
- too slow on heavy mode
- didn't working with 1080p video with radius more then 2 (with x264)

LaTo
27th July 2008, 10:36
- didn't working with 1080p video with radius more then 2 (with x264)
maybe you don't have enough GPUram (memory) for 1080p, try with gpu=false...

from fft3dgpu readme:
Q: What does it mean when I get a popup box Unexpected error encountered with Error Code: D3DERR_OUTOFVIDEOMEMORY.

A: It means that fft3dgpu needs more memory than there are availebol on the graphics card. So either you will have to upgrade or try lowering the resolution, precision, bt,bh,bw,ow,oh or use usefloat16=true or mode 0 or 2

LaTo
27th July 2008, 20:46
I think that's just how MVDegrain works. Try to apply it on some anime with scenes from space and you'll see most of the stars gone.

can you provide a sample to test this? :thanks:

martino
28th July 2008, 00:07
http://www.mediafire.com/?ve3lxmm9j1f (50MB, telecined)

Enjoy.

Ranguvar
28th July 2008, 03:23
Feature request, a simple parameter to control how many motion vectors are used :) Also parameters for controlling bt, precision, and ncpu in FFT3DFilter/FFT3DFilter, but those are easy to set manually.

LaTo
29th July 2008, 14:15
v7.29a:
added star & bright points protection (default: off, see "protect")
changed some default options
added more options for FFT3D
added YV12 checking
For star & bright points protection:

Source (http://latoninf.free.fr/udegrain/starSRC.png)
Protect=false (default) (http://latoninf.free.fr/udegrain/starOFF.png)
Protect=true (http://latoninf.free.fr/udegrain/starON.png)

I haven't tested much this option (only on this source), so default settings need to be tweaked a little... I haven't be abble to reproduce the star loss with martino's sample, maybe with very high settings :confused:
Moreover I have not watched at MC_Spuds starfield parameter, maybe it's different but it works well (screenshot above) ;)

g-force
30th July 2008, 21:56
LaTo,

I see you added the temporal Min/Max limiting to the sharpening. I don't think you should limit with both "contra" and the temporal min/max, it really should be one or the other. Otherwise, after "contra" limiting, the temporal min/max limit rarely does anything because the contra limits much more than the min/max.

-G

Nikos
2nd August 2008, 16:03
LaTo, with MoComp'ed Contra-Sharpening we must use advanced sharpening routines, not just the simple 3x3 kernel Contra-Sharpening.
Read Didie's long explanation here (http://forum.doom9.org/showthread.php?p=1104251#post1104251[/url)

In my opinion, the Smode 4 from LSF is more suited.

strength = default(strength, 100)
Str=string(float(strength)/100.0)
mt_lutxy(clp, clp.RemoveGrain(11,-1), "x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+"
\ * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?")


In any case thanks for your hard work.

LaTo
2nd August 2008, 18:00
LaTo, with MoComp'ed Contra-Sharpening we must use advanced sharpening routines, not just the simple 3x3 kernel Contra-Sharpening.
Read Didie's long explanation here (http://forum.doom9.org/showthread.php?p=1104251#post1104251[/url)

In my opinion, the Smode 4 from LSF is more suited.

strength = default(strength, 100)
Str=string(float(strength)/100.0)
mt_lutxy(clp, clp.RemoveGrain(11,-1), "x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+"
\ * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?")


In any case thanks for your hard work.
Yes, it was already on my todo list... Thanks ;)

Honeyko
2nd August 2008, 21:22
For a real torture test, try it on this clip (http://tinyurl.com/5646r2).

...Can it remove all the grain in the second scene without introducing artifacts in the dark color-gradient area over the guy's left shoulder in the first scene?

LaTo
3rd August 2008, 05:56
For a real torture test, try it on this clip (http://tinyurl.com/5646r2).

...Can it remove all the grain in the second scene without introducing artifacts in the dark color-gradient area over the guy's left shoulder in the first scene?

udegrain(radius=3,settings="heavy") remove most of the grain...

Honeyko
3rd August 2008, 06:45
udegrain(radius=3,settings="heavy") remove most of the grain...

After finishing, is there any garbage over the guy's left shoulder in the first scene?

(How about radius=7? That is some fat-ass grains.... ;-)

LaTo
3rd August 2008, 09:28
After finishing, is there any garbage over the guy's left shoulder in the first scene?

(How about radius=7? That is some fat-ass grains.... ;-)

I don't know, test by yourself...

LaTo
3rd August 2008, 10:55
v8.08a:
added mocomp contra-sharpening (basic contra-sharpening always usable) -> see readme for usage

Nikos
3rd August 2008, 12:42
In my opinion the s4R = (post==2) ? repair(s4,smB,1,-1,-1).Mergechroma(s4) : NOP() line is not suited because now we have almost the same effect as simple contra-sharpening.
If you want to repair a little try another mode, not the 1.
The soothe(xx) is more appropriate here.

LaTo
3rd August 2008, 14:03
In my opinion the s4R = (post==2) ? repair(s4,smB,1,-1,-1).Mergechroma(s4) : NOP() line is not suited because now we have almost the same effect as simple contra-sharpening.
fixed.

Nikos
3rd August 2008, 19:05
Lato according to Didie's explanation i think for the "mocomp contra-sharpening" radius=2 it's enough.

buzzqw
4th August 2008, 13:52
Hi LaTo

i would like to add your Udegrain script to automkv, so first of all i will ask permission to include

second question: could you suggest 4 default parameters usage (light grain/medium/heavy/sharp/... whatelse this script is capable...) ?

thanks

BHH

ankurs
4th August 2008, 15:10
from another thread of mine : http://forum.doom9.org/showpost.php?p=1166451&postcount=4

any idea why ?

g-force
4th August 2008, 22:23
LaTo,

You're re-introducing a lot of unnecessary noise with your MCsharpen routine. You really should do a minblur before the difference blur. Like this:

pshrp = last
pmax = source.MT_Logic(bw1,"max").MT_Logic(fw1,"max")
pmin = source.MT_Logic(bw1,"min").MT_Logic(fw1,"min")

rg11d = MT_MakeDiff(pshrp,pshrp.RemoveGrain(12,-1))
MT_MakeDiff(pshrp,pshrp.RemoveGrain(4,-1))
MT_LUTxy(rg11d,last,"x 128 - y 128 - * 0 < 128 x 128 - abs y 128 - abs < x y ? ?")
MT_MakeDiff(pshrp,last)
MT_MakeDiff(last,last.RemoveGrain(12,-1))
MT_LUTxy(pshrp,last,"y 128 - 1.5 * x +",chroma="copy first")

#mt_lutxy(last,last.removegrain(11,-1), "x y == x x x y - abs 16 / 1 2 / ^ 16 * "+string(strength)+" * x y - 2 ^ x y - 2 ^ "+string(strength)+" 100 * 25 / + / * x y - x y - abs / * + ?", U=2, V=2)

MT_Clamp(last,pmax,pmin,0,0,chroma="copy first")

The commented out line is what you have currently.

-G

LaTo
10th August 2008, 09:06
Hi LaTo

i would like to add your Udegrain script to automkv, so first of all i will ask permission to include

No problem ;)

second question: could you suggest 4 default parameters usage (light grain/medium/heavy/sharp/... whatelse this script is capable...) ?
light = Udegrain(settings="light")
heavy = Udegrain(settings="heavy")
:devil:

After you only need to tweak the radius...

LaTo
10th August 2008, 09:07
You're re-introducing a lot of unnecessary noise with your MCsharpen routine. You really should do a minblur before the difference blur. Like this:
The old mode is always here, the 2 method are different... So don't expect the same result between these.

bairradino
25th August 2008, 16:46
Is this function suited to interlaced DV video?

LaTo
25th August 2008, 16:56
Is this function suited to interlaced DV video?
yes, just set interlaced=true

Soulhunter
25th August 2008, 19:45
Nice function! :]

Blue_MiSfit
25th August 2008, 20:03
Any chance of modifying this to work with the new fork of MVTools?

~MiSfit

bairradino
25th August 2008, 20:56
I'm trying this function with the following codeloadplugin("c:\program files\avisynth 2.5\plugins\mvtools.dll")

AviSource("c:\temp\x.avi")

ConvertToYV12()
UDegrain(settings="light",interlaced=true)
and it gives me the following error:
"MergeChroma:Images must have same with and height".

If I don't use the switch "interlaced=true" there's no error.

LaTo
26th August 2008, 05:55
I'm trying this function with the following codeloadplugin("c:\program files\avisynth 2.5\plugins\mvtools.dll")

AviSource("c:\temp\x.avi")

ConvertToYV12()
UDegrain(settings="light",interlaced=true)
and it gives me the following error:
"MergeChroma:Images must have same with and height".

If I don't use the switch "interlaced=true" there's no error.

The fix is in v8.08c, redownload this version ;)

LaTo
26th August 2008, 05:58
Any chance of modifying this to work with the new fork of MVTools?

~MiSfit

Yes, why not, but only when it will be stable because at this time many changes occurs each week...

LaTo
27th August 2008, 09:38
v9.01a:
changed some default settings
added modX(=blocksize) checking
added adapt & SS for sharpening
added dering option (dering, DRGrad, DRGthr, RGmode)
added flat areas processing (flat, AGstr, GFthr, bias)
updated documentation in .avsi


All (new) options are documented in the .avsi ;)

Adub
27th August 2008, 16:54
Sweet! I'll get to looking at this thing right away!

blackpanther
6th September 2008, 10:48
Looks great, thanks for the effort. Have to test it some time, when get time.

Alain2
6th September 2008, 20:51
Really like this script (v8.08b), very effective and kills less details than a mvdegrain alone
Will try the new version as well :)

LaTo
7th September 2008, 10:23
v0.9.05a:
changed version number: vX.XX branch -> v0.X.XX branch
added AA options (AA,useEEDI2,maxd,AAthr,method)
changed dering --> edgeclean: you can now use your own script (see docs)
fix bug with show=true
fix bug with chroma in PP stage
fix omission with chroma=false in MVanalyse
changed some settings
added changelog in .avsi

:p

Adub
7th September 2008, 19:11
Man, this thing is just getting better and better!! I can't wait to play around with this. And with AA added as well!!

Woohoo, keep up the awesome work LaTo!!

mozzle
7th September 2008, 20:43
Yea, thanks a lot Lato. I'm starting to get the hang of tweaking this and getting some nice results. I've noticed very good detail retention.

:thanks:

LaTo
16th September 2008, 18:23
v1.0beta:
changed name Udegrain --> MCTemporalDenoise (to be more specific and avoid confusion with chroma)
added the choice to use MVDegrain instead of MVCompensate+TTempSmooth (since the chroma bug in MVDegrain is fixed)
added twopass option to do the denoising job in two stage (very effective but slow)
added MT parameter for MVTools (be careful +- unstable)
added fixFFT3D parameter to prevent banding/posterize with limit=-1
added stabilize options (stabilize,maxr,TTstr)
added deblock options (deblock,useQED,quant1,quant2)
added new presets "light"(=low)/"heavy"(=medium) --> 5 presets (very high is 'a bit' extrem)
added check/warning for some settings
added thSAD2 & limit2 parameters for twopass=true
added overrange parameter for controling sharpness (useful for sharpening more than the source)
changed +- much code to implement twopass/MVdegrain/MT, should be bug free (I hope)
changed sharp->MVsharp & post->sharp
changed "light Smode4" --> LimitedSharpenFaster for sharp=2 (strength,Smode,soft,overshoot)
reduce max radius to 6
optimize chroma in PP stage (+20% with all PP on)
fix a bug with external p clip
fix a bug in Star&Bright Point Protection with maxdiff>0
added YV12&MOD16 restriction
changed some settings due to new presets
restriction when using MT=true: bt=1 in FFT3Dgpu & plane=4 in MVDegrainMulti (will be removed when fixed)


Finish... 47ko -> 81ko, it's a big update :devil:

I wait after your comments/suggestions/improvements :cool:

Didée
16th September 2008, 19:53
I played a bit with it ... not bad, really not bad! A couple of points came up, but I'll need some time to describe them (have to do sth else right now). Will post a bit later about that.

Duke123
16th September 2008, 21:28
Megui hangs when i use the following setting:-

MCTemporalDenoise()

Any idea how to get out of it?

Nightshiver
16th September 2008, 22:33
lol, it seems Lato created a filter to awesome for any program to run it :)

Dreassica
17th September 2008, 00:14
Apparently, I get out of bounds memory errors with everythign I try, even settings="very low"

Lux Delux
17th September 2008, 01:35
Had problems with Josey's last mvtools but with fizick's last v.1.10.2.1 it works fine ;)

LaTo
17th September 2008, 07:18
Problems may occurs with FFT3Dgpu or MvToolsMULTI, try gpu=false & switch to MvTools 1.10.2.1 ;)

edit: If you try with MvToolsMULTI, don't use version higher than v1.9.7.1!

Megui hangs when i use the following setting:-

MCTemporalDenoise()

Any idea how to get out of it?

I have the same problem, gpu=false solve the problem... Or don't use Megui :p

Dreassica
17th September 2008, 13:32
Heh updating mvtools to 1.9.7.5 actally fixed the problem for me.

Duke123
18th September 2008, 05:02
Now i m getting the following error now --

This is not a MOD16 clip ! Please use crop() or addborders() before using MCTemporalDenoise()
(,line 141)

Lux Delux
18th September 2008, 05:25
If you're resizing then put it before the resize. If you're not resizing and just cropping then I guess one can put it before the cropping.

If the source is SD DVD like in my case where I used the above quick workarounds :):p

Duke123
18th September 2008, 18:59
If you're resizing then put it before the resize. If you're not resizing and just cropping then I guess one can put it before the cropping.

If the source is SD DVD like in my case where I used the above quick workarounds :):p

Tried it buddy...
But not working...:confused:

Didée
18th September 2008, 20:08
Then you tried it wrongly. If you first crop, then resize to a mod16 - resolution, it will definetly work.

However, what I don't understand is why the script is imposing such a restriction at all. The very first thing that is done in the script is to pad the input to the next mod16-resolution (or to the over-next one, the code is a bit loose). Due to the padding, the restriction is met in any case, so what's the point in forbidding not-mod16 input? Outcommented that Assert() line, threw a 404*404 clip at it (404 is 'only' mod4), and it just works ... is it about FFT3DGPU (have no GPU card, so I don't know), perhaps?

LaTo
18th September 2008, 20:29
Then you tried it wrongly. If you first crop, then resize to a mod16 - resolution, it will definetly work.

However, what I don't understand is why the script is imposing such a restriction at all. The very first thing that is done in the script is to pad the input to the next mod16-resolution (or to the over-next one, the code is a bit loose). Due to the padding, the restriction is met in any case, so what's the point in forbidding not-mod16 input? Outcommented that Assert() line, threw a 404*404 clip at it (404 is 'only' mod4), and it just works ... is it about FFT3DGPU (have no GPU card, so I don't know), perhaps?
it's a restriction for deblock_QED, it crash with not-MOD16 input...
(it's a forgotten, normally this restriction should be only effective when deblock=true)

Duke123
18th September 2008, 20:38
it's a restriction for deblock_QED, it crash with not-MOD16 input...
(it's a forgotten, normally this restriction should be only effective when deblock=true)

What sud i do ?
How to overcome this problem?

LaTo
18th September 2008, 20:41
3 solutions:
- Width & height must be divisible by 16
- Comment out with # the MOD16 Assert line in the function
- Wait the next update

Duke123
18th September 2008, 20:48
# Set DAR in encoder to 5 : 3. The following line is for automatic signalling
global MeGUI_darx = 5
global MeGUI_dary = 3

Didée
18th September 2008, 20:58
it's a restriction for deblock_QED, ...
Oh, THAT's the culprit. Ayyyyy! :eek:


http://img141.imageshack.us/img141/2673/kickasspj7.png (http://imageshack.us)

(left=me, right=you) :D

Duke123
18th September 2008, 21:34
Problems may occurs with FFT3Dgpu or MvToolsMULTI, try gpu=false & switch to MvTools 1.10.2.1 ;)

edit: If you try with MvToolsMULTI, don't use version higher than v1.9.7.1!



I have the same problem, gpu=false solve the problem... Or don't use Megui :p

gpu=false solve the problem

Where to use this setting?

Nightshiver
18th September 2008, 21:59
MCTemporalDenoise(gpu=false)

Vesi
19th September 2008, 23:24
When i'm adding the line MCTemporalDenoise() i get the error.
There is no function named "FFT3Dgpu"
and I have the FFT3DFilter already in my plugin.

Nightshiver
19th September 2008, 23:31
sheesh. FFT3DGPU. GPU. It's different from FFT3DFILTER. http://avisynth.org/warpenterprises/ has it.

Vesi
19th September 2008, 23:37
I know that, I go according to this

FFT3Dfilter (v2.1.1) or FFT3Dgpu (v0.8.2.7)

saint-francis
20th September 2008, 04:34
I know that, I go according to this

FFT3Dfilter (v2.1.1) or FFT3Dgpu (v0.8.2.7)


Up several posts. You need to specify that you want to use FFT3DFilter.

MCTemporalDenoise(gpu=false)

LaTo
22nd September 2008, 08:44
v1.0beta2:
fixed MOD16 restriction (effective only if deblock=true)
small speedup/fix with limit>0 and/or protect=true&maxdiff>0
added warning about GPU & MT in the documentation



I played a bit with it ... not bad, really not bad! A couple of points came up, but I'll need some time to describe them (have to do sth else right now). Will post a bit later about that.

@Didée: I am still waiting after your ideas/comments/improvements :D

Duke123
26th September 2008, 20:28
Problems may occurs with FFT3Dgpu or MvToolsMULTI, try gpu=false & switch to MvTools 1.10.2.1 ;)

edit: If you try with MvToolsMULTI, don't use version higher than v1.9.7.1!



I have the same problem, gpu=false solve the problem... Or don't use Megui :p

It solved d problem..:)
Thanx a lot bro.:thanks:

Adub
23rd October 2008, 04:07
Yo LaTo!
Would it be possible for you to post your edgecleaner internals as a separate function I could call? I tried looking at it, but it looks pretty tied in with all of the other stuff, so it wouldn't be easy for me to extract.

LaTo
25th October 2008, 14:43
v1.0beta3:
all post-processing filters are now usable as a standalone function (MCTemporalDenoisePP)
added MC-antialiasing (see reduc parameter)

LaTo
25th October 2008, 14:46
Yo LaTo!
Would it be possible for you to post your edgecleaner internals as a separate function I could call? I tried looking at it, but it looks pretty tied in with all of the other stuff, so it wouldn't be easy for me to extract.

Hi!
I have released a new version with the separate function ;)
(it was ready since many weeks but I was waiting after Didée's improvements... never come, maybe for beta4, it would be cool :cool:)

Sagekilla
25th October 2008, 22:23
Awhat? Motion compensated antialiasing? Now I'm curious :) How'd you get this done?

Adub
25th October 2008, 23:54
Hi!
I have released a new version with the separate function ;)
(it was ready since many weeks but I was waiting after Didée's improvements... never come, maybe for beta4, it would be cool :cool:)

Maybe you should PM him to remind him. He may have forgotten.

Didée
26th October 2008, 01:11
Forgotten is nothing. I had started writing some comments, and got this far (http://www.mediafire.com/file/hdzawznmwle/Commenting MCTemporalDenoise~.txt) before I lost interest in doing so. The real technical details haven't even started, iirc.

Adub
26th October 2008, 01:24
Would you be interested in resuming your commenting of the script then? I only ask because you state that you had lost interest.

Adub
26th October 2008, 06:29
MCTemporalDenoise has now been added to the wiki!
http://avisynth.org/mediawiki/MCTemporalDenoise

LaTo
26th October 2008, 12:05
v1.0beta4:
changed some descriptions & blksize default (submitted by Didée)
added auto blksize setting (16:HD & 8:SD, if you want speed use 16)

@Didée: Thanks for the report, I expect that a day you will write technical details...

@Merlin777: Thanks for the wiki.

:thanks:

Didée
26th October 2008, 18:53
One more thing I planned to nag about is the sharpening part. The "MC temporal limiting" is only used together with LSF sharpening, which are pretty much counter-indicated (with LSF defaults). LSF *first* limits the sharpening results spatially. *After* that, there is not very much left back that could be temporally limited. This doesn't create artifacts or something, it's just much effort that achieves almost nothing. The basic idea is that spatial limiting of sharpening is too restrictive (at least for strong-grained sources), and MC-compensated temporal limiting loosens that restriction. Therefore, first doing spatial limiting, then the temporal one on top of that, won't achieve much benefit.
IIRC I have told that story before ... but can't find the post now, heh.

Anyhow, I'm not thrilled by analyzing a kilometers-long script that has not the tiniest amount of comments for what locally is done, and uses "smAD rgDL oCS" style for variable names. (Yeah, I do that style myself ... but my own scripts I don't need to analyse for the logic in the flow-of-processing.)

So - does it denoise? Yes. Does it create artifacts? No. Hence, everything's fine.

Scanning such a script for possible suboptimal-ities is an imposition, and I'm not going to do that. Lack of mood, time and energy.

LaTo
26th October 2008, 20:00
One more thing I planned to nag about is the sharpening part. The "MC temporal limiting" is only used together with LSF sharpening, which are pretty much counter-indicated (with LSF defaults). LSF *first* limits the sharpening results spatially. *After* that, there is not very much left back that could be temporally limited. This doesn't create artifacts or something, it's just much effort that achieves almost nothing. The basic idea is that spatial limiting of sharpening is too restrictive (at least for strong-grained sources), and MC-compensated temporal limiting loosens that restriction. Therefore, first doing spatial limiting, then the temporal one on top of that, won't achieve much benefit.
IIRC I have told that story before ... but can't find the post now, heh.
So, we need to use Smode=4 or overshoot=10&+ ?

Didée
26th October 2008, 21:00
Smode=4 on it's own won't do very much. It's the limiting which is cruicial. Allowing a big overshoot, eventually together with Lmode=3 to not over-enhance edges, would be more in line with the idea.

But then, this of course might bring up other issues again, when the sharpening settings as a whole are too aggressive.

... If one is going to just sharpen up a denoised clip, there's only so much you can do before running into problems. Perhaps it's not the actually used methods, but rather the overall strategy which is problematic? :)

---

Consider a chess game. You've like hundred(s) possibilities to make one move. Each of the possible moves has hundred(s) of possible next moves. And so on. The sheer number of possible moves explodes exponentially, faster than one could follow.

Humans won't calculate through each and every possible move to see what will happen. Human brain is very good at pattern reckognition, and instead of calculating all possibilities, a situation is assessed in its whole (more or less), and is judged by whether it seems promising or not.
As opposed to machines, which are pretty bad at pattern reckognition, hence have to bruteforce calculate immense amounts of positions to find the good moves.

Now, imagine you are asked if it's better to put bishop on C3, or knight on F6. Yes. No. Neither. Both. Anything.

See why I'm getting tired of answering "shall I make foo().bar() or rather bar().foo()?" questions? There are no such answers, at least no *good* ones. One needs to consider a problem in its whole complexity to make good decisions. "Butterfly effect" is another catchword that might fit here.

LaTo
3rd November 2008, 19:38
Allowing a big overshoot, eventually together with Lmode=3 to not over-enhance edges, would be more in line with the idea.

But then, this of course might bring up other issues again, when the sharpening settings as a whole are too aggressive.
Thanks for these ideas! :thanks:

Now by default (beta5), spatial limiting (Slimit) is OFF and temporal limiting (Tlimit) is ON...
If Tovershoot>0, Slimit=2 (limit only edges) is a good compromise to not over-enhance edges...

LaTo
3rd November 2008, 19:39
v1.0beta5: :cool:
added new sharpening routine & deleted LSF (SHmode,Slimit,Sovershoot,Tlimit,Tovershoot)
changed some code (cosmetic)

Adub
3rd November 2008, 19:51
I have mostly updated the wiki, I just haven't modified the sharpening parameter description yet.

totya
4th November 2008, 12:04
Hi!

My video source is very noised, which settings recommended with this filter? Or which other filter recommended?

This:
ConvertToYV12
MCTemporalDenoise(settings="HIGH")

works nothing with noised picture.

Sample (http://fapomatic.com/show.php?loc=0844&f=noise.png)

Thanks!

Leak
4th November 2008, 15:25
I would have said that you should post a video clip since temporal denoising obviously can't be tested on a single picture, but the amount of noise in your image makes me wonder if there even is anything that can clean up that mess...

alph@
4th November 2008, 18:10
this is the code of mctemporaldenoise , only this ?????

####################################################################################################################################
### ###
### Motion-compensated temporal denoise: MCTemporalDenoise() ###
### ###
### v1.0beta5 by "LaTo INV." ###
### ###
### 3 November 2008 ###
### ###
####################################################################################################################################
###
###
###
### /!\ Needed filters: Masktools (v2.0a35), MVTools (v1.10.2.1) or MVToolsMULTI (v1.9.7.1),
### ------------------- FFT3Dfilter (v2.1.1) or FFT3Dgpu (v0.8.2.7),
### TTempsmooth (v0.9.4), Removegrain + Repair (v1.0PR),
### Deblock (v1.2) or Deblock_QED (18.aug.2008),
### EEDI2 (v0.9.2) or Sangnom (v1.0beta),
### Gradfun2db (v1.0), Addgrain (v1.0).
###
###
###
### USAGE: MCTemporalDenoise(i, radius, sigma, twopass, useTTmpSm, limit, limit2, fixFFT3D, chroma, GPU, MT, idx, interlaced,
### sharp, adapt, strength, SHmode, Slimit, Sovershoot, Tlimit, Tovershoot,
### protect, cutoff, threshold, maxdiff,
### AA, useEEDI2, reduc, maxd, AAthr, method,
### deblock, useQED, quant1, quant2,
### edgeclean, ECrad, ECthr, ECmode,
### stabilize, maxr, TTstr,
### flat, GFthr, AGstr,
### bwbh, owoh, blksize, overlap,
### truemotion, safe, MVglobal,
### bt, ncpu, precision, mode,
### thSAD, thSAD2, thSCD1, thSCD2,
### pel, pelsearch, search, searchparam, MVsharp, DCT, p, settings,
### show, screenW, screenH)
###
###
###
### MCTemporalDenoisePP:
### --------------------
###
### USAGE: MCTemporalDenoisePP( denoised, source,
### sharp, adapt, strength, SHmode, Slimit, Sovershoot, Tlimit, Tovershoot,
### protect, cutoff, threshold, maxdiff,
### AA, useEEDI2, reduc, maxd, AAthr, method,
### edgeclean, ECrad, ECthr, ECmode,
### stabilize, maxr, TTstr,
### flat, GFthr, AGstr, bias,
### chroma, idx )
###
### Parameters are the same as MCTemporalDenoise.
###
### "Sharp" & "Protect" options need 2 inputs:
### EX: source=last
### denoised=source.FFT3Dfilter()
### MCTemporalDenoisePP(denoised,source,...)
### The others only need "denoised".
###
### By default, all filters are off! If you turn ON an option, you need to specify all parameters related.
### EXAMPLE: MCTemporalDenoisePP(denoised,source,sharp=2,adapt=true,strength=200,SHmode=3,Slimit=2,Sovershoot=0,Tlimit=true,Tovershoot=2)
### AND NOT: MCTemporalDenoisePP(denoised,source,sharp=2)
###
###########################################################################################################

LaTo
4th November 2008, 19:02
this is the code of mctemporaldenoise , only this ?????
Nooooo! Look at the first post!!!

alph@
4th November 2008, 19:22
ok , thanks lato:o

totya
4th November 2008, 19:42
this is the code of mctemporaldenoise , only this ?????

"#" = remark

Adub
4th November 2008, 20:49
Honestly, there is more noise than picture. My recommendation would be to find a different source.

totya
4th November 2008, 21:30
I would have said that you should post a video clip since temporal denoising obviously can't be tested on a single picture, but the amount of noise in your image makes me wonder if there even is anything that can clean up that mess...

Hi!

Sample (http://rapidshare.com/files/160675693/noise_example_2008-11-04_4sec.avi.html)

totya
4th November 2008, 21:31
Honestly, there is more noise than picture. My recommendation would be to find a different source.

Hi!

I know this. But about 1-2 month this analog signal is stay.

Thanks.

Mug Funky
7th November 2008, 07:28
had to use that image host... some of us are at work you know...

you'll probably want a degrainer designed with impulses in mind for that sample there. there's a pretty lightweight mc'd version of removedirt lying around somewhere. one day i'll merge it with my hardcore degrainer script (that gives similar results to this one but with much, much fewer tweakable settings. nothing but SAD thresh for strength of denoising, scenechange thresh and pel).

basically once you're rid of the big white bits a denoiser can make a bit more sense of the rest of the picture.

LaTo
11th November 2008, 16:11
v1.0.00:
first stable version
changed sharp=2, need LSFmod v1.0 (http://forum.doom9.org/showthread.php?t=142706) !
fix a bug introduced in beta5

totya
11th November 2008, 17:06
Honestly, there is more noise than picture. My recommendation would be to find a different source.

Signal is back, source is good again :)

Adub
11th November 2008, 20:16
@totya
Good to hear. Now you should actually be able to do some real work with your source.

@LaTo
Downloading and testing in progress. I will probably be able to report on things this weekend, as I have some midterms to be studying for.

LaTo
15th November 2008, 09:24
v1.0.01:
fixed a speed issue in MCTemporalDenoisePP (introduced in beta5)
changed documentation about MCTemporalDenoisePP

totya
15th November 2008, 11:20
v1.0.01:
fixed a speed issue in MCTemporalDenoisePP (introduced in beta5)

Thx!

Please tell me shortly if possible, what is the different between MCTemporalDenoise and MCTemporalDenoisePP.

Small remark:

1. Addgrain v1.0 need of MCTemporalDenoise, but I not found this file, I found only Addgrain v1.4 here (http://avisynth.org.ru/docs/english/externalfilters/addgrain.htm). This file is OK? If not, please put me link where I can download Addgrain v1.0

2. U wrote : "Needed filters...EEDI2 (v0.9.2) or Sangnom (v1.0beta)"

This is small error, because if (default) settings is VERY LOW or LOW this filter use EEDI2, but if settings is MEDIUM, HIGH, OR VERY HIGH, this filter use Sangnom, and I get error msg: "Script error: there is no function named "Sangnom".

I suggest, the old line:
EEDI2 (v0.9.2) or Sangnom (v1.0beta)
corrected line:
EEDI2 (v0.9.2), Sangnom (v1.0beta),

Thx!

Adub
15th November 2008, 22:43
I suggest, the old line:
EEDI2 (v0.9.2) or Sangnom (v1.0beta)
corrected line:
EEDI2 (v0.9.2), Sangnom (v1.0beta)

This isn't a bad point.

As to your first question, MCTemporalDenoise uses MCTemporalDenoisePP.

MCTemporalDenoise does most of the actual denoising, through the use of MVTools and so on. MCTemporalDenoisePP is the Post-Processor. Basically, it can do everything from sharpening to deblocking to dehaloing, etc, after the main denoising function (MCTemporalDenoise) has done it's job.

One reason why it is a separate function is because I had asked earlier on if it would be possible to call the dehaloing capabilities outside of the MCTemporalDenoise script. LaTo came up with the current implementation. Which is actually very cool, as we can now call ALL of the post-processing techniques outside of the main denoising function.

totya
16th November 2008, 00:54
Hi!

Thx for answer!

This isn't a bad point.

My verdict is different, but np.


As to your first question, MCTemporalDenoise uses MCTemporalDenoisePP (...)

OK, I Know, thx. I see headers in source. MCTemporalDenoisePP name is fake, because this function can't denoise.
Anyway... MCTemporalDenoise is denoiser with postprocessing, MCTemporalDenoisePP only postprocessor.

PP=PostProcessor

I think not bad idea, if this info present in nfo (avsi), but not only in changelog (1.0beta3).

Thanks again.

Adub
16th November 2008, 06:12
Hi!

My verdict is different, but np.

No, I was agreeing with you. Read my sentence again. I said that your point was not a bad one.

MCTemporalDenoise does all of the actual degraining. It calls MCTemporalDenoisePP when it wants to do some actual post-processing. You can look at the code yourself if you don't believe me.

MCTemporalDenoisePP name is fake, because this function can't denoise. I wouldn't quite call it fake. Essentially, it is the post-processor in the MCTemporalDenoise chain. Another way to look at the name is "MCTemporalDenoise's Post Processor".

I think not bad idea, if this info present in nfo (avsi), but not only in changelog (1.0beta3).
I will agree that MCTemporalDenoisePP could be slightly better labeled in the avsi. Right now it's just a description of parameters. It could have a line right above it saying, "MCTemporalDenoisePP: This is the post-processor used in MCTemporalDenoise after all denoising has been completed . It can also be called externally if the user desires some specific funtionality, such as the use of MCTemporalDenoisePP's dehaloing technique."

Or something like that.

LaTo
16th November 2008, 08:59
I suggest, the old line:
EEDI2 (v0.9.2) or Sangnom (v1.0beta)
corrected line:
EEDI2 (v0.9.2), Sangnom (v1.0beta),

I will agree that MCTemporalDenoisePP could be slightly better labeled in the avsi. Right now it's just a description of parameters. It could have a line right above it saying, "MCTemporalDenoisePP: This is the post-processor used in MCTemporalDenoise after all denoising has been completed . It can also be called externally if the user desires some specific funtionality, such as the use of MCTemporalDenoisePP's dehaloing technique."

Thanks, I will do that... ;)

EDIT: I have updated a little the documentation, you should re-download v1.0.01 if you want it :D

totya
17th November 2008, 14:08
Thanks, I will do that... ;)

EDIT: I have updated a little the documentation, you should re-download v1.0.01 if you want it :D

I see, now this correct. Thx!

steptoe
23rd November 2008, 11:52
Any chance of somebody linking to all the required plugins as I think I have them all, but making sure I have the specific versions as listed in the wiki is a bit hit and miss and getting the extra filters that some of the required filters need is getting confusing

Many thanks

Could the package link be added to the wiki or is that not allowed as it uses other peoples filters and work

LaTo
23rd November 2008, 19:06
v1.0.02:
changed defaults according to new LSFmod v1.2

Avisynth_challenged
24th November 2008, 08:28
I've been testing the latest version of MCTemporalDenoise (v1.0.02) on an analog capture of a laserdisc source. I've uploaded some screenshots for review, comments, and critique.

There are 16 images total, broken into groups of 4, as follows


SAMPLE 1: A frame from a daytime scene with lots of motion
Image01 = source (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_source_1.png)
Image02 = MCTemporalDenoise v1.0.02 (settings="low") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_low_1.png)
Image03 = MCTemporalDenoise v1.0.02 (settings="medium") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_med_1.png)
Image04 = MCTemporalDenoise v1.0.02 (settings="high") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_high_1.png)

SAMPLE 2: A frame from a daytime scene very little motion
Image05 = source (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_source_2.png)
Image06 = MCTemporalDenoise v1.0.02 (settings="low") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_low_2.png)
Image07 = MCTemporalDenoise v1.0.02 (settings="medium") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_med_2.png)
Image08 = MCTemporalDenoise v1.0.02 (settings="high") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_high_2.png)

SAMPLE 3: A frame from a nighttime scene with lots of motion
Image09 = source (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_source_3.png)
Image10 = MCTemporalDenoise v1.0.02 (settings="low") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_low_3.png)
Image11 = MCTemporalDenoise v1.0.02 (settings="medium") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_med_3.png)
Image12 = MCTemporalDenoise v1.0.02 (settings="high") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_high_3.png)

SAMPLE 4: A frame from a nighttime scene very little motion
Image13 = source (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_source_4.png)
Image14 = MCTemporalDenoise v1.0.02 (settings="low") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_low_4.png)
Image15 = MCTemporalDenoise v1.0.02 (settings="medium") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_med_4.png)
Image16 = MCTemporalDenoise v1.0.02 (settings="high") (http://i252.photobucket.com/albums/hh18/FoolsTalk/mctdenoise_v1002_high_4.png)

*Note: The sample frames in the above links contain problems other than noise (mainly aliasing and edge ghosting), but I'm going to attack the task of denoising with MCTemporalDenoise first before moving on to the other problems.


The script I used was very basic:
##############
##############
###Import("C:\program files\avisynth 2.5\plugins\mctemporaldenoise.v1.0.01.avs")
###Import("C:\program files\avisynth 2.5\plugins\lsfmod.v1.1.avs")
Import("C:\program files\avisynth 2.5\plugins\mctemporaldenoise.v1.0.02.avs")
Import("C:\program files\avisynth 2.5\plugins\lsfmod.v1.2.avs")


### CHOOSE 1 SOURCE ONLY ###
#source=DirectshowSource("path\sample_dynamic_bright.avi")
#source=DirectshowSource("path\sample_static_bright.avi")
#source=DirectshowSource("path\sample_dynamic_dark.avi")
source=DirectshowSource("path\sample_static_dark.avi")


### CHOOSE 1 LINE ONLY ###
#final=source.mctemporaldenoise(gpu=false, settings="low")
#final=source.mctemporaldenoise(gpu=false, settings="medium")
final=source.mctemporaldenoise(gpu=false, settings="high")

return final
##############
##############


It appears that the optimum setting in all 4 samples is medium. However, I'd appreciate any comments or feedback from others before I start processing the entire source with MCTemporalDenoise. Thanks in advance to anyone who reads and responds. :) :) :)

Adub
24th November 2008, 09:40
I would have to agree with your choice of medium settings. Remember you can also use the post processing capabilities of MCTemporalDenoise to help with halo's, combing, blocking, and also to help sharpen up the image a bit.

Also, you can even fine tune your filtering even further using the strength and frames parameters, so you can get it exactly to your liking.

totya
24th November 2008, 11:31
Hi!

My favorit settings is "high", with noised TV source. But this settings is slow... about 2-3 fps.

My script:

AviSource("source.avi", true)
ConvertToYV12(interlaced=TRUE)
MCTemporalDenoise(settings="...", MT=TRUE, interlaced=TRUE)
#nnedi

without filter (http://i472.photobucket.com/albums/rr86/totyax/none.png)
medium settings (http://i472.photobucket.com/albums/rr86/totyax/medium.png)
high settings (http://i472.photobucket.com/albums/rr86/totyax/high.png)

Adub
24th November 2008, 20:42
Yes, high works quite well. For that source.

Note: You also have some interlacing, aliasing, and dot crawl artifacts on that source.

Note2: I have to admit, high works really well on that source. Cleans it right up just perfectly.

LaTo
30th November 2008, 15:58
Update MVT2alpha - 2008/11/30:

I have added the MvTools2 version of MCTemporalDenoise...

Please test & report ;)

moviefan
30th November 2008, 17:21
I experience CPU usage around 50% only with my E5200 CPU, using x264 to encode 1080p material. Can anyone explain this and tell me how to make the CPU work at maximum power? CPU0 and CPU1 are set in the task manager for the process...

Sagekilla
30th November 2008, 17:39
If that were the case, I'd be inclined to say MCTemporalDenoise is being a bottleneck for x264. You can either use slower settings on x264, or try to use the multithreaded MVtools built into MCTD.

moviefan
30th November 2008, 18:05
Hm, the multithreaded means the old MCTD (not the new alpha for MVTools 2) right? That one caused occasionally some artefacts... But I thought, MVTools 2 is multithreaded, so it should be a little faster. And how come that I have more or less exactly 50% usage? It's somehow weird... I use the up to date MT plugin with the attached avisynth.dll in mode 2. Is that a problem?

Edit: Okay, for tests I have now running two converts to lagarith lossless using VirtualDubMod in parallel. CPU usage is now at 100% and I have assigned each VirtualDubMod process one CPU core. Speed is the same as if I ran only one converting process... So encoding two clips in parallel has doubled the output... Any explanation?

Sagekilla
30th November 2008, 18:16
Nope. MVTools 2 isn't multithreaded. MVTools 2 is MVTools 1 without the idx and some other changes. Otherwise, neither are multithreaded. The builds by Josey_wells (MVAnalyseMulti, etc) is the multihreaded build.

It's fairly trivial to modify the code for the latest MCTemporalDenoise and have it use the MT'ed MVTools. Just download the latest build (which you'll have to dig around in the MVTools thread for) and replace the various functions with the MT'ed variants.

moviefan
30th November 2008, 18:27
Hm, concerning the MT'ed MCTD, the MVTools 1 version supports the MT'ed branch using parameter MT=true, but I got weird artefacts on some rare occasions... So as a workaround the only option seems to be a parallel encode to e.g. lagarith and then a simple encode using x264...

LaTo
30th November 2008, 19:36
Edit: Okay, for tests I have now running two converts to lagarith lossless using VirtualDubMod in parallel. CPU usage is now at 100% and I have assigned each VirtualDubMod process one CPU core. Speed is the same as if I ran only one converting process... So encoding two clips in parallel has doubled the output... Any explanation?

Maybe you forgot "--threads auto --thread-input" in x264 :confused:

Fizick
30th November 2008, 20:03
Hm, concerning the MT'ed MCTD, the MVTools 1 version supports the MT'ed branch using parameter MT=true, but I got weird artefacts on some rare occasions...

That is why MVTools v2 is developing....

LaTo
30th November 2008, 21:17
With MCTemporalDenoise @default:

Old MvTools v1.11.4.5 : 3.90fps
New MvTools v2.2.1 : 4.60fps

+20%... Great!

moviefan
30th November 2008, 22:25
No, I have set the x264 parameters correctly... The ~50% also apply to lossless conversion to lagarith...

Avisynth_challenged
30th November 2008, 23:29
I'm very impressed with LaTo's MCTemporalDenoise script function. It is so easy to use, and it just plain works if you take some time to optimize it for your particular source. I just thought I'd say thanks to LaTo for the script, to post some screenshots (and my Avisynth script which generated them) showing how effective MCTemporalDenoise is, and to see if everyone reading this thread agrees that I'm properly understanding and using MCTemporalDenoise (and MCTemporalDenoisePP) for my particular source, which is an analog capture of a movie off of laserdisc.

Thanks to anyone who reads and chimes in :) :) :)

Here is my Avisynth script using MCTemporalDenoise (v1.0.02):
##############
##############
###Import("C:\program files\avisynth 2.5\plugins\mctemporaldenoise.v1.0.01.avs")
###Import("C:\program files\avisynth 2.5\plugins\lsfmod.v1.1.avs")
Import("C:\program files\avisynth 2.5\plugins\mctemporaldenoise.v1.0.02.avs")
Import("C:\program files\avisynth 2.5\plugins\lsfmod.v1.2.avs")


source=DirectshowSource("path\source1.avi")
#source=DirectshowSource("path\source2.avi")
############


### CHOOSE 1 LINE ONLY ###
######final=source.mctemporaldenoise(gpu=false, settings="low")
denoised=source.mctemporaldenoise(gpu=false, settings="medium")
#denoised=source.addborders(0,0,0,2).mctemporaldenoise(gpu=false, settings="medium").crop(0,0,-0,-2)
######denoised=source.mctemporaldenoise(gpu=false, settings="high")
############


denoisedpp=MCTemporalDenoisePP(denoised, source, protect=true, cutoff=64, threshold=16, maxdiff=4)
############
### COMMENTS ON USAGE
### sharp, adapt, strength, SHmode, SHmethod, Slimit, Sovershoot, Tlimit, Tovershoot,
### protect, cutoff, threshold, maxdiff,
### AA, useEEDI2, reduc, maxd, AAthr, method,
### edgeclean, ECrad, ECthr, ECmode,
### stabilize, maxr, TTstr,
### flat, GFthr, AGstr, bias,
### chroma, idx )
###
### This is the post-processor used internally in MCTemporalDenoise.
### It can be called externally if you want some specific functionality.
###
### Parameters are the same as MCTemporalDenoise.
###
### "Sharp" & "Protect" options need 2 inputs:
### EX: source=last
### denoised=source.FFT3Dfilter()
### MCTemporalDenoisePP(denoised,source,...)
### The others only need "denoised".
###
### By default, all filters are off! If you turn ON an option, you need to specify ALL parameters related.
### EXAMPLE: MCTemporalDenoisePP(final,source,sharp=2,adapt=true,strength=200,SHmode=3,SHmethod=1,Slimit=2,Sovershoot=0,Tlimit=true,Tovershoot=2)
### AND NOT: MCTemporalDenoisePP(denoised,source,sharp=2)
############


############
function antialiasing( clip orig, int "th_luma", int "th_croma", string "type", int "order", int "aath", bool "HQedge")
{

# "th_luma" and "th_croma" affect directly the edge detection: higher values = more edges filtered
# set "order = 0" for Top Field First; order = 1 --> Bottom Field First
# aath = anti-aliasing strenght (default should be fine)


th_luma = Default(th_luma, 20)
th_croma = Default(th_croma, 20)
type = Default(type, "sobel")
order = Default(order, 1)
aath = Default(aath, 48)
HQedge = Default(HQedge, false)
ox = orig.width
oy = orig.height
dx = orig.width * 2
dy = orig.height * 2

orig.convertToYV12()
a=last
b=spline36resize(dx, dy).TurnLeft().SangNom(order,aath).TurnRight().SangNom(order,aath)
###b=spline36resize(dx, dy).turnright().nnedi(dh=true, field=1).turnleft()

# native chroma edges:
#c=b.lanczosresize(ox,oy).EdgeMask(0, th_luma, 0, th_croma, type,Y=3,U=3,V=3)

# use luma edges for chroma:
c=b.spline36resize(ox,oy).EdgeMask(0, th_luma, 0, th_croma, type,Y=3,U=1,V=1).FitY2UV()

d= logic( b.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=4,Y=3,U=1,V=1)
\ ,b.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=4,Y=3,U=1,V=1)
\ ,"max").greyscale.levels(0,0.8,128,0,255,false).FitY2UV().spline36resize(ox,oy)
b=b.spline36resize(ox,oy)

HQedge ? MaskedMerge(a,b,d,Y=3,U=3,V=3) : MaskedMerge(a,b,c,Y=3,U=3,V=3)
}
############


denoisedppaa=denoisedpp.antialiasing(th_luma=20, th_croma=20, type="sobel", order=1, aath=18, HQedge=false)

denoisedppaasharp1=denoisedppaa.sharpen(0.25)

denoisedppaasharp=MCTemporalDenoisePP(denoisedppaa, denoisedppaasharp1, sharp=2, adapt=true, strength=100, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=true,Tovershoot=0)
#interleave(source,denoised,denoisedpp,denoisedppaa,denoisedppaasharp)
#return last


image1=source
image2=denoised
image3=denoisedpp
image4=denoisedppaa
image5=denoisedppaasharp

#stackvertical(image1,image2,image3,image4,image5)
interleave(image1,image2,image3,image4,image5)
return last
##############
##############

Notes on the 5 images in the following screenshot links:

Image1 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest1.png) = SOURCE

Image2 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest2.png) = Image1.MCTemporalDenoise(settings="medium")

Image3 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest3.png) = MCTemporalDenoisePP(Image2, Image1, protect=true, cutoff=64, threshold=16, maxdiff=4)
Note: Bright points protection - demonstrated by the restoration of the white spot behind the bearded man's head.

Image4 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest4.png) = Image3.antialiasing(th_luma=20, th_croma=20, type="sobel", order=1, aath=18, HQedge=false)
Note: Function Antialiasing is in the script above

Image5 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest5.png) = MCTemporalDenoisePP(Image4, Denoisedppaasharp1, sharp=2, adapt=true, strength=100, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=true,Tovershoot=0)
Note: MCTemporalDenoise sharpening function call, where Denoisedppaasharp1=Image4.sharpen(0.25) -- see script above

Adub
1st December 2008, 05:15
You do know that MCTemporalDenoise already calls MCTemporalDenoisePP for you? Essentially, all your processing could be done in your Image2 line. In fact, you are OVER processing your source, with the extraneous call to MCTemporalDenoisePP.

LaTo
2nd December 2008, 21:14
No, I have set the x264 parameters correctly... The ~50% also apply to lossless conversion to lagarith...

Strange, try gpu=false...



Notes on the 5 images in the following screenshot links:

Image1 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest1.png) = SOURCE

Image2 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest2.png) = Image1.MCTemporalDenoise(settings="medium")

Image3 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest3.png) = MCTemporalDenoisePP(Image2, Image1, protect=true, cutoff=64, threshold=16, maxdiff=4)
Note: Bright points protection - demonstrated by the restoration of the white spot behind the bearded man's head.

Image4 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest4.png) = Image3.antialiasing(th_luma=20, th_croma=20, type="sobel", order=1, aath=18, HQedge=false)
Note: Function Antialiasing is in the script above

Image5 (http://i252.photobucket.com/albums/hh18/FoolsTalk/denoisetest5.png) = MCTemporalDenoisePP(Image4, Denoisedppaasharp1, sharp=2, adapt=true, strength=100, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=true,Tovershoot=0)
Note: MCTemporalDenoise sharpening function call, where Denoisedppaasharp1=Image4.sharpen(0.25) -- see script above


As Merlin7777 said, you can simply try this:

MCTemporalDenoise(settings="medium",protect=true,aa=true,sharp=2)



OR, if you want to use your own antialiasing script:

source=last

MCTemporalDenoise(settings="medium",protect=true,sharp=0)

Antialiasing(th_luma=20, th_croma=20, type="sobel", order=1, aath=18, HQedge=false)

MCTemporalDenoisePP(last, source, sharp=2, adapt=true, strength=100, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=true,Tovershoot=0)

Avisynth_challenged
3rd December 2008, 17:40
Thank you Merlin7777 and LaTo. I've modified my script according to your suggestions. I appreciate the feedback :)

LaTo
7th December 2008, 20:47
v1.1.23:
adapted script for MvTools v2.3.0 (deleted MT & idx parameters)
changed MCTemporalDenoisePP's defaults (now the same as MCTD)
deleted safe parameter (slow & useless)
changed some minor things

v1.0.03:
fixed a bug in MCTemporalDenoisePP

steptoe
11th December 2008, 01:29
Any chance of creating a link to something that has a package of all filters and functions that are used as its now getting quite complex to get them all and make sure you have the right versions

Even an archive with all filters in their archived forms is better than nothing as I'm not sure if I have all the correct versions any more and trying to find some of the filters turns up that they also need other filters to run themselves

Adub
11th December 2008, 06:03
Damn, the new version is way faster. I was getting about 3.98fps. Now I am getting 5.5fps. On one thread. If I use setmtmode(2), I get over 20fps. This is on 720x480 footage. Hell yes for MVtools2!! Now, I just need MC_Spuds to update as well and I will be one happy camper.

mozzle
11th December 2008, 07:53
Just to echo Merlin's sentiments, I'm thoroughly enjoying around a 20% speed improvement when using MCTemporalDenoise 1.1.23 along with MVTools 2.3.0.0

Major kudos to LaTo and fizick!!!

:thanks:

totya
11th December 2008, 16:06
If I use setmtmode(2), I get over 20fps

lol

MCTemporalDenoise support this?

moviefan
11th December 2008, 22:56
There seems to be an issue with "edgeclean=true". When I used it (the MVTools2 version), some frames were OK (no comment about the actual edge cleaning here), but some other frames were bleached... When I turned it off, the colors were fine again. I hope this bug report helps to further improve your amazing script, LaTo! Thanks for your efforts!

Adub
11th December 2008, 23:05
lol

MCTemporalDenoise support this?

Yep, it runs just fine. I just ran it on Constantine last night using MeGUI, and this morning I have a nice little mkv waiting for me. Works 100% okay.

I will test the edgeclean=true bug.

pdadi
11th December 2008, 23:17
Hi, Great work. I am getting there is no function named Msuper (line,650) with following settings

MCTemporalDenoise(settings="medium",gpu=false)

I appreciate your help

thetoof
12th December 2008, 00:01
MCTemporalDenoise support this?sure does! MVTools2 is even more stable than v1 with setmtmode

Hi, Great work. I am getting there is no function named Msuper (line,650) with following settingsDo you have the latest version of MVTools2?

pdadi
12th December 2008, 00:44
Do you have the latest version of MVTools2?

Thanks works now. Can I delete mvtools v1 then?

thetoof
12th December 2008, 01:42
Unless you still use scripts that use mvtools1, yes. It'll take some time for the old scripts to be adapted to the new syntax (especially since it has just changed), so I think you'll still need v1 for a little while.

pdadi
12th December 2008, 01:53
Thanks thetoof, I am not seeing any performance improvments with setmtmode(2,0). Mine is a quadcore 9400 with 8 GB RAM. CPU is at 30%.

setmtmode(2,0)
MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)

Getting around 3FPS on x264 HQ profile first pass.

LaTo
12th December 2008, 08:17
There seems to be an issue with "edgeclean=true". When I used it (the MVTools2 version), some frames were OK (no comment about the actual edge cleaning here), but some other frames were bleached... When I turned it off, the colors were fine again. I hope this bug report helps to further improve your amazing script, LaTo! Thanks for your efforts!
Thanks for report, should be fixed in v1.1.24 :)

For edgeclean=true, I recommend to try another thing that ECmode's default : it's a simple RemoveGrain by default... (dfttest is great but slow)



EDIT: Update 12/12/2008
v1.1.24:
fixed a chroma bug with PP

sho_t
12th December 2008, 18:48
For edgeclean=true, I recommend to try another thing that ECmode's default : it's a simple RemoveGrain by default... (dfttest is great but slow)


I think that TBilateral() is better than dfttest() for animation source. (I tried only by the animation source)
LaTo may have already tried it too...

steptoe
13th December 2008, 11:42
Thanks thetoof, I am not seeing any performance improvments with setmtmode(2,0). Mine is a quadcore 9400 with 8 GB RAM. CPU is at 30%.

setmtmode(2,0)
MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)

Getting around 3FPS on x264 HQ profile first pass.



If that is your script, then you are missing the important MT command that is needed to multi-thread filters

Try this :

MT("MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)")

or

MT("""
MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)
""")


The 2nd one just lets you run MT on a block of filters instead of applying it per filter or function

Not forgetting to copy the patched avisynth.dll to your windows\system32 folder in your C:\ drive or where you have Windoze installed

Otherwise nothing will happen again, and bear in mind that this patch only currently works on AviSynth 2.57, maybe he's waiting for a stable 2.58 to release the update


Also, try SETMTMode(2,4) to force is to use 4 threads, for a quad core, that way you know its running on 4 threads instead of letting the software decide how many threads to run on. Some also run it with SETMTMode(2,8) to force 8 threads with success

Gavino
13th December 2008, 19:05
If that is your script, then you are missing the important MT command that is needed to multi-thread filters. Try this :
MT("MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)")
or
MT("""
MCTemporalDenoise(settings="high",gpu=false,truemotion=false,sharp=0,ncpu=4)
""")
The 2nd one just lets you run MT on a block of filters instead of applying it per filter or function
The first one will give you a syntax error because the opening quote of "high" is taken as the closing quote of "MCTemporal...".
The second (triple-quote) form is required, to allow a string literal inside the complete string. It is unconnected with using a block of filters, since ordinary (single-quote) strings can also contain line breaks.

Bear in mind also that MT splits each frame in two and processes each half in a separate thread. Not all filters will work correctly doing this - I don't know enough about MCTemporalDenoise to say whether this is appropriate or not, but my instinct would say no (eg the clip could contain motion between the two halves).

It is not necessary to use the MT filter to get multi-threading, its action is complementary to SetMtMode.

thetoof
13th December 2008, 19:47
Exactly, setmtmode splits the clip temporally to multithread it, while mt splits it spatially. You do NOT want the latter with mo-comped processing.
Possible issues:
-Encoder is the bottleneck
-You could/should use more/less threads (check which # is faster (not higher CPU usage, faster)
-You don't have enough memory (use a higher SetMTmode, you can even go up to 1900... though I don't fully know the issues that could come up if the setting is too high)
Please post your full script and the CPU/speed results you get by varying the # of threads. Remember that x264 also works with many threads, so it's all about balancing which step gets more threads for optimal efficiency.

steptoe
13th December 2008, 21:32
I stand corrected, I always thought you had to use MT("") to get the filter to work with multi-threaded

Maybe I need to go back and study the MT docs on the wiki again and again to try and understand how it really works and when or when not to try and use it

Digitals
6th January 2009, 15:10
i am getting this error

"Msuper" (line 652),i hav installed mvtools2 still same prob

thetoof
6th January 2009, 20:15
Do you have MVTools 2.3.1?

Digitals
7th January 2009, 05:02
^ yes i hav installed MVtools 2.3.1 only

Sagekilla
7th January 2009, 05:36
Also, another issue is where you place SetMTMode.

Good:
SetMTMode()
Source("...")
MCTemporalDenoise()

Bad:
Source("...")
SetMTMode()
MCTemporalDenoise()

rkalwaitis
24th January 2009, 10:17
Lato or another person in the know :)

I keep getting the following error.

Avisynth open failure:
Script error: there is no function named "FFT3dGPU"
(C:\Users\baba\Desktop\MCTemporalDenoise\McTemporalDenoise.v1.1.24.avsi, line 645)
(C:\Users\baba\Desktop\MCTemporalDenoise.avs, line 12)

I have loaded all of the appropriate dll files as per the instructions at the top of the script.

I probably missed something simple. Any ideas.

jeffy
24th January 2009, 13:08
set GPU=false or get FFT3DGPU filter: http://forum.doom9.org/showthread.php?t=89941

rkalwaitis
24th January 2009, 14:26
Thanks Jeffy,

I updated my directx and it works. slow though. But Ill figure it out. I see it works with MT. Ill give that a shot.

Gorgeous video though.

rkalwaitis
25th January 2009, 00:03
Jeffy,

good call on the gpu=false. gained me almost 2 fps. I can live with that :) I thought FFT3dgpu supported my system. I may have read something wrong. Of course my blazing speed (haha) is using SetMTMode(2,0). Without MT mode I loose about 1fps with gpu set to false. So MT Mode helps some as well.

Lato thanks for this outstanding tool. I enjoy seeing what your scripts can do.

k

McCauley
28th January 2009, 13:20
Hi LaTo,

have you ever thought about implementing MoComped scratch removal? That would be great!

Also i found this post (http://forum.doom9.org/showpost.php?p=1070478&postcount=5), i assume you know that already, but in case you don't it might of use for MCTemporalDenoise.

Regards
McCauley

LaTo
28th January 2009, 17:51
v1.1.26:
changed "flat" post-processing to use GradFun2DBmod
changed int->float for AGstr
fixed a small bug in AA

LaTo
28th January 2009, 18:21
Hi LaTo,

have you ever thought about implementing MoComped scratch removal? That would be great!

Also i found this post (http://forum.doom9.org/showpost.php?p=1070478&postcount=5), i assume you know that already, but in case you don't it might of use for MCTemporalDenoise.

Regards
McCauley
Lack of time... Added to my "towatch list" :p

totya
29th January 2009, 11:14
v1.1.26:
changed "flat" post-processing to use GradFun2DBmod
changed int->float for AGstr
fixed a small bug in AA

Hi, thx!

But v1.1.26 version (2.3 fps) slower than v1.0.02 version (2.9 fps)

v1.0.02 script:
MCTemporalDenoise(settings="HIGH", MT=TRUE, interlaced=FALSE)

v1.1.26 script:
MCTemporalDenoise(settings="HIGH", interlaced=FALSE)

LaTo
29th January 2009, 13:01
Hi, thx!

But v1.1.26 version (2.3 fps) slower than v1.0.02 version (2.9 fps)

v1.0.02 script:
MCTemporalDenoise(settings="HIGH", MT=TRUE, interlaced=FALSE)

v1.1.26 script:
MCTemporalDenoise(settings="HIGH", interlaced=FALSE)

Maybe... but v1.0.02 with MT=true is a bit unstable and out of date.

LaTo
29th January 2009, 19:52
A small comparison with the new "enhance" option:

Source (http://latoninf.free.fr/d9/GF/original.png)
MCTemporaldenoise(deblock=true,enhance=false,chroma=true) (http://latoninf.free.fr/d9/GF/flatoff.png)
MCTemporaldenoise(deblock=true,enhance=true,chroma=true) (http://latoninf.free.fr/d9/GF/flaton.png)

I like it :cool:

Adub
30th January 2009, 00:11
Ooh, I like it too. It really helps to calm the tiny microblocks that you can see if you zoom in. Nice work there LaTo.

morsa
30th January 2009, 17:27
Is there any way for using the script in MT mode?

It always throws an exception to me.

MCTemporalDenoise(settings="low",GPU=false,stabilize=true, flat=true)

rkalwaitis
30th January 2009, 19:17
The only way I could get it to work for me was to make my first line of my script. SetMTMode(2,0)

SetMTMode(2,0)
DGDecode_mpeg2source("C:\Users\baba\Desktop\Your Project\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
#deinterlace##I deinterlace before I use MCTemporalDenoise. Lagarith lossless set you YV12 and I crop and resize at the same time.

Import("C:\Users\baba\Desktop\MCTemporalDenoise\Deblock_QED.avs")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\LSFmod.v1.3.avsi")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\MCTemporalDenoise.v1.1.24.avsi")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\MCTemporalDenoise.v1.1.26.avsi")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\GradFun2DBmod.v1.0.avsi")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\GradFun2DBmod.v1.2.avsi")
Import("C:\Users\baba\Desktop\MCTemporalDenoise\GradFun2DBmod.v1.1.avsi")

I know they autoload, I just keep mine in a folder not in the Avisynth Plugin Directory. Helps me keep track of what script needs what filters and versions........

MCTemporalDenoise(settings="medium", gpu=false)

morsa
2nd February 2009, 06:38
Have you tried my settings posted above?

Because if I use yours it works...

thanks.

Adub
2nd February 2009, 09:12
@rkalwaitis

Why load all different versions of the same script? It just takes more time to load as it sorts through the versions. You should always point to the latest version and leave it at that.

rkalwaitis
2nd February 2009, 21:24
Merlin7777

You are right, It was not working correctly for me for some reason at the time. I have since done as you suggested.

rkalwaitis
2nd February 2009, 21:29
Morsa,

Using your settings this worked for me.

SetMTMode(2,0)
DGDecode_mpeg2source("C:\Users\baba\Desktop\The Movie\VTS_01_1.d2v", info=3
ColorMatrix(hints=true, threads=0)
#deinterlace

#denoise

Import("C:\Users\baba\Desktop\MCTemporalDenoise\MCTemporalDenoise.v1.1.26.avsi")

Import("C:\Users\baba\Desktop\MCTemporalDenoise\GradFun2DBmod.v1.2.avsi")

crop( 0, 64, 0, -64)

MCTemporalDenoise(settings="low",GPU=false,stabilize=true, flat=true)

If you noticed my scripts are not in the plugins folder for avisynth. I was having problems with the various versions of MVTools (v2.3.0), Masktools (v2.0a35). So I keep both versions of both in seperate directories. Im not as smart as some of these guys who can make it work from the same directory. I had to seperate them sometimes for various scripts of things I want to do.

Any ways the script above worked for me :)
k

wyti
4th February 2009, 23:40
Thanks very nice script, i can completely get rid of ringing + high nose with this script and it don't take me 3 days to get a good result ;)

McCauley
5th February 2009, 13:29
Also i found this post (http://forum.doom9.org/showpost.php?p=1070478&postcount=5), i assume you know that already, but in case you don't it might of use for MCTemporalDenoise.
Another potentially useful post: click (http://forum.doom9.org/showthread.php?p=1153664#post1153664)

Just in case you haven't seen it yet.
Keep up your good work!

Regards
McCauley

PS: I hope it's okay to post such links in your thread. I don't want to bother you, or coerce you to further develop this script.

McCauley
9th February 2009, 12:41
Damn, i just accidentally deleted the last post....Sorry!

However i wanted to fix the typo, because it wasn't the cause of the error:
See here: new screenshots, fixed the copy pasta mess:
MPEG2Source("HM.d2v", cpu=0).tfm().tdecimate()
MCTemporalDenoise(edgeclean=true,ECmode="dfttest().dehalo_alpha()",gpu=false)
Crop(1150, 86, -152, -382)
http://img134.imageshack.us/img134/2374/newmcfh5.th.png (http://img134.imageshack.us/my.php?image=newmcfh5.png)

versus
MPEG2Source("HM.d2v", cpu=0).tfm().tdecimate()
dfttest().dehalo_alpha()
Crop(1150, 86, -152, -382)
http://img264.imageshack.us/img264/6803/newdffuf4.th.png (http://img264.imageshack.us/my.php?image=newdffuf4.png)

MPEG2Source("HM.d2v").tfm().tdecimate()
MCTemporalDenoisePP(edgeclean=true,ECmode="dfttest().dehalo_alpha()")
Crop(1150, 86, -152, -382)
http://img209.imageshack.us/img209/6360/newerrorcq0.png (http://imageshack.us)

Regards
McCauley

PS: Just a minor thing, but maybe it would be better to change the default for FFT3DGPU to false, on lower end cards it's a showstopper on HD content, took me a while to figure it out that this is the reason for beeing extremely slow.

LaTo
9th February 2009, 19:44
v1.1.27 :
fixed a bug in MCTemporalDenoisePP with chroma=false
adapted for LSFmod v1.5



MPEG2Source("HM.d2v").tfm().tdecimate()
MCTemporalDenoisePP(edgeclean=true,ECmode="dfttest().dehalo_alpha()")
Crop(1150, 86, -152, -382)
http://img209.imageshack.us/img209/6360/newerrorcq0.png (http://imageshack.us)

Fixed in v1.1.27 ;)

For edgeclean: try to increase ECrad (like 6-10) and maybe try to decrease ECthr too

McCauley
9th February 2009, 20:21
Thank you LaTo!

Regards
McCauley

LaTo
14th February 2009, 18:29
v1.2.20 :
adapted for LSFmod v1.6 & GradFun2DBmod v1.3
changed sharp int->bool (deleted sharp=1)

mozzle
14th February 2009, 23:44
Hi.

I recently built a new machine an now I'm having a problem when attempting to set gpu=false.

When I try to preview the following script

DGDecode_mpeg2source("C:\Documents and Settings\My Documents\DVDFab\MainMovie\BOURNE_IDENTITY\VIDEO_TS\VTS_01_1.d2v", info=3)
ColorMatrix(hints=true, threads=0)
crop( 0, 62, 0, -66)

MCTemporalDenoise(settings="low", gpu=false)

in AvsP, I get this error:

http://img177.imageshack.us/img177/2589/95334948iq9.gif

The script will not load in MEGUI, either.

I'm using MCTemporalDenoise.v1.2.00.avsi with MVTools 2.3.1.0
I have FFT3dGPU 0.8.2.0 installed and I have FFT3DFilter.dll (2.1.1.0) and fftw3.dll (no version info) in my AviSynth plugins folder.

System:

Microsoft Windows XP Pro SP3
CPU: Q6600 @ 2.40GHz
3.25 GB RAM
GPU: EVGA GeForce 8600 GTS (256MB/128-bit)

Let me know if you need more info.

:thanks:

XhmikosR
15th February 2009, 00:06
You should place fftw3.dll in your system32 directory in order to get FFT3DFilter to work. More info here (http://forum.doom9.org/showthread.php?t=85790).

mozzle
15th February 2009, 00:32
@XhmikosR

Thanks!

It's been about a year since I first set that up so I forgot. Thanks for the reminder.

zilog jones
16th February 2009, 17:49
Just discovered this filter yesterday - have to say I'm very impressed by what it can do with my VHS captures (using chroma=true of course :) ). Thanks!

McCauley
18th February 2009, 11:32
Hi LaTo,

would it be possible to implement a switch to denoise chroma ONLY? So one could call it twice, for example one for the luma with moderate settings and one for the chroma with higher settings or vice versa.
Maybe with a nice amplified view when show=true like with histogramm(mode="luma), so it is easier to spot the the small differences in the final output.
That would be terrific!

Regards
McCauley

Sagekilla
18th February 2009, 15:34
CDenoised = MCT() # Settings for chroma
LDenoised = MCT() # Settings for luma.
MergeLuma(CDenoised, LDenoised) ?

McCauley
18th February 2009, 20:38
Hi Sagekilla,

i thought about doing it that way, BUT if i do so i'm unnecessarily denoising the luma plane twice (or at all, if i just want to denoise the chroma plane).
If i just want to denoise the chroma plane(which i do), this workaround should approximatelly double the rendering time (correct me if i'm wrong?!).

Regards
McCauley

LaTo
18th February 2009, 20:39
Hi LaTo,

would it be possible to implement a switch to denoise chroma ONLY? So one could call it twice, for example one for the luma with moderate settings and one for the chroma with higher settings or vice versa.
Maybe with a nice amplified view when show=true like with histogramm(mode="luma), so it is easier to spot the the small differences in the final output.
That would be terrific!

Regards
McCauley
Good idea, in the next version... ;)

Didée
18th February 2009, 21:00
i thought about doing it that way, BUT if i do so i'm unnecessarily denoising the luma plane twice (or at all, if i just want to denoise the chroma plane).
If i just want to denoise the chroma plane(which i do), this workaround should approximatelly double the rendering time (correct me if i'm wrong?!).
If you want to denoise only the chroma planes, you can do MCT(parms).mergeluma(last) - no need to use two instances of the function.

If you want to denoise both luma and chroma, but each with different "strengths", then your suggestion is far, far suboptimal, since calling MCT two times creates *huge* overload: two times searching (the very same) vectors, two times creating (the very same) subpel-clips, etc.
In this case it would be better to modify the script internally so that it allows different strengths for luma and chroma.

LaTo
19th February 2009, 21:25
v1.2.02 :
changed default gpu=true to gpu=false (set gpu=true if you want speed!!!)
adapted to LSFmod v1.7

Great Dragon
22nd May 2009, 16:48
what MCTemporalDenoise() settings are equal to LSFmod() slow mode?
It seams i can't manage "soothe" via MCTemporalDenoise() script...

Adub
22nd May 2009, 18:51
Wait what? If you want to use LSFmod() then use LSFmod(). MCTemporalDenoise is a denoiser package, while LSFmod is just a sharpener.

If you want to achieve that same / similar settings as the slow mode, then enter the same values as found in LSFmod()'s slow mode into these parameters:
### +-------+
### | SHARP |
### +-------+-----------------------------------------------------------------------------------------------------------------------------+
### | sharp : Enable Post-Sharpening (Spatial-Sharpening + Motion-compensated temporal limiting) |
### | adapt : Adaptative sharpening --> sharp only static & detailed areas, prevents grain sharpening & save much bitrate (+-10/15%) |
### | strength : Sharpening strength ( see LSFmod: strength ) |
### | SHmode : Sharpening mode ( see LSFmod: Smode ) |
### | SHmethod : Sharpening method ( see LSFmod: Smethod ) |
### | Slimit : Spatial limiting ( see LSFmod: Lmode ) |
### | Sovershoot : Spatial overshoot ( see LSFmod: overshoot ) |
### | Tlimit : Temporal limiting (Motion compensated, clamp output to Tovershoot) |
### | Tovershoot : Temporal overshoot +-= Maximum sharpening excess allowed (If overrange=0, don't sharpen more than the original clip.) |
### | /!\ If you set Tovershoot>0, be sure that Slimit!=0 (to not over-enhance edges... Slimit=2 is a good compromise) |
### +-------------------------------------------------------------------------------------------------------------------------------------+
###

Great Dragon
22nd May 2009, 19:30
If you want to achieve that same / similar settings as the slow mode, then enter the same values as found in LSFmod()'s slow mode into these parameters:
This is what i mean to say.
But it seems there are not all LSFMod features implemented in MCTemporalDenoise. Like "soft", "soothe", "edgemode".
Maybe it better to disable MCTemporalDenoise Post-Sharpening and use LSFMod separately...

Adub
22nd May 2009, 20:14
If you want exactly the same settings as LSFmod() then I suggest you completely disable sharpening in MCTemporalDenoise and just append your own line of LSFmod() with your desired settings.

LaTo
22nd May 2009, 20:14
This is what i mean to say.
But it seems there are not all LSFMod features implemented in MCTemporalDenoise. Like "soft", "soothe", "edgemode".
Maybe it better to disable MCTemporalDenoise Post-Sharpening and use LSFMod separately...
No!

If these features are not in MCTD, it's just because they are usefulness with MCTD...

MCTD use some motion compensated stuff which are more or less the same:
- adapt replace edgemode
- Tlimiter replace soothe

Great Dragon
23rd May 2009, 05:49
LaTo, thanks for explanation.

Added: Multithread don't work with MCTD if stabilize=true. Tested with SetMtMode(2) and (5).

Chiba
30th May 2009, 22:48
Some results :
Core2Duo 3.0Ghz + 4Gb ram
High => 2.1fps @ 1280*720 (film)
Vhigh=> 1.3fps @1280*720 (film)

Very good filter ! Thank you LaTo

LaTo
12th June 2009, 18:19
v1.3.00 :
added a post-denoising stage (see "post")
fixed a bug with fixFFT3D and defined p clip
changed "very high" to be less insane
renamed fixFFT3D to fixband
cleaned some stuff
adapted to LSFmod v1.8

:devil:

@Tron@
15th June 2009, 09:37
Thx LaTo!!!

I like MCTemporalDenoise in begining and work only with him.

Wery B Iiiiiii G THX for update !! !!

PS and for LSFmod thx - cool sharp )))

mozzle
17th June 2009, 19:06
Thanks for the update and continued work on all of your scripts.

:thanks:

fleon
19th June 2009, 19:35
Hi, I am sorry but I have no idea in how to use your script, and it seems very good,so could you help me with a guide on how to use it with megui?

I have downloaded all the needed filters and I have put them in the avisynth plugin directory.

I know the basics of megui, by that I mean that I know that I have to index the dvd with the d2v creator and then open the d2v file with the avs script editor, but I am stuck there, I dont know how I can use MCTemporalDenoise from there, I wanna try the medium global setting..., or I guess I can submit a sample if anyone wants to help me out:)

lych_necross
17th July 2009, 08:09
Damn LaTo, MCTemporalDenoise is awesome! I used it with setmtmode(2,0), settings="medium", and gpu=true to encode Star Trek 3 last night with excellent results. :)

nitinpushpan
25th July 2009, 12:11
I noticed that none of the output shown in the thumbnails are resized. Do you apply this before or after resizing? If its before resizing then how is the quality after resizing it also?

nitinpushpan
25th July 2009, 12:30
If you're resizing then put it before the resize. If you're not resizing and just cropping then I guess one can put it before the cropping.

If the source is SD DVD like in my case where I used the above quick workarounds :):p

Will this avsi help if I apply it to a DVD video source and encode it using Gordian Knot with Xvid? I noticed that the thumbnails are 720p resolution. How is it going to help the final quality if I apply it before resizing? Am I supposed to apply other filters also after resizing?
Also am I suppose to enter all the paramters to get the quality or is "MCTemporalDenoise(settings="very low")" enough?
Here is the sample of the source I'm working on...

http://rapidshare.com/files/259775529/VTS_01_3.demuxed.m2v.html

Plus I noticed that LaTo's source video has a very good quality, then why would he wanna apply MCTemporalDenoise on it in the first place that too without resizing? I had to strain my eyes to notice the difference...

LaTo
25th July 2009, 15:14
Will this avsi help if I apply it to a DVD video source and encode it using Gordian Knot with Xvid? I noticed that the thumbnails are 720p resolution. How is it going to help the final quality if I apply it before resizing? Am I supposed to apply other filters also after resizing?
Test by yourself and pick the best to your eyes.

Also am I suppose to enter all the paramters to get the quality or is "MCTemporalDenoise(settings="very low")" enough?
Yes it's enough, but you can try with enhance=true and chroma=true...


Plus I noticed that LaTo's source video has a very good quality, then why would he wanna apply MCTemporalDenoise on it in the first place that too without resizing?
300 has strong grain and the 2nd has bad noise in the background.

I had to strain my eyes to notice the difference...
Maybe it's time to change your display :p

Caroliano
6th August 2009, 04:16
In the wiki (http://avisynth.org/mediawiki/MCTemporalDenoise), in the top right box the version number still 1.2.02, and in the required filters there is the following:

MVTools (v1.10.2.1) or MVToolsMULTI (v1.9.7.1)
MVTools (v2.3.1) (both MVTools filter needed!!!)

In the end of the page there is already information about the post-denoising stage and a link to the current version 1.3.00. Can I, or someone faster than me, update this and remove the old MVtools as requeriments?

canuckerfan
6th September 2009, 09:12
anyone got a mirror to ttempsmooth?

shoopdabloop
6th September 2009, 09:15
http://bengal.missouri.edu/~kes25c/

it's one of tritical's.

canuckerfan
6th September 2009, 09:29
thanks

canuckerfan
6th September 2009, 21:00
whenever I try to adjust the owoh and overlap parametres it tells me it doesn't know what bwbh and blocksize means... should there be a default value for theses parametres as well?

edit: anyone got a mirror for addgranc? this one, http://avisynth.org.ru/docs/english/externalfilters/addgrain.htm, doesn't seem to work for me.

GDAce
7th September 2009, 06:37
http://avisynth.org/warpenterprises/files/addgrainc_25_dll_20060610.zip

canuckerfan
7th September 2009, 21:04
cool. i finally got everything working now... just wanted to say how dynamic this script is!! good stuff!

Boulder
13th September 2009, 17:13
A small suggestion: internal padding to mod-16 before processing (or whatever is the most convenient and avoids error messages regarding illegal values for Crop) and then returning the original resolution.

tengo6dedos
14th September 2009, 17:13
Hello, is there an internal problem on using MVTools 2.5.3? it loads fine

LaTo
16th September 2009, 11:31
Hello, is there an internal problem on using MVTools 2.5.3? it loads fine

Yes, I haven't tested but it should be ok... Test and report please.

LaTo
17th September 2009, 07:05
I saw on some websites/pages that MCTD creates blur sometimes... So, I you want to eliminate most of the blur:

You should tweak the sigma parameter for each of your video if you want the best quality!

Personally when I use MCTD, it's 70% of the time: preset="low" with tweaked sigma value. (20% "medium", 10% "high", I never use "very low" and "very high"... Yes, my pourcentaces are perfectly calculated :D)

On top of that, I always use enhance=true because it finishes very well (http://forum.doom9.org/showthread.php?p=1243335#post1243335)... So you should try it :p

PS: remember to use chroma=true when it's necessary (and "post" parameter is also useful when you want tweak a little the denoising)

canuckerfan
19th September 2009, 19:05
using the flat=true option in the post-processing filter... should it be called after my sharpening routine or before?

LaTo
20th September 2009, 07:33
using the flat=true option in the post-processing filter... should it be called after my sharpening routine or before?

Always at the end.

canuckerfan
20th September 2009, 10:50
Always at the end.
that's what I thought. thank you.

Boulder
27th September 2009, 09:48
LaTo, there seems to be something in MCTemporalDenoise which makes a certain script cause an access violation with the 2.5.x branch of MVTools2: http://forum.doom9.org/showthread.php?p=1329180#post1329180 . Do you have any ideas where to start investigating further?

Arshad07
27th September 2009, 23:10
Does MCTemporalDenoise support Multi-Threading?

For example this script

SetMtMode(5)
import("D:\Encode\LSFmod.v1.8.avsi")
import("D:\Encode\MCTemporalDenoise.v1.3.00.avsi")
Import("D:\Encode\YLevels_mt.avsi")
Import("D:\Encode\plugins\plugins\MCBob.avsi")
LoadPlugin("D:\Encode\mvtools-v1.11.4.5\mvtools.dll")
LoadPlugin("D:\Encode\fft3dfilter211\FFT3DFilter.dll")
LoadPlugin("D:\Encode\MaskTools.dll")
LoadPlugin("D:\Encode\gradfun2db_25_dll_20060315\gradfun2db\gradfun2db.dll")
LoadPlugin("D:\Encode\medianblur084\medianblur.dll")
LoadPlugin("D:\Encode\ReduceFlicker\ReduceFlicker.dll")
LoadPlugin("D:\Encode\ReduceFlicker\ReduceFlickerSSE2.dll")
LoadPlugin("D:\Encode\ReduceFlicker\ReduceFlickerSSE3.dll")
LoadPlugin("D:\Encode\EEDI2v092\EEDI2\EEDI2.dll")
LoadPlugin("D:\Encode\mvtools2.dll")
Load_Stdcall_Plugin("C:\Program Files (x86)\megui\tools\yadif\yadif.dll")
AVCSource("C:\Users\Arshad\Desktop\TROTF.dga")
Addborders(0,94,0,94)
Spline64Resize(720,480)
SetMtMode(2)
YLevels(6, 1, 255, 0, 255)
Tweak(hue=0.0, sat=1.2, bright=0, cont=.97, coring=true, sse=false)
MCTemporalDenoise(settings="very low")
LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, Smode=3, strength=60, radius=2, Lmode=1, wide=false, overshoot=1, edgemode=0, special=false, exborder=0)

it doesnt seem to work :confused: It crashes in CCE SP2.

Arshad07
27th September 2009, 23:20
http://i33.tinypic.com/2iu6hc1.jpg

thewebchat
28th September 2009, 00:20
Your crash dialog says that the fault is in mt_masktools-26.dll! MaskTools2 is used in both MCTD and in LSF, and you should figure out which it is that is causing the crash. Also, mt_masktools-26.dll is for AviSynth 2.6!

Arshad07
28th September 2009, 00:29
When i removed mt_masktools_26.dll from my plugins folder, the error comes to masktools2 :confused:

thewebchat
28th September 2009, 01:03
Uh... Well, of course you'd get an error related to MaskTools2 if you remove it from your plugins folder.

LaTo
28th September 2009, 06:39
When i removed mt_masktools_26.dll from my plugins folder, the error comes to masktools2 :confused:

Remove mt_masktools_26.dll and put mt_masktools_25.dll in your plugins folder

LaTo
28th September 2009, 06:51
Hello, is there an internal problem on using MVTools 2.5.3? it loads fine

The last version working with MCTD is v2.4.7

If you want to use v2.5.x you should look at this (http://forum.doom9.org/showthread.php?p=1329353#post1329353)

Arshad07
28th September 2009, 09:11
Remove mt_masktools_26.dll and put mt_masktools_25.dll in your plugins folder

Can u upload it to sendspace for me plz? I cant seem to find it.

Didée
28th September 2009, 09:32
No. Really not. Primary home of the MaskTools package is here (http://manao4.free.fr/). The latest version is v20a36.

The content of the package:
http://i35.tinypic.com/2vcjdj9.png

If you managed to find the -26, but can't find the -25, then it's ... a serious case. ;)

Arshad07
28th September 2009, 10:13
No no no. I thought i'd seen somewhere but coundnt recall where exactly. Ohhh, now i see, its in the masktools folder ;)

LaTo
29th September 2009, 17:04
v1.3.09:
added MOD4 restriction
updated MVTools version

No problem with MVTools v2.5.5 ;)

Arshad07
29th September 2009, 18:57
No problem with MVTools v2.5.5 ;)

thank you :D

Magix_995
6th October 2009, 19:51
Hello

A problem here after complete re-setup of Avisynth and plugins/scripts :

http://nsa09.casimages.com/img/2009/10/06/mini_091006085828277411.png (http://www.casimages.com/img.php?i=091006085828277411.png)
in AVSP

Any idea ?
(excuse for my english)

Didée
6th October 2009, 20:19
http://forum.doom9.org/showthread.php?p=976573#post976573

canuckerfan
7th October 2009, 23:52
just curious if RemoveGrainHD (http://www.removegrainhd.de.tf/) is beneficial enough for HD content to warrant its implementation in MCTD?

byme
18th October 2009, 16:04
Can you tell me where is the fftw3.dll compatible with Avisynth 2.5 for FFT3DFilter?

http://i.imagehost.org/t/0055/av1.jpg (http://i.imagehost.org/view/0055/av1)

http://i.imagehost.org/t/0520/av2.jpg (http://i.imagehost.org/view/0520/av2)

canuckerfan
18th October 2009, 18:31
^put fftw3.dll in your system32 folder

byme
5th November 2009, 15:37
^put fftw3.dll in your system32 folder

I had already done ... still gives me error :(

I downloaded from here: http://avisynth.org/warpenterprises/

Didée
5th November 2009, 16:08
WinXP -> /system32
Vista -> /syswow64
Win7 -> like Vista

Nobody can know this, there never was big talk about it, except for a few hundred or thousand times. :rolleyes:

byme
6th November 2009, 15:56
WinXP -> /system32
Vista -> /syswow64
Win7 -> like Vista

Nobody can know this, there never was big talk about it, except for a few hundred or thousand times. :rolleyes:

thanks
I put it does not work anyway
continues to give error

http://www.picamatic.com/show/2009/11/06/05/56/5804710_bigthumb.PNG (http://www.picamatic.com/view/5804710_sys/)

there is something wrong with the script?

LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\DVD2AVI MPEG2DEC3\DGDecode.dll")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\DeBlock\deblock.dll")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\FFT3dGPU\FFT3dGPU.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\FFT3DFilter\FFT3DFilter.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\FFT3DFilter\fftw3.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\TTempSmooth\TTempSmooth.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\RemoveGrainHD\RemoveGrainHD.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\EEDI2\EEDI2.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\SangNom\SangNom.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\AddGrainC\AddGrainC.dll")
import("C:\Users\Propietario\Documents\Edit Video\Filtri\Deblock_QED\Deblock_QED.avsi")
import("C:\Users\Propietario\Documents\Edit Video\Filtri\MCTemporalDenoise\MCTemporalDenoise.avsi")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\MVTools2\mvtools2.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\MVTools\mvtools.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\MaskTools\mt_masktools.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\RemoveGrain\RemoveGrain.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\DctFilter\DctFilter.dll")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\RemoveGrain\Repair.dll")
import("C:\Users\Propietario\Documents\Edit Video\Filtri\LimitedSharpenFaster MOD\LimitedSharpenFaster MOD.avsi")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\DB_LSF\MaskTools.dll")
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\Deen\Deen.dll")
import("C:\Users\Propietario\Documents\Edit Video\Filtri\HQDering\HQDering.avsi")
##
LoadPlugin("C:\Users\Propietario\Documents\Edit Video\Filtri\GradFun2db\gradfun2db.dll")
Import("C:\Users\Propietario\Documents\Edit Video\Filtri\GradFun2db\GradFunkMirror.avs")

####

AviSource("E:\Capture\Capture8.avi").ConvertToYV12()
Deblock()
BlindPP(cpu=4)
MCTemporalDenoise()
###LSFmod()
HQDering()
GradFunkMirror()
ConvertToRGB()

Didée
6th November 2009, 16:31
You must not load fftw3.dll via LoadPlugin(). (English "must not" means "forbidden!".)

fftw3.dll --> put in system path, usually system32/syswow64. After that, just forget about it.
fft3dfilter.dll --> load with LoadPlugin()

That's all.

byme
7th November 2009, 13:38
:thanks:

If were to recommend ... recommend me the MCTemporalDenoise or Mc_Spuds?

LaTo
25th November 2009, 18:44
:thanks:

If were to recommend ... recommend me the MCTemporalDenoise or Mc_Spuds?

We are on MCTD thread, so I recommend MCTemporalDenoise :p


Denoising part is more or less the same between the two (MCTD has also a protection against banding, Spuds not), but MCTD has a better sharpening routine.
On top, MCTD has "enhance" option which is really useful ;)

Undead Sega
20th December 2009, 03:29
I dont know fi anyone is having this problem, but im using:

ECmode="dfttest().dehalo_alpha()"

and im getting an error stating that there is no such function as 'dfttest' in the avsi script, which i find very strange, i even looked at it and even if thre was such function, and i never modified anything on it either.

Can anyon help me on this please?

LaTo
20th December 2009, 08:01
I dont know fi anyone is having this problem, but im using:

ECmode="dfttest().dehalo_alpha()"

and im getting an error stating that there is no such function as 'dfttest' in the avsi script, which i find very strange, i even looked at it and even if thre was such function, and i never modified anything on it either.

Can anyon help me on this please?

This code is just an example, not an universal solution :)
But if you really want this, you need to download dfttest and dehalo_alpha and put them in your avisynth's folder (search in the forum).

Undead Sega
21st December 2009, 02:47
downloaded dfttest and dehalo_alpha, i put dfttest in the plugins folder and libfftw3f-3.dll in the systems folder (actually in SysWOW64 as i am using Win7 64bit), and while i thought it was about to work, i am getting an error message saying "there is no named fucntion called 'expand'". Ive done everything correctly and i cant even find any function (after a quick search) called 'expand'. What could i be doing wrong with time? :(

MatLz
21st December 2009, 02:55
Expand is a filter present in masktools plugin.

LaTo
21st December 2009, 07:49
downloaded dfttest and dehalo_alpha, i put dfttest in the plugins folder and libfftw3f-3.dll in the systems folder (actually in SysWOW64 as i am using Win7 64bit), and while i thought it was about to work, i am getting an error message saying "there is no named fucntion called 'expand'". Ive done everything correctly and i cant even find any function (after a quick search) called 'expand'. What could i be doing wrong with time? :(

You need all these functions:

### /!\ Needed filters: MVTools (v2.4.7 or v2.5.5), Masktools (v2.0a36),
### ------------------- LSFmod (v1.9), FFT3Dgpu (v0.8.2.7) or FFT3Dfilter (v2.1.1),
### TTempsmooth (v0.9.4), Removegrain + Repair (v1.0PR),
### Deblock (v1.2), Deblock_QED (18.aug.2008),
### EEDI2 (v0.9.2), Sangnom (v1.0beta),
### GradFun2DBmod (v1.3), Gradfun2db (v1.0), AddgrainC (v1.4).

:devil:

Undead Sega
21st December 2009, 16:49
well this is what ive got in my script:

LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\MT=true - MVTools_V1.9.7.7\Intel10-Core2-SSE3\mvTools.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\mvtools-v2.4.7\mvtools2.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\RemoveGrain-1.0\RemoveGrainSSE3.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\RemoveGrain-1.0\RepairSSE3.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\masktools-v2.0a35\mt_masktools-25.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\masktools-v2.0a35\mt_masktools-26.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\nnedi2\nnedi2.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\fft3dgpu0.8.2\FFT3dGPU.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\fft3dfilter211\FFT3DFilter.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\TTempSmooth\TTempSmooth.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\deblock12\deblock.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\EEDI2v092 multithreaded\EEDI2_imp.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\sangnom_25_dll_20040118\SangNom.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\gradfun2db\gradfun2db.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\DctFilter\DctFilter.dll")
LoadPlugin("C:\Downloads\VirtualDub-1.8.6\Requirements\dfttest\dfttest.dll")
Import("C:\Downloads\VirtualDub-1.8.6\Requirements\Deblock_QED.avsi")
Import("C:\Downloads\VirtualDub-1.8.6\Requirements\LSFmod.v1.9.avsi")
Import("C:\Downloads\VirtualDub-1.8.6\MCTemporalDenoise.v1.3.09.avsi")
Import("C:\Downloads\VirtualDub-1.8.6\EdgeCleaner.avsi")
Import("C:\Downloads\VirtualDub-1.8.6\Dehalo_Alpha.avsi")

im pretty sure i have all the required functions dont i?

Undead Sega
21st December 2009, 16:52
hold on lads, i got it working! :D

owais
18th January 2010, 22:24
hmm.. i want to ask one thing that if i turn on edgecleaner then i hav to add other parametes related like ECrad, ECthr, ECmode ??

for eg: MCTemporalDenoise(settings="low", edgeclean=true) is it correct ?

AND

i was seeing parameters (http://avisynth.org/mediawiki/MCTemporalDenoise#Parameters) from here
first section is of denoising my source has no noise but is blocky so should i use denoise ?
how to completely turn off denoise parameters if i want?

LaTo
19th January 2010, 07:43
hmm.. i want to ask one thing that if i turn on edgecleaner then i hav to add other parametes related like ECrad, ECthr, ECmode ??

for eg: MCTemporalDenoise(settings="low", edgeclean=true) is it correct ?
Yes, you don't need to add other parameters...



i was seeing parameters (http://avisynth.org/mediawiki/MCTemporalDenoise#Parameters) from here
first section is of denoising my source has no noise but is blocky so should i use denoise ?
how to completely turn off denoise parameters if i want?
Mediawiki is a bit outdated for MCTD, look at the readme in the .avsi script

You can't turn off denoising in MCTemporalDenoise, but you should look at MCTemporalDenoisePP (it's the post-processor of MCTD)

owais
19th January 2010, 17:41
You can't turn off denoising in MCTemporalDenoise, but you should look at MCTemporalDenoisePP (it's the post-processor of MCTD)

Got it thnx

owais
20th January 2010, 04:04
I was reading .avsi, in Parameters section there were heading of |BLOCKSIZE/OVERLAP| |FFT3D| |MVTOOLS| what are they for ? (this is my first time using filters in avisynth :o) cause i m also goin to use MCTemporalDenoisePP
what i think here is also denoising...

and am i right that noise in video is tiny dots dancing around? (what i observed from ur 300's screenshots)

owais
21st January 2010, 23:39
ok just tell me what are the funtions of |BLOCKSIZE/OVERLAP| |FFT3D| |MVTOOLS| parameters
i mean what does they doo?

thetoof
22nd January 2010, 01:52
In a nutshell :
mvtools estimates motion by comparing blocks of frame for subsequent frames and calculating SAD (sum of absolute differences) between those blocks
blocksize is the size of these blocks, overlap the overlap of the blocks and so forth (gotta luuuve these blocks)
For more info you should really read the mvtools2 docs

fft3d is (I guess) the strength of the prefiltering.

Since you are not (yet) an advanced user, I'd recommend stick to the presets/defaults and lurk around to learn how to identify problems and appropriate filters. There's a thread floating around about "what are the up-to-date most recommended filters people use" or something...

Great Dragon
22nd January 2010, 11:34
Hi
I've noticed that some frames are not processed with MCTD. I think it's because there is completely no movement.

Here is a sample video
http://rapidshare.com/files/339223519/sample.demuxed.m2v

And 2 screens with "problem" frames.
http://thumbnails25.imagebam.com/6481/06bc6464801633.gif (http://www.imagebam.com/image/06bc6464801633) http://thumbnails25.imagebam.com/6481/cc4f6b64801634.gif (http://www.imagebam.com/image/cc4f6b64801634)

Script i've used:

DGDecode_mpeg2source("e:\_berserk\10.d2v", info=3).ColorMatrix(hints=true, threads=0)
AnimeIVTC(mode=1, aa=3)
orig=last
temp=orig.TemporalSoften(7,255,255,25,2)
rep=Repair(temp,orig,mode=16).TemporalSoften(1,255,255,25,2)
source=Interleave(rep,orig,rep)
mdata=DePanEstimate(source, range=1, trust=0, dxmax=1, dymax=1)
DePan(source, data=mdata, offset=1)
SelectEvery(3,2)
MCTemporalDenoise(settings="high", sigma=4, twopass=true, stabilize=true, gpu=true, flat=true, edgeclean=true, truemotion=true, AGstr=0.0, /
GFthr=1.0, ECrad=6, ECthr=16, ECmode="dfttest().dehalo_alpha()", SHmode=5, Tovershoot=0)
HQDn3D(2,1.5,3,2.25)
LSFmod(defaults="slow")

owais
22nd January 2010, 17:23
In a nutshell :
mvtools estimates motion by comparing blocks of frame for subsequent frames and calculating SAD (sum of absolute differences) between those blocks
blocksize is the size of these blocks, overlap the overlap of the blocks and so forth (gotta luuuve these blocks)
For more info you should really read the mvtools2 docs

fft3d is (I guess) the strength of the prefiltering.

Since you are not (yet) an advanced user, I'd recommend stick to the presets/defaults and lurk around to learn how to identify problems and appropriate filters. There's a thread floating around about "what are the up-to-date most recommended filters people use" or something...

:thanks: , i will research more

owais
23rd January 2010, 22:40
i was reading .avsi and i saw that in "very high" there is no deblocking, i mean that both deblock and qed are false ,so i m confused :confused: if yes then why?

zilog jones
27th January 2010, 00:43
There's no deblocking in any presets, so why should there be for "very high"? Personally, I use the filter VHS transfers so generally have no need for deblocking.

LaTo
27th January 2010, 17:26
i was reading .avsi and i saw that in "very high" there is no deblocking, i mean that both deblock and qed are false ,so i m confused :confused: if yes then why?

Protect, AA, Deblock and Edgeclean are OFF by default in every presets... It's because these functions depend on the source used.
But, the effect will be stronger in high preset than in low preset :)

Korben
27th January 2010, 20:13
Hi Lato,
how can I force some of the parameter when I am using predefided settings.
For example:
MCTemporalDenoise(settings="very high", chroma = true, twopass = true, radius = 12)
Is it/this possible?
Regards

Boulder
27th January 2010, 20:57
Yes, it is possible. I do it all the time.

Korben
27th January 2010, 21:28
Ok. thanks..

LaTo
28th January 2010, 09:11
v1.4.00 :
fixed bug with maxdiff=0
fixed speed issue in MCTemporalDenoisePP (+20%)
added "deblock" to MCTemporalDenoisePP
changed "flat" to "enhance"
cleaned and optimized all the code
changed some settings
updated documentation

:devil:

rkalwaitis
28th January 2010, 09:20
Thanks

kool
28th January 2010, 11:56
For example if I don't want to use any function from MCTemporalDenoise, I have to add =false to it like "sharp=false" ?

LaTo
28th January 2010, 12:23
For example if I don't want to use any function from MCTemporalDenoise, I have to add =false to it like "sharp=false" ?
yes of course

elguaxo
28th January 2010, 16:42
LaTo, I just upgraded to v1.4.00. I have all your filters as .AVS (not .avsi) and I import them when needed.

Right now I'm importing just MCTemporalDenoise.v1.4.00.avs and I call it with these options:

MCTemporalDenoise(settings="low",GPU=false,sigma=2,ncpu=2,enhance=false,sharp=false)

In your previous versions when sharp=false there was no need to import LSFmod, but now I get this:

http://i50.tinypic.com/2j0oap5.png

Should I import it even when using sharp=false, or is there something wrong?

TIA! :)

LaTo
28th January 2010, 17:26
LaTo, I just upgraded to v1.4.00. I have all your filters as .AVS (not .avsi) and I import them when needed.

Right now I'm importing just MCTemporalDenoise.v1.4.00.avs and I call it with these options:

MCTemporalDenoise(settings="low",GPU=false,sigma=2,ncpu=2,enhance=false,sharp=false)

In your previous versions when sharp=false there was no need to import LSFmod, but now I get this:

http://i50.tinypic.com/2j0oap5.png

Should I import it even when using sharp=false, or is there something wrong?

TIA! :)

It's okay... Yes you should import it ;)

elguaxo
28th January 2010, 18:08
It's okay... Yes you should import it ;)

Great! Thanks for your quick answer.

LaTo
28th January 2010, 18:18
v1.4.07 :
improved masking in PP-stage
cleaned code (cosmetic)

:p

mozzle
29th January 2010, 06:19
Thanks for the continued work, Lato! Much appreciated. :)

Yobbo
29th January 2010, 22:18
I am finding that MCTD v1.4.07 is crashing avisynth. If I remove the .avsi from my plugins folder, avisynth works again.

(BTW it crashes even if I'm not calling MCTD in my script!?)

(I am using AvsP)

LaTo
30th January 2010, 08:16
I am finding that MCTD v1.4.07 is crashing avisynth. If I remove the .avsi from my plugins folder, avisynth works again.

(BTW it crashes even if I'm not calling MCTD in my script!?)

(I am using AvsP)

Crash only in Avsp?

Great Dragon
30th January 2010, 09:15
Guys, what about "no movement scenes issue" i've posted (http://forum.doom9.org/showpost.php?p=1366562&postcount=260) before? Any ideas how to fix it? I understand that MCTD it's a temporal denoiser and not a spatial but anyway.
I don't have such problem before and now i have 2 cartoons with it. Movies looks fine.

LaTo
30th January 2010, 10:07
Guys, what about "no movement scenes issue" i've posted (http://forum.doom9.org/showpost.php?p=1366562&postcount=260) before? Any ideas how to fix it? I understand that MCTD it's a temporal denoiser and not a spatial but anyway.
I don't have such problem before and now i have 2 cartoons with it. Movies looks fine.

This scene is a repetition of the same frame with the "same grain" (the grain is fixed, not moving in this scene)...

For these scenes, you need to use a spatial denoiser "fft3dfilter(bt=1)" or try with "post=xx" in MCTD

Poutnik
30th January 2010, 10:33
I have tried MCTemporatDenoise for first time. (v1.4.07)
I was afraid about crashes and missing filters, but it seems running OK, even with GPU=true and in MT().

but I have noticed something strange. I have tried Deblock=true and it complained about missing DCTFilter ( not mentioned in dependencies ) - I added it.

Then it complained about not being MOD16 clip.

Avisynth open failure: This is not a MOD16 clip! Please use crop() or addborders() before using MCTemporalDenoisePP() with deblock=true

(m:\wfwa\scripts\MCTemporalDenoise.avsi, line 948)
(m:\wfwa\scripts\MCTemporalDenoise.avsi, line 1077)

The problem is the clip IS MOD16, being PAL 720*576. Even VirtualDub with loaded main AVS shows 720*576.
The same if MT was removed ( but even MTed the clip should remain MOD16).

Edit: Well MT() was not the best idea for MC, was it ? :-)

LaTo
30th January 2010, 10:35
I have tried MCTemporatDenoise for first time.
I was afraid about crashes and missing filters, but it seems running OK, even with GPU=true and in MT().

but I have noticed something strange. I have tried Deblock=true and it complained about missing DCTFilter ( not mentioned in dependencies ) - I added it.

Then it complained about not being MOD16 clip.

Avisynth open failure: This is not a MOD16 clip! Please use crop() or addborders() before using MCTemporalDenoisePP() with deblock=true

(m:\wfwa\scripts\MCTemporalDenoise.avsi, line 948)
(m:\wfwa\scripts\MCTemporalDenoise.avsi, line 1077)

The problem is the clip IS MOD16, being PAL 720*576.
The same if MT was removed ( but even MTed the clip should remain MOD16).

Found the bug, i will fix that... Thanks! ;)

edit: done

LaTo
30th January 2010, 10:50
v1.4.08
fixed MOD16 warning when deblock=true

Poutnik
30th January 2010, 10:57
Being late with editing of previous post:

I have read for mpg2 sources it is recommended using deblocking of MPEG2source(cpu=4 or 6), said being in some way adaptive in contrary to BlindPP() or Deblock().
How compares this with MCTD deblocking ( Deblock + Deblock QED) ?

LaTo
30th January 2010, 11:06
Being late with editing of previous post:

I have read for mpg2 sources it is recommended using deblocking of MPEG2source(cpu=4 or 6), said being in some way adaptive in contrary to BlindPP() or Deblock().
How compares this with MCTD deblocking ( Deblock + Deblock QED) ?

MCTD deblocking is a simple call to Deblock or Deblock_QED...
But using it inside of MCTD helps to retain more details than using it outside, try and pick the best for you ;)

Yobbo
30th January 2010, 19:14
Crash only in Avsp?

AvsP and MPC-HC.

v1.4.08 doesn't crash it now, but I get "Script error: there is no function named MCTemporalDenoise".

Any idea what is going on? Everything was working fine until I upgraded to 1.4.07.

LaTo
30th January 2010, 20:37
AvsP and MPC-HC.

v1.4.08 doesn't crash it now, but I get "Script error: there is no function named MCTemporalDenoise".

Any idea what is going on? Everything was working fine until I upgraded to 1.4.07.

It's a problem on your side, try to reinstall avisynth and/or clean your plugins folder...

Yobbo
31st January 2010, 04:17
I've done that, LaTo. Reinstalled avisynth, also cleaned out plugins folder and added things back one by one. Added all the correct MCTD dependencies, but as soon as I add the MCTD.avsi I hit problems.

As I said, 1.4.07 crashed avisynth. 1.4.08 doesn't bomb out however I get the "there is no function blah blah" message.

I have no idea what's up!?

Can I possibly get access to a pre-1.4.07 MCTD to see if that works?

LaTo
31st January 2010, 08:26
I've done that, LaTo. Reinstalled avisynth, also cleaned out plugins folder and added things back one by one. Added all the correct MCTD dependencies, but as soon as I add the MCTD.avsi I hit problems.

As I said, 1.4.07 crashed avisynth. 1.4.08 doesn't bomb out however I get the "there is no function blah blah" message.

I have no idea what's up!?

Can I possibly get access to a pre-1.4.07 MCTD to see if that works?
Please, give me a list of files in your plugins folder.

And, you have installed MT avisynth or avisynth?

Yobbo
31st January 2010, 08:56
AddGrainC.dll
DctFilter.dll
deblock.dll
Deblock_QED.avsi
EEDI2.dll
ffms2.dll
ffmsindex.exe
FFT3DFilter.dll
gradfun2db.dll
GradFun2DBmod.avsi
LSFMod.avsi
MCTemporalDenoise.avsi
mt_masktools-26.dll
mvtools2.dll
RemoveGrainSSE2.dll
Repair.dll
SangNom.dll
TTempSmooth.dll

I have Avisynth 2.60 Alpha 2 (not MT)?

LaTo
31st January 2010, 09:16
Why do you use v2.60 alpha 2 ? It's a development version, so just for testing...

Try with v2.5.8 please.

Yobbo
31st January 2010, 10:38
LaTo, I'm so sorry for wasting your time. Everything's working now. I stuffed up with selecting all your script and saving it. I'm a klutz.

Thanks for your ongoing development with this!

gigantibyte
1st February 2010, 05:04
I was using RemoveNoiseMC with LimitedSharpenFaster, but wasn't getting the best results. Tried MCTemporalDenoise() (with no parameters) and was very impressed! It took a bit of setup to get all the plugins and scripts required, but it was well worth it. Your work on this filter is appreciated.

mozzle
2nd February 2010, 20:27
I am getting the following error in MeGUI with 1.4.08:

AviSynth script error:

'mode' have not a correct value! [1,2,3]

(GradFun2dBmod.v.1.5.avsi, line 175)
(MCTemporalDenoise.v.1.4.08.avsi, line 1061)
(MCTemporalDenoise.v.1.4.08.avsi, line 1079)
(C:\PATH TO AVS SCRIPT)

My script:

LoadPlugin("C:\Program Files\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Documents and Settings\My Documents\VID\VIDEO_TS\VTS_01_1.d2v", info=3)
LoadPlugin("C:\Program Files\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop( 0, 62, 0, -66)

MCTemporalDenoise(settings="very low", chroma=true)

I am using MeGUI 0.3.3.2 and Avisynth 2.5.8

Running Windows XP SP3 / Intel Core2 Quad 6600 2.4Ghz / 3.2 GB RAM / Nvidia GEForce 8600GTS

Any help would be appreciated. :thanks:

LaTo
2nd February 2010, 20:57
I am getting the following error in MeGUI with 1.4.08:



My script:



I am using MeGUI 0.3.3.2 and Avisynth 2.5.8

Running Windows XP SP3 / Intel Core2 Quad 6600 2.4Ghz / 3.2 GB RAM / Nvidia GEForce 8600GTS

Any help would be appreciated. :thanks:

Re-download GradFun2DBmod v1.5! (here (http://forum.doom9.org/showthread.php?p=1358005#post1358005))

mozzle
2nd February 2010, 21:17
Re-download GradFun2DBmod v1.5! (here (http://forum.doom9.org/showthread.php?p=1358005#post1358005))

That did the trick!

:thanks:

Emulgator
6th February 2010, 14:18
Many, many thanks to LaTo for a great script !

Boulder
7th February 2010, 22:59
Are the older versions available somewhere? I'd like to test versions from v1.3.0.0 on to see whether my odd x264 crashes are due to MCTD. It is pretty much the only thing that I have changed recently and debugging x264 pointed the error to be related to Avisynth.

crasus
8th February 2010, 02:23
What's the proper way of using MT with MCTemporalDenoise? (tsp's dll or MT avisynth 2.5.8 / mode 2 or 3 etc.)

My line :

MCTemporalDenoise(settings="very high", twopass=false, useTTmpSm=true, gpu=true, sharp=false, adapt=false, deblock=true)

Thanks! :)

LaTo
8th February 2010, 07:31
Are the older versions available somewhere? I'd like to test versions from v1.3.0.0 on to see whether my odd x264 crashes are due to MCTD. It is pretty much the only thing that I have changed recently and debugging x264 pointed the error to be related to Avisynth.

Here v1.3.09 (http://latoninf.free.fr/d9/MCTD/MCTemporalDenoise.v1.3.09.avsi) ;)

Terka
8th February 2010, 10:00
Hi LaTo,
have you tried the pre-search routine for better motion vectors search introduced by Didee in TGMC?

Didée
8th February 2010, 10:55
What for? MCTD already offers "normal" pre-filtering for motionsearch, and that is fully sufficient. The routine in TGMC is custom-tailored to remove the typical on-off-on-off resp. up-down-up-down of spatially-interpolated bobbing. For arbitrary non-interlaced input, there is not any benefit to use that particular method. Chances are that it would come out less good than FFT3D-prefiltering.

For very tough cases, sometimes it is benefitial to use some additional stabilization after FFT3D, since FFT3D might leave back some "nervous" areas that still can mislead the motion engine (see the "HQDN3D" addendum in my predecessor-to-MCTemporalDenoise script). (In MCTD, this is partly achieved via debanding - it's not temporal stabilisation, but helps to dimish the sideffects that *floating* banding imposes on the motionsearch).
But that's big guns for big enemies, and not related to what TGMC is doing.

Terka
8th February 2010, 13:18
ok. to be clear for me.
(all following is regarding progressive filtering)
1.temporalsoften routine from TGMC part is worse than ttf3d (or fft3d +HQDN3D)
2.how do you check the quality of motion search? (mean for practical testing-which prefilter to use etc.)

Didée
8th February 2010, 13:55
1.temporalsoften routine from TGMC part is worse than ttf3d (or fft3d +HQDN3D)
No, that's a false statement. If it would be "worse" and FFT3D would be "better", then tell me why I didn't use FFT3D within TGMC?

It's not worse, it's just different. For what is to be done in TGMC, the temp-gauss temporalsoften is method-of-choice. For general noise removal prior to motionsearch, FFT3D is the (most versatile) method of choice.

A hammer for the nails, a screwdriver for the screws. Each for it's own purpose.

( I know you said "(all following is regarding progressive filtering)" - but even in TGMC, all filtering is in fact done on progressive frames...)


2.how do you check the quality of motion search?
Eyeballing + experience. Very rarely, vector visualisation.

Terka
8th February 2010, 15:49
my problem is i cant recognize the nails/screws without putting the screwdriver on it.

mozzle
9th February 2010, 04:04
Are the older versions available somewhere? I'd like to test versions from v1.3.0.0 on to see whether my odd x264 crashes are due to MCTD. It is pretty much the only thing that I have changed recently and debugging x264 pointed the error to be related to Avisynth.


Hey Boulder. Did you figure out if it was MCTD that was crashing x264. I've been having the same crashing issue and had to revert back to x264 v1400.

Boulder
9th February 2010, 04:46
No, at least v1.3.0.9 didn't help and that's where the bigger changes were not yet introduced. I'm currently running a test to see whether a different Avisynth version helps (I used to have 2.6.0-MT but now I'm trying 2.5.8-MT). If that doesn't help, I'll try non-ICL builds of x264.

~SimpleX~
9th February 2010, 23:48
First of all, thanks for awesome script, LaTo. But I got some problems when tried to encode my video.

That's the problem: http://www.mediafire.com/imageview.php?quickkey=4jzvwmmmy2j

And this's the script I used:


setMTMode(2,0)
SetMemoryMax(256)

src=DGDecode_MPEG2Source("C:\Encoding\Cafe Junkie\VTS_01_1.d2v", info=3, cpu=0)

src=src.ColorMatrix(hints=true, threads=0)

progressive=src.AnimeIVTC(mode=1, aa=1, ifade=true)

ECMode="DFTTest().dehalo_alpha_MT(darkstr=0.7,brightstr=1.7)."+
\ "awarpsharp2(depth=10, blur=2, chroma=2).FastLineDarkenMOD(thinning=12,strength=80, luma_cap=170)"

denoised=progressive.MCTemporalDenoise(\
settings="low", radius=2, GPU=false, fixband=true, sigma=3, chroma=true ,\
edgeclean=true, ECmode=ECMode, ECrad=3, ECthr=16 ,\
enhance=true ,\
protect=true ,\
sharp=true, strength=140 ,\
post=0 ,\
deblock=true )



final=denoised.ediaa().Tweak(sat=1.1).Crop(0,0,-2,0).Spline36Resize(720, 540)

final
__film = last
__t0 = __film.trim(0, 36751)
__t0


What am I doing wrong?

Boulder
10th February 2010, 04:39
No, at least v1.3.0.9 didn't help and that's where the bigger changes were not yet introduced. I'm currently running a test to see whether a different Avisynth version helps (I used to have 2.6.0-MT but now I'm trying 2.5.8-MT). If that doesn't help, I'll try non-ICL builds of x264.

It seems that Avisynth 2.6.0-MT causes the problem, no crashing with 2.5.8. I'll have to ask SEt to see if he can find anything wrong there.

ninja_racoon
18th February 2010, 12:30
there's a problem when I use MT and MCT+global settings together

MT("MCTemporalDenoise(settings="low")",2,0)

how can I get this to work?

Gavino
18th February 2010, 12:32
MT("MCTemporalDenoise(settings="low")",2,0)

how can I get this to work?
Use triple quotes to allow nested string literals:
MT("""MCTemporalDenoise(settings="low")""",2,0)

Poutnik
19th February 2010, 00:43
Use triple quotes to allow nested string literals:
MT("""MCTemporalDenoise(settings="low")""",2,0)

The question is, if MT() in conjunction of MC scripts is a good idea.
Most people think it is not, because MC need to cover all spatial scope.

nautilus7
25th March 2010, 01:13
I get an error when using settings="very low" or settings= "low". It seems that mode doesn't have the correct value in line 1060:

GFc = (enhance==true) ? TTc.GradFun2DBmod(thr=GFthr,thrC=chroma?GFthr:1.0,mode=0,str=AGstr,strC=0.0,temp=temp,adapt=bias,mask=false,show=false)

http://img511.imageshack.us/img511/5832/errorhm.png

Blue_MiSfit
25th March 2010, 01:31
Meh.. I use MT all the time with MDegrain2. It's not optimal, but I've yet to see hideous artifacts.

SetMTMode is probably preferable, but it's caused more problems in my case.

MCTD is fantastic, especially in a pure 64 bit environment with the latest 2.5.8 builds!!!

~MiSfit

LaTo
25th March 2010, 07:20
I get an error when using settings="very low" or settings= "low". It seems that mode doesn't have the correct value in line 1060:

GFc = (enhance==true) ? TTc.GradFun2DBmod(thr=GFthr,thrC=chroma?GFthr:1.0,mode=0,str=AGstr,strC=0.0,temp=temp,adapt=bias,mask=false,show=false)

I am getting the following error in MeGUI with 1.4.08:

AviSynth script error:

'mode' have not a correct value! [1,2,3]

(GradFun2dBmod.v.1.5.avsi, line 175)
(MCTemporalDenoise.v.1.4.08.avsi, line 1061)
(MCTemporalDenoise.v.1.4.08.avsi, line 1079)
(C:\PATH TO AVS SCRIPT)

Any help would be appreciated. :thanks:

Re-download GradFun2DBmod v1.5! (here (http://forum.doom9.org/showthread.php?p=1358005#post1358005))

Answer was in the topic, page 15 :D

nautilus7
25th March 2010, 14:14
Sorry, my bad.

Poutnik
26th March 2010, 05:54
....
MCTD is fantastic, especially in a pure 64 bit environment with the latest 2.5.8 builds!!!

I feel little simple-minded but how is it possible to use MCTD in pure 64bit enviroment ?
I know there is 64bit Avisynth, but are there all needed Avisynth plugins ported to 64bit yet?
It would be great news for me.

levi
26th March 2010, 06:02
not to get off-topic, but you can find the 64bit avisynth + 64 bit plugins here (http://forum.doom9.org/showthread.php?t=152800)

~Revolution~
26th March 2010, 06:24
I'm not sure if its just me but MDegrain2 with MT always causes a transparent type, very light, grainy horizontal line straight in the middle of the video.

lych_necross
26th March 2010, 07:20
How much faster would MCTD perform using a 64bit build of avisynth and 64bit pluigns versus all 32bit avisynth software?

osgZach
26th March 2010, 17:00
I'm not sure if its just me but MDegrain2 with MT always causes a transparent type, very light, grainy horizontal line straight in the middle of the video.

Are you sure its not an MT related artifact from the split frame ?

Try using the overlap parameter if you haven't yet.

Poutnik
30th March 2010, 22:13
not to get off-topic, but you can find the 64bit avisynth + 64 bit plugins here (http://forum.doom9.org/showthread.php?t=152800)

Is there x64 DctFilter, required by Deblock QED from MCTD ?
I cannot find it either in x64 AVS 2.5.8 MT thread, either on Squid80 site.....

Didée
30th March 2010, 22:27
AFAIK, no .... DCTFilter hasn't been ported yet.

But if someone *would* port it, that would be a good occasion to eliminate the stripe-bug that DCTFilter has had ever since. ;)

LaTo
31st March 2010, 06:26
Is there x64 DctFilter, required by Deblock QED from MCTD ?
I cannot find it either in x64 AVS 2.5.8 MT thread, either on Squid80 site.....

If you don't use deblocking in MCTD then you don't need DctFilter ;)

Poutnik
31st March 2010, 17:14
If you don't use deblocking in MCTD then you don't need DctFilter ;)

I know :) but even with Deblock=false my Vdub64 is crashing after few frames, and avs2avi64 after some dozens of frames.

later I will try by cut away method to detect what plugin causes it.
AVS64 itself seems to be fine.

It is a pitty, because MCTD32 is nice and stable, but little speeding up would be handful.

greatmagician
5th April 2010, 13:32
thanx brother .... I have ? here
LaTo this working with the mod 16
in this case i ca'nt edit the size for ex: I got with mod16 (1280 X 528 ) I got DAR 2.42.1 > but i want to fix it it must be in DAR 2.35.1 ( 1280 X 534 )
but the problem i can't because I will get the error :
This is Not a MOD4 clop! >> in this case what I will do ??!!

thanx alot LaTo ...

LaTo
6th April 2010, 06:51
thanx brother .... I have ? here
LaTo this working with the mod 16
in this case i ca'nt edit the size for ex: I got with mod16 (1280 X 528 ) I got DAR 2.42.1 > but i want to fix it it must be in DAR 2.35.1 ( 1280 X 534 )
but the problem i can't because I will get the error :
This is Not a MOD4 clop! >> in this case what I will do ??!!

thanx alot LaTo ...
Width and height must be divisible by 4.

or workaround:
Addborders(0,2,0,0)
MCTemporalDenoise(...)
Crop(0,2,0,0)

greatmagician
6th April 2010, 08:03
Width and height must be divisible by 4.

or workaround:
Addborders(0,2,0,0)
MCTemporalDenoise(...)
Crop(0,2,0,0)

thnx LaTo but :confused: but the DAR same ( 2.42:1 )

this my script :
crop( 0, 142, -2, -142)
Spline36Resize(1280,528)
Grainfactory3(1,1,1)
GradFunkMirror()
MCTemporalDenoise(settings="high")
how i will fix it i want to edit my Resize but i can't

LaTo can u mke update for (MCTemporalDenoise)
we want to make the control for The script not MCTemporalDenoise ... :) thnx

LaTo
6th April 2010, 14:25
crop( 0, 142, -2, -142)
Spline36Resize(1280,528)
Grainfactory3(1,1,1)
GradFunkMirror()
MCTemporalDenoise(settings="high")
Adding grain+dither before MCTD is useless...

Try:
crop( 0, 142, -2, -142)
Spline36Resize(1280,534)

Addborders(0,0,0,2)
MCTemporalDenoise(settings="high")
crop(0,0,0,-2)

Grainfactory3(1,1,1)
GradFunkMirror()

Gannjunior
8th April 2010, 13:22
Hi guys,

what do you use to fast your encoding with MCTtemporalDenoise?

This is my scrypt, where i'm trying to use MT :


SetWorkingDir("d:\avs_plugins\AviSynthPlugins\")
LoadPlugin("MT.dll")
Loadplugin("d:\avs_plugins\warpsharp.dll")

LoadPlugin("SangNom.dll")
LoadPlugin("average.dll")
LoadPlugin("Degrainmedian.dll")
Loadplugin("removegrain.dll")
LoadPlugin("Repair.dll")
LoadPlugin("gradfun2db.dll")

LoadPlugin("DGAVCDecode.dll")
LoadPlugin("DGDecode.dll")

loadplugin("fft3dfilter.dll")
loadplugin("hqdn3d.dll")
LoadPlugin("convolution3d.dll")
LoadPlugin("undot.dll")
LoadPlugin("mvtools2.dll")
LoadPlugin("mt_masktools-26.dll")
LoadPlugin("TTempSmooth.dll")

import("d:\avs_plugins\denoisers\MCTemporalDenoise.v1.4.08.avsi")
import("d:\avs_plugins\denoisers\GradFun2DBmod.v1.5.avsi")
import("LSFmod.v1.9.avsi")
LoadPlugin("GradFun2DB")

LoadPlugin("D:\Program Files (x86)\StaxRip\Applications\AviSynth plugins\DGAVCDecode.dll")

AVCSource("L:\test_5d2\MVI_0135 temp files\MVI_0135.dga")
MCTemporalDenoise(settings="high")

I tried to use SetMTmode() in different way but with no success.

How could I set MT in the correct way to use all my i-920 cores in the script above?
Or, if you could suggest me alternative paths to use my i7, i would be happy!

Thanks in advance

---------------

P.S. "settings high" is the extreme setting of MCTtemporalDenoise? because i want to test it on my video shooting at 12800 iso.

ciao! :)

Nephilis
8th April 2010, 16:11
Try MT("""MCTemporalDenoise(settings="high")""",threads=4) instead of SetMTMode()..

Gannjunior
8th April 2010, 19:49
thanks for your suggestion.
it starts and it gets 20% of cpu more or less...the encoding anyway takes me jurassic time.
if u have any other suggestion i'm happy to test it! :-)
ciao!

BigDid
9th April 2010, 00:25
Hi there,

it starts and it gets 20% of cpu more or less...the encoding anyway takes me jurassic time.
It works so it seems an improvement. What if you do not use MT, just:
MCTemporalDenoise(settings="high")
will your encoding time be paleolithic (even slower as it should be) ? ;)
If not slower something is wrong in your config and/or settings
Be aware that MCTD is a slow (to very slow) filtering process!


if u have any other suggestion i'm happy to test it! :-)
ciao!
What avisynth rev and MT dll are you using?
If not 2.58 MT from SET (MT-avisynth+ MT dll) or 2.6 MT-avisynth from SET you may not have stability or performance accordingly...

For an i7, you could try to change the number of threads from 4 to 6 to 8 or even more and see if any speed improvement.

You did not state if you are encoding to xvid, x264 or other codec and what GUI you are using for that purpose; vfw xvid/divx and gui are known to be suboptimal compared to x264 and non vfw GUI for multicores ...

Did

Gannjunior
9th April 2010, 01:25
i'm using avisynth dll and MT dll updated to 2010 jan.

tried to set 8 core but no speed improvement

since my "raw" source is 45mbit avchd from 5d mark II, i usually recompress to h264.

Since the direct conversion to h264 of the script above in megui is more tha paleolithic, i'm encoding (now) in lagarith loseless by vdub. (passed 5h30' and i encoded 1100 frames !!!).

so you suggest to set MCTtempDen to "medium" settings? do i get an heavy denoise the same?

because from some preview i've seen that setting "high" seems to be amazing. It really drops alla the noise produced by my camera at 12800 iso but i can see a really amount of detail that camera captured.

thank you very much, ciao!!

BigDid
9th April 2010, 17:57
Hi,

This:
i'm using avisynth dll and MT dll updated to 2010 jan.
is not SET build. Use it at your own risk :rolleyes:

Rather, see:
http://forum.doom9.org/showthread.php?t=148117


tried to set 8 core but no speed improvement

Ok.
I also asked you to test with and without MT to be sure your avisynth+MT configuration is correct and you have a REAL speed gain with MT.
From a quick and dirty test encode with my Q9400 @3200 (1pass-Cq3, Xvid-encode, SD):

MCTemporalDenoise(settings="high")............ is +/- 5.5 fps
MT("""MCTemporalDenoise(settings="high")""") is +/- 9.5fps


so you suggest to set MCTtempDen to "medium" settings? do i get an heavy denoise the same?

Where have you seen me suggesting that? please quote :mad:
Seriously, this is the MCTD thread, I answered on your MT problem only. For MCTD, review posts on differences between settings and tuning by LATO, very interesting.

Did

Gannjunior
10th April 2010, 18:47
Sorry maybe i read in the not correct way what you wrote before!

FRom what you are sayng there is something wrong in my config, beacuse with my i7 i have to go at least at your speed...And i'm really far from 5 fps...since i don't reach 1fps !!!

which MT and avisynth .dll do you use?

Which problem do you think i could have in my config?


many thanks in advance and have a nice weekend!!
ciao!

BigDid
10th April 2010, 21:10
Hi,

Sorry maybe i read in the not correct way what you wrote before!
Ok, let's say we both need to read or write the correct way. I have edited my previous post accordingly.


which MT and avisynth .dll do you use?
Link was already given for Mt-avisynth 2.58 and MT.dll from SET; once again:
http://forum.doom9.org/showthread.php?t=148117


FRom what you are sayng there is something wrong in my config, beacuse with my i7 i have to go at least at your speed...And i'm really far from 5 fps...since i don't reach 1fps !!!
Yes it seems so even if my test was SD-Xvid encode.


Which problem do you think i could have in my config?
Bad installation or use?
See basics:
http://avisynth.org/mediawiki/MT_support_page
and/or
http://avisynth.org/mediawiki/MT

This is still MCTD thread and if you need more tips for MT, you'd better continue in the SET MT thread or create one (I will not post in Jeremy's thread as I don't use it).

Did

Assassinator
23rd April 2010, 14:05
The AA portion of MCTD seems to have broken between 1.3.09 and 1.4.08... Or am I just doing something really wrong?


New behaviour ==> http://zingaburga.com/assassinator/ImageStash/Encoding/MCTD1408AA.png

Old behaviour ==> http://zingaburga.com/assassinator/ImageStash/Encoding/MCTD1309AA.png



MCTemporalDenoise(aa=true,useEEDI2=false,maxd=48,aathr=16,stabilize=true)



Oh yeah, these images are produced for the sole purpose of explaining what I'm talking about in this post, so please don't tell me I should be using aa/maa/daa/whatever instead, or I shouldn't be using MCTD/denoise/whatever, since I'm not even going to be encoding this stuff.

LaTo
23rd April 2010, 14:50
The AA portion of MCTD seems to have broken between 1.3.09 and 1.4.08... Or am I just doing something really wrong?


New behaviour ==> http://zingaburga.com/assassinator/ImageStash/Encoding/MCTD1408AA.png

Old behaviour ==> http://zingaburga.com/assassinator/ImageStash/Encoding/MCTD1309AA.png



MCTemporalDenoise(aa=true,useEEDI2=false,maxd=48,aathr=16,stabilize=true)



Oh yeah, these images are produced for the sole purpose of explaining what I'm talking about in this post, so please don't attempt to tell me I should be using aa/maa/daa/whatever instead, or I shouldn't be using MCTD/denoise/whatever, since I'm not even going to be encoding this stuff.

Maybe broken, I made a lot of changes between v1.3 and v1.4...
I will look at this next month, study now :D

Assassinator
23rd April 2010, 15:06
Maybe broken, I made a lot of changes between v1.3 and v1.4...
I will look at this next month, study now :D

Thanks :)

No rush, your studies are more important.

newface
28th April 2010, 13:54
While i am adding to script MCTemporalDenoise(settings="high") getting error ther is no function named "Msuper" plz rectifie this error image attached below

http://i42.tinypic.com/htchf5.jpg

um3k
28th April 2010, 14:09
Sounds like you need MVTools 2: http://avisynth.org.ru/mvtools/mvtools2.html

newface
28th April 2010, 14:38
Sounds like you need MVTools 2: http://avisynth.org.ru/mvtools/mvtools2.html

Please give me more detiles

MatLz
28th April 2010, 14:57
Please give me more detilesMSuper is one (surely the most important) of the functions in the MVTools2.dll plugin

jordisound
14th May 2010, 08:48
Try MT("""MCTemporalDenoise(settings="high")""",threads=4) instead of SetMTMode()..

well, it works. With this sintaxis the speed increase, the 4 cores are working fine.

I am testing gpu=true vs. gpu=false (fft3dgpu vs fft3dfilter). fft3 gpu is 7% faster. analyzing the final video, the compressibility is 5% better with fft3dfilter. it says that the default values for fft3d and fft3gpu are different? or fft3d is more efficient than fft3dgpu?

Poutnik
15th May 2010, 09:57
well, it works. With this sintaxis the speed increase, the 4 cores are working fine.........

Interesting, I went the opposite direction MT() -> SetMTMode, realizing the spatial dividing by MT() was causing for me artefacts.

MC is said - seems obvious - to have gain from evaluation the whole picture.

Joachim Buambeki
16th May 2010, 23:01
I want to use MCTemporalDenoise to denoise my timelapse footage, but it always give me an error:There is no function named "Sangnom"


The script is just:MCTemporalDenoise(settings="medium") for a 720p clip. As far as I understand there should not even be a call for Sangnom. I don't have the Sangnom.dll, since I am using the 64bit package from JoshyD.

Another question I have is:
What settings would you recommend me to denoise 4k footage, based on the documentation I figured larger block sizes should do no harm at 4k:MCTemporalDenoise(settings="medium", protect=true, stabilize=true, enhance=true, bwbh=32, owoh=16, blksize=32, overlap=16)Is this likely to work? I am afraid such a complex script will will not run very stable at 4k.

Best Regards
David

LoRd_MuldeR
16th May 2010, 23:32
http://manao4.free.fr/SangNom.zip

Joachim Buambeki
16th May 2010, 23:41
Thanks, but I need a 64bit Sangnom (though I wonder why Sangnom is needed for the above script. :confused:
From what I have read other people use MCTemporalDenoise with succes on with 64bit Avisynth.

Best Regards
David

LoRd_MuldeR
16th May 2010, 23:53
Thanks, but I need a 64bit Sangnom (though I wonder why Sangnom is needed for the above script. :confused:

Well, if MCTemporalDenoise makes use of the Sangnom plugin, then you'll need that plugin for MCTemporalDenoise to work. It's that easy :p

However I don't know if a 64-Bit build of Sangnom exists...

Joachim Buambeki
17th May 2010, 00:01
Other people in the thread dedicated to Avisynth 64bit seem to use it without problems (http://forum.doom9.org/showthread.php?p=1393260&highlight=mctemporaldenoise#post1393260) (last posts that mentions it in the thread). Since I use no anime preset or the anti aliasing function of MCTemporalDenoise I do not understand why Sangnom is even called. That is why I am confused...:confused:
Also I checked the 64bit builds of different filters by JoshyD and squid and have not found a 64bit version of Sangnom.

Best Regards
David

Didée
17th May 2010, 00:04
Try explictely setting MCTemporalDenoise(setings="medium",useEEDI2=true).

Some filtering with SangNom is initiated within the function, but not used later on. Even though SangNom is not actually used with the given call, the parser has the need to evaluate the SangNom() filter.

Taken strictly, this is sign of unkosher scripting ... which, in same or similar style, I might have done "a thousand" times myself. :D


Edit - Clarification by example:

Assume this little quasi-script:

do_filter = false
use_filterX = false

vid = something

filter = use_filterX ? vid.filterX()
\ : vid.filterY()

out = do_filter ? filter : vid

return( out )

With given settings, neither filterX nor filterY are actually performed. The output result is just "vid".

However, by the time when the parser is parsing the "filter = ... ? .. : .." line, it needs to know "filterY", because it needs to fully evaluate the code line. The path given by "use_filterX=false" requires that the parser evaluates "filter = vid.filterY()". Albeit the action never is performed, it is still required that "filterY" is *known* at least.

Joachim Buambeki
17th May 2010, 00:14
Try explictely setting MCTemporalDenoise(setings="medium",useEEDI2=true).Thanks Didée, that seemed to be one of the culprits.
But now I get the error:
EEDI2: maxd must be < 30!EDIT: I searched for "maxd" and it seems to be named "maxdiff" in the script and the the default is 48 for medium. Changing it to something below 30 does not seem to help, the script seems to ignore my user specified setting. When usingMCTemporalDenoise(setings="low",useEEDI2=true)it works finally, even if I illegally set maxdiff to 36 with settings="low". There seems to be something borked in the presets.
I will look deeper into it tomorrow.

Regards
David

Gavino
17th May 2010, 00:20
Taken strictly, this is sign of unkosher scripting ...
Quite so. As I'm sure you know, that sort of thing is best done inside a conditional expression, especially if it involves a less frequently-used external plugin whose use is optional, eg
s = (param == xxx) ? SangNom(...) : NOP()

EDIT: Your clarification came after I posted this.
Your example (as you know) would then be more cleanly written as
filter = do_filter ?
\ use_filterX ? vid.filterX() : vid.filterY()
\ : NOP()

(However if filterX and filterY were both built-in functions, I wouldn't bother doing this unless they were known to have a significant time or memory cost on instantiation.)

LaTo
17th May 2010, 06:41
Quite so. As I'm sure you know, that sort of thing is best done inside a conditional expression, especially if it involves a less frequently-used external plugin whose use is optional, eg
s = (param == xxx) ? SangNom(...) : NOP()
I will add this into the next version, was removed between 1.3.xx -> 1.4.xx (cleaner code) but... it seems to be a problem :D

Gavino
17th May 2010, 11:48
was removed between 1.3.xx -> 1.4.xx (cleaner code) but... it seems to be a problem :D
It's ironic that to clean it up in one respect (readability), it had to become less clean in another (loading unused filters).

Of course, the root of the problem is the limitations of Avisynth's conditional syntax. What you really want to be able to write is something like:

if (AA) {
caa = (useEDDI2 ? .... : ...SangNom(...) ...)
mA = ...
smA = ...
}
else {
...
smA = ...
}
[At this point, I will make my usual plug for GScript. :) ]

Incidentally, on the subject of code cleanup, is there a good reason for using code like
Assert((radius>=1&&radius<=6) ? true : false, ...)

instead of just
Assert(radius>=1&&radius<=6, ...)

Perhaps to get round some perceived bug in Assert?

Joachim Buambeki
17th May 2010, 13:20
Hi LaTo,

can you confirm (or deny) the problem I have with "maxdiff"?

Your script is awesome by the way!

Best Regards
David

LaTo
17th May 2010, 16:05
v1.4.16 :
added switch to avoid loading of unused filters
fixed a bug in anti-aliasing part

:)

LaTo
17th May 2010, 16:10
Incidentally, on the subject of code cleanup, is there a good reason for using code like
Assert((radius>=1&&radius<=6) ? true : false, ...)

instead of just
Assert(radius>=1&&radius<=6, ...)

Perhaps to get round some perceived bug in Assert?
IIRC I had some problems with Assert in the past, so maybe... but it's a bit old for me, I don't remember :confused:

can you confirm (or deny) the problem I have with "maxdiff"?
EEDI2 maxd is maxd in MCTD
Sangnom AA is maxd in MCTD
maxdiff is for another stuff

Great Dragon
17th May 2010, 19:56
For some reason MCTD doesn't process last and first frames in a sequence for me.

Here is an example:
2 last frames in a sequence:
http://a.imagehost.org/t/0531/6381.jpg (http://a.imagehost.org/view/0531/6381) http://a.imagehost.org/t/0406/6382.jpg (http://a.imagehost.org/view/0406/6382)
2 first frames in a next sequence:
http://a.imagehost.org/t/0793/6383.jpg (http://a.imagehost.org/view/0793/6383) http://j.imagehost.org/t/0598/6384.jpg (http://j.imagehost.org/view/0598/6384)

nibus
24th May 2010, 07:41
I'm having trouble when using MCTD on 1080p content. It works fine on everything else but errors out when using 1080p blu ray content:


LoadPlugin("C:\Apps\Multimedia\Video\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("F:\Encode\BluRay\X2\BDMV\STREAM\X2.dga")

crop( 0, 140, 0, -140)

MCTemporalDenoise(settings="medium", edgeclean=true, deblock=true, enhance=true, chroma=true)



This is the error presented in MeGUI:

Error starting job
Exception message
Stacktrace: at MeGUI.core.gui.JobWorker.startEncoding(TaggedJob job)
Inner Exception: null

LaTo
24th May 2010, 07:51
I'm having trouble when using MCTD on 1080p content. It works fine on everything else but errors out when using 1080p blu ray content:


LoadPlugin("C:\Apps\Multimedia\Video\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("F:\Encode\BluRay\X2\BDMV\STREAM\X2.dga")

crop( 0, 140, 0, -140)

MCTemporalDenoise(settings="medium", edgeclean=true, deblock=true, enhance=true, chroma=true)



This is the error presented in MeGUI:

Error starting job
Exception message
Stacktrace: at MeGUI.core.gui.JobWorker.startEncoding(TaggedJob job)
Inner Exception: null

The script works outside of MeGUI?

nibus
24th May 2010, 10:45
The script works outside of MeGUI?

Never encoded outside of MeGUI... I like to be able to preview my filters first so I've steered away from the command line (with video anyway).

Boulder
24th May 2010, 11:08
Try opening the script for example in VirtualDub and see what happens.

Assassinator
25th May 2010, 11:20
AA still seems to be broken.


Used that test script I used last time here (http://forum.doom9.org/showthread.php?p=1394067#post1394067), pretty much exactly the same result.


Want me to upload a short sample + test script?

LaTo
25th May 2010, 11:30
Want me to upload a short sample + test script?

Yes it would be great!

Assassinator
25th May 2010, 12:18
Yes it would be great!

http://zingaburga.com/assassinator/Storage/MCTD_AA_Test.7z

LaTo
25th May 2010, 13:58
v1.4.18 :
fixed anti-aliasing PP (was broken since v1.4.07)
updated MVTools-MaskTools-AddgrainC version

:)

kypec
25th May 2010, 14:56
Would be nice if you could include direct download links to required plugins in your first post.
It took me almost a day to locate appropriate version of this and that tool all over the net. :thanks:

LaTo
25th May 2010, 15:57
Would be nice if you could include direct download links to required plugins in your first post.
It took me almost a day to locate appropriate version of this and that tool all over the net. :thanks:
I think it's a bad idea because it's not a mandatory to have exactly the same version as the documentation, it's just the version that I tested before releasing...

So newer versions should be better unless they introduce major changes in the syntax: if so, say here and I will update the script.

kypec
26th May 2010, 09:23
What I meant to say is: would be nice if there were direct links to sources, developer's pages, whatever else where the plugin's most recent/tested version is to be found. That's all. Searching for them via Doom9 forum or Google is quite tedious and time consuming. Why not to make life a bit easier for those who want to try your scripts? Thanks for your effort.

sinz718
27th May 2010, 19:54
Thanks for this and all but seriously if scripts require other plugs/scripts why not supply them in a rar as well, or the whole thing in a rar?

**

Nevermind I guess this new plugins thread will help me, hopefully.

Die*wrek*show
28th May 2010, 08:28
After spending an entire afternoon searching for, and installing what seemed like every avisynth plugin known to man(I installed more than what I needed just to be sure), my hard work finally paid off.

I get the following error message-

"CAVIStream Synth: Unknown system exception - 0xc000001e at 0xcf23350"

I cannot get this working. So I am back to using plain old dfttest. Does anybody know what causes that error? I'm using

MCTemporalDenoise(Settings="very low",GPU=false)

senseiam
4th June 2010, 19:52
Don't know if anyone else has seen this or not but I am getting "This CLIP is NOT MOD4" errors with mod4 resolutions. When I crop to mod16 script works, no problem.

I tried 1920x1080 (mod4) and I get "THIS CLIP IS NOT MOD4" error

I add Crop(0,4,-0,-4) for 1920x1072 (mod16) works like a charm.

Edit: Using latest version of script

LaTo
5th June 2010, 07:48
After spending an entire afternoon searching for, and installing what seemed like every avisynth plugin known to man(I installed more than what I needed just to be sure), my hard work finally paid off.

I get the following error message-

"CAVIStream Synth: Unknown system exception - 0xc000001e at 0xcf23350"

I cannot get this working. So I am back to using plain old dfttest. Does anybody know what causes that error? I'm using

MCTemporalDenoise(Settings="very low",GPU=false)

I think it's a broken plugin, check one by one.




Don't know if anyone else has seen this or not but I am getting "This CLIP is NOT MOD4" errors with mod4 resolutions. When I crop to mod16 script works, no problem.

I tried 1920x1080 (mod4) and I get "THIS CLIP IS NOT MOD4" error

I add Crop(0,4,-0,-4) for 1920x1072 (mod16) works like a charm.

Edit: Using latest version of script

No problem with 1920x1080 in my side, provide the exact script used and a little sample clip please.

Boulder
6th June 2010, 15:45
Is is possible to make the MT function work with MCTemporalDenoise? I only get a garbled error message with MT("MCTemporalDenoise()"), also using triple quotes doesn't help.

elguaxo
6th June 2010, 17:00
Is is possible to make the MT function work with MCTemporalDenoise?

It has always worked for me. Don't know if it makes a difference, but I'm still using AviSynth 2.5.7 + MT 0.7 (http://forum.doom9.org/showthread.php?t=94996).

Boulder
6th June 2010, 17:05
Strange, it seems to work on my computer but not on my dad's computer, from where I got the error message. The plugins and Avisynth versions should be pretty much equal, SEt's Avisynth 2.5.8MT installed. I've got to try emptying the plugins folder on his computer the next I visit my folks.

LaTo
6th June 2010, 17:09
Sorry I never use MT version...

darkelf5
11th June 2010, 15:58
I've tried it with AviSynth x64 build.
Everything works, except enabling GPU. I've tested it on a simple script
AVIsource("blablabla")
MCTemporalDenoise("GPU=true")
And this is what i get:
http://img256.imageshack.us/img256/5532/21616589.jpg (http://img256.imageshack.us/i/21616589.jpg/)

LaTo
11th June 2010, 15:59
I've tried it with AviSynth x64 build.
Everything works, except enabling GPU. I've tested it on a simple script
AVIsource("blablabla")
MCTemporalDenoise("GPU=true")
And this is what i get:
http://img256.imageshack.us/img256/5532/21616589.jpg (http://img256.imageshack.us/i/21616589.jpg/)

It should be a problem with FFT3Dgpu.

lych_necross
22nd June 2010, 07:15
Is there a chance that this script will become a dll like with SmoothAdjust? If so, what about LSFmod?

LaTo
22nd June 2010, 11:46
Is there a chance that this script will become a dll like with SmoothAdjust?
No, too complicated for me.

If so, what about LSFmod?
Maybe later, but at this time I don't see any big improvement to achieve this and I'm lazy ;)

asarian
25th June 2010, 20:31
Earlier I had some trouble (http://forum.doom9.org/showthread.php?p=1405474) with TemporalDegrain, as part of a scene would bleed into the next on certain scene changes. So I looking for a temporal denoiser that will denoise without these faults, and I'm hoping MCTemporalDenoise is it. :) So, is this program 'safe' for general use? Kinda hate spending enother hundred or so hours on encoding, only to find out the output is messed up again.

I got the impression, from the other thread, that temporal degraining is inherently hard to accomplish; so maybe a truly 'safe' filter in that regard does not exist. But I'm hoping people's experiences with MCTemporalDenoise are good.

Thanks.

LaTo
25th June 2010, 20:41
Earlier I had some trouble (http://forum.doom9.org/showthread.php?p=1405474) with TemporalDegrain, as part of a scene would bleed into the next on certain scene changes. So I looking for a temporal denoiser that will denoise without these faults, and I'm hoping MCTemporalDenoise is it. :) So, is this program 'safe' for general use? Kinda hate spending enother hundred or so hours on encoding, only to find out the output is messed up again.

I got the impression, from the other thread, that temporal degraining is inherently hard to accomplish; so maybe a truly 'safe' filter in that regard does not exist. But I'm hoping people's experiences with MCTemporalDenoise are good.

Thanks.


Yes, it's safe for general use... Especially with limit=-1 & limit2=-1 ;)

asarian
25th June 2010, 20:47
Yes, it's safe for general use... Especially with limit=-1 & limit2=-1 ;)
Thank you very much! :) I'll go install it rightaway!

LaTo
25th June 2010, 20:53
Thank you very much! :) I'll go install it rightaway!

Just one thing: adjust sigma for your source, it should be the lowest while keeping it's efficiency.

Didée
25th June 2010, 22:02
Just one thing: adjust sigma for your source, it should be the lowest while keeping it's efficiency.
That was exactly his problem with TemporalDegrain: usage of default sigma's, which was too strong for his source...

The underlying problem with using FFT3DFilter as prefilter is that FFT3D is generally not safe on scenechanges. Is there any special SC-protection in MCTD to compensate for that?

LaTo
26th June 2010, 09:34
The underlying problem with using FFT3DFilter as prefilter is that FFT3D is generally not safe on scenechanges. Is there any special SC-protection in MCTD to compensate for that?
No SC-protection in MCTD... But I have never experienced SC problem with MCTD, it may be due to reasonable sigma values in preset.

If FFT3D really miss a scene change, try to use limit=x / limit2=x (instead of -1).
"x" should be a positive value but the lowest possible (it's a simple limiting threshold).
If the clip isn't so grainy, bt=1 should fix the problem also.

Maybe I will implement a SC-protection in MCTD with SCSelect if the problem persist, but I doubt.
Truly I use FFT3D all the time without problem, so I want to see a sample/script (with appropriate sigma) where FFT3D miss a scene change... Someone please? I am curious :)

Didée
26th June 2010, 09:52
where FFT3D miss a scene change...
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.

LaTo
26th June 2010, 16:41
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 :(

senseiam
27th June 2010, 09:11
Don't know if anyone else has seen this or not but I am getting "This CLIP is NOT MOD4" errors with mod4 resolutions. When I crop to mod16 script works, no problem.

I tried 1920x1080 (mod4) and I get "THIS CLIP IS NOT MOD4" error

I add Crop(0,4,-0,-4) for 1920x1072 (mod16) works like a charm.

Edit: Using latest version of script


No problem with 1920x1080 in my side, provide the exact script used and a little sample clip please.


Don't have a specific sample clip handy right now but I get this on multiple different sources so I have to crop after or crop to mod16.

Script example:

Import("\AviSynth 2.5\plugins\MCTemporalDenoise.avs")
Import("\AviSynth 2.5\plugins\GradFun2DBmod.v1.5.avs")
SetMemoryMax(2048)

AVCSource("something.dga")

Crop(0,20,-0,-20)

MT(""" MCTemporalDenoise(settings="very low",sigma=6,chroma=true,stabilize=true,GPU=false,ncpu=8,enhance=true,sharp=false) """, threads=8, overlap=16)

Even though it's 1920x1040, mod16, it doesn't want to work, reports this isn't mod4.

LaTo
27th June 2010, 09:14
Don't have a specific sample clip handy right now but I get this on multiple different sources so I have to crop after or crop to mod16.

Script example:

Import("\AviSynth 2.5\plugins\MCTemporalDenoise.avs")
Import("\AviSynth 2.5\plugins\GradFun2DBmod.v1.5.avs")
SetMemoryMax(2048)

AVCSource("something.dga")

Crop(0,20,-0,-20)

MT(""" MCTemporalDenoise(settings="very low",sigma=6,chroma=true,stabilize=true,GPU=false,ncpu=8,enhance=true,sharp=false) """, threads=8, overlap=16)

Even though it's 1920x1040, mod16, it doesn't want to work, reports this isn't mod4.

MT is the problem, use SetMTMode... (or adjust threads in MT: "height/threads" must be mod4)

Gavino
27th June 2010, 10:02
MT is the problem, use SetMTMode... (or adjust threads in MT: "height/threads" must be mod4)
Or use splitvertical=true, since width/threads is already mod4.

Boulder
27th June 2010, 13:35
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.I wonder if anyone with some programming skills could add scenechange detection if Fizick doesn't want to do that. It should be quite simple since there are many filters to borrow code from (of course it depends on the case, but still..)

senseiam
27th June 2010, 20:07
Or use splitvertical=true, since width/threads is already mod4.

ok thanks! :)

asarian
28th June 2010, 00:37
I wonder if anyone with some programming skills could add scenechange detection if Fizick doesn't want to do that. It should be quite simple since there are many filters to borrow code from (of course it depends on the case, but still..)
I second that motion. :) I'm not versed enough in the intricacies of motion estimation to even begin to think about doing it myself; but it would be great if someone would actually fix it.

asarian
29th June 2010, 04:40
LaTo, I may not be doing it entirely right yet. :) I'm using this avs script on a 1-minute clip:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFMS2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mvtools2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\TTempSmooth.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RepairSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\deblock.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\EEDI2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\gradfun2db.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\AddGrainC.dll")

video=FFVideoSource("M:\jobs\2010test.mkv").ConvertToYV12()
video=MCTemporalDenoise(video, settings="very high")
video=Crop(video, 0, 142, 0, -142)

return video

Nothing happens for a long while, though. First I get a Windoze error, saying it can't use "mt_masktools-25-x64.dll" (of course it can't: I'm on 32bit; and I didn't ask for it to be run, either). Then x264 keeps hovering around 25% CPU, steadily increasing in memory size (to around 1.4GB). And finally it tells me that 1 minute clip, at 0.00fps, (sic!) will take over 300 hours! Why, that seems a mite extreme. :)

x264 remains at ca. 25% CPU. So, I guess I'm doing something wrong. Any hints?

tormento
29th June 2010, 06:58
I wonder if anyone with some programming skills could add scenechange detection if Fizick doesn't want to do that.
And a x64 version too =P

Didée
29th June 2010, 08:48
And a x64 version too =P
There already is one (http://code.google.com/p/avisynth64/wiki/PluginLinks). (Without SC detection, of course.)

tormento
29th June 2010, 10:46
There already is one (http://code.google.com/p/avisynth64/wiki/PluginLinks). (Without SC detection, of course.)
I was talking about MCTD.

Don't know why but my "porting" to x64, disabling Sangnom, is awfully slow.

asarian
29th June 2010, 20:21
LaTo, I may not be doing it entirely right yet. :) I'm using this avs script on a 1-minute clip:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFMS2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\FFT3DFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mvtools2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\TTempSmooth.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\RepairSSE3.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\deblock.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\EEDI2.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\SangNom.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\gradfun2db.dll")
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\AddGrainC.dll")

video=FFVideoSource("M:\jobs\2010test.mkv").ConvertToYV12()
video=MCTemporalDenoise(video, settings="very high")
video=Crop(video, 0, 142, 0, -142)

return video

Nothing happens for a long while, though. First I get a Windoze error, saying it can't use "mt_masktools-25-x64.dll" (of course it can't: I'm on 32bit; and I didn't ask for it to be run, either). Then x264 keeps hovering around 25% CPU, steadily increasing in memory size (to around 1.4GB). And finally it tells me that 1 minute clip, at 0.00fps, (sic!) will take over 300 hours! Why, that seems a mite extreme. :)

x264 remains at ca. 25% CPU. So, I guess I'm doing something wrong. Any hints?
Anyone? Anyone? Bueller? Bueller? :)

Seriously; I may not have the fastest machine (Q6700 @ 3.6 Ghz); but 300 hours for a 1 minute clip??! That's looking at a ~4 year encode!!

I could probably crop a little more efficiently; like first do 400, -400, so at to still be div 16 (one of the filters was complaining about that), and only then do MCTemporalDenoise, and only then crop an extra 2, -2 afterwards:


video=FFVideoSource("M:\jobs\2010test.mkv").ConvertToYV12()
video=Crop(video, 0, 140, 0, -140)
video=MCTemporalDenoise(video, settings="very high")
video=Crop(video, 0, 2, 0, -2)


But still, these encoding times seem too long (and unworkable; I mean, who can keep his machine on for 4 years? Hoping it won't reset in the meantime).

Gavino
29th June 2010, 22:36
I get a Windoze error, saying it can't use "mt_masktools-25-x64.dll" (of course it can't: I'm on 32bit; and I didn't ask for it to be run, either).
Is mt_masktools-25-x64.dll in your plugins folder (C:\Program Files\AviSynth 2.5\plugins)? If so, it will be loaded automatically by Avisynth, so you want to remove it from there.

For the same reason, all your LoadPlugin commands are unnecessary.

asarian
30th June 2010, 09:51
Is mt_masktools-25-x64.dll in your plugins folder (C:\Program Files\AviSynth 2.5\plugins)? If so, it will be loaded automatically by Avisynth, so you want to remove it from there.

For the same reason, all your LoadPlugin commands are unnecessary.
Yeah, I put mt_masktools-25-x64.dll there recently, as part of upgrading all required tools for MCTemporalDenoise. Didn't realize they all autoload. :)

P.S. Any idea why x264 constantly only takes about 25% CPU for MCTemporalDenoise? That doesn't exactly help encoding times either. :(

LaTo
30th June 2010, 09:54
Yeah, I put mt_masktools-25-x64.dll there recently, as part of upgrading all required tools for MCTemporalDenoise. Didn't realize they all autoload. :)

P.S. Any idea why x264 constantly only takes about 25% CPU for MCTemporalDenoise? That doesn't exactly help encoding times either. :(

x264 wait a long time after MCTD... Because avisynth isn't multithreaded, MCTD use only one core of your quad (25%).

asarian
30th June 2010, 14:27
x264 wait a long time after MCTD... Because avisynth isn't multithreaded, MCTD use only one core of your quad (25%).
LaTo, you're my new hero!! :)

I just tried my sample with 'settings=high', and instead of taking 300 hours (for 'very high'), it was done in 30 minutes! :) Which is very reasonable. And the result (http://little-albatross.net/2010test.rar)? Not only does MCTemporalDenoise pass the SC test (whereas TemporalDegrain, on the defaults, failed), but the resulant video is spendid! Beyond belief, so good actually!!

I can't get 'GPU=true' to work yet (GTX 260), though:


avs [info]: 1920x796p 1:1 @ 24000/1001 fps (cfr)
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.1
x264 [error]: malloc of size 6856704 failed/s, eta 19:40:54
x264 [error]: x264_encoder_encode failed


Not sure what that is all about, but, regardless, I'm already happy. :)

LaTo
2nd July 2010, 11:48
v1.4.20 :
tweaked some settings
updated QED_Deblock version

:)

Boulder
2nd July 2010, 11:55
Thanks :)

Are you by any chance planning on doing a quick-and-dirty fix for the missing scenechange detection?

LaTo
2nd July 2010, 13:16
Thanks :)

Are you by any chance planning on doing a quick-and-dirty fix for the missing scenechange detection?

Yes it's on my todo list!

asarian
5th July 2010, 05:56
When I run MCTemporalDenoise with 'enhance=true' ("medium"), suddenly a GHOST PORTRAIT (http://www.mediafire.com/file/idmtow3dokh/2rachels.jpg) appears in one of the frames in my Blade Runner encode. Oops! :) When I add a GradFun2DBmod command after MCTemporalDenoise, the issue is resolved again.

Maybe this needs a little looking into?

LaTo
5th July 2010, 08:01
When I run MCTemporalDenoise with 'enhance=true' ("medium"), suddenly a GHOST PORTRAIT (http://www.mediafire.com/file/idmtow3dokh/2rachels.jpg) appears in one of the frames in my Blade Runner encode. Oops! :) When I add a GradFun2DBmod command after MCTemporalDenoise, the issue is resolved again.

Maybe this needs a little looking into?

It's not a problem with enhance=true because it's only spatial.
Do you use DirectShowSource() or GPU=true in your script?

asarian
5th July 2010, 08:07
It's not a problem with enhance=true because it's only spatial.
Do you use DirectShowSource() or GPU=true in your script?
No, I always use FFVideoSource for frame consistency.

I did use 'GPU=true', though. How would GPU usage cause just a temporal displacement, though?

EDIT: I *do* stream using avs2yuv now, though, because otherwise x264 would run out of memory. Could using avs2yuv to stream make things frame inconsistent again?

LaTo
5th July 2010, 08:14
No, I always use FFVideoSource for frame consistency.

I did use 'GPU=true', though. How would GPU usage cause just a temporal displacement, though?

EDIT: I *do* stream using avs2yuv now, though, because otherwise x264 would run out of memory. Coould using avs2yuv to stream make things frame inconsistent again?

GPU=true causes ghosting when seeking, moreover I have somes issues with HD-1080p.
So GPU=false is the default :D

For avs2yuv, I don't know... Maybe, I never use it.

asarian
5th July 2010, 08:32
GPU=true causes ghosting when seeking, moreover I have somes issues with HD-1080p.
So GPU=false is the default :D

For avs2yuv, I don't know... Maybe, I never use it.
Well, that's it for "GPU=true" then. :) Wasn't getting a speed improvement out of it anyway; just a memory benefit.

The avs2yuv frame consistency matter has got me worried a bit (if it is, indeed, an issue). Maybe someone else knows?

asarian
6th July 2010, 02:11
Okay, some very weird stuff going on. I used this following line for x264 on this Total Recall TEST SCENE (http://www.mediafire.com/file/jmmziew4f3n/trecalltest.mkv):

"C:\x264\avs2yuv.exe" "M:\jobs\trecalltest.avs" -o - | "C:\x264\x264.exe" - --demuxer y4m --crf 14 --sar 1:1 --aud --nal-hrd none --level 4.1 --preset placebo --vbv-bufsize 70000 --vbv-maxrate 60000 --bframes 8 --merange 32 --aq-mode 2 --ref 4 --tune grain --output "C:\video\trecalltest.264"

And the AVS scripts is as follows:

FFVideoSource("M:\jobs\trecalltest.mkv").ConvertToYV12()
Crop(0, 4, 0, -4)
MCTemporalDenoise(settings="medium", enhance=true)
Crop(0, 20, 0, -20)

The ghosting/misplaced frames in the RESULT (http://www.mediafire.com/file/lzgjdfnfkwx/trecalltest1410grain2.m2ts) are numerous. :( What the heck is going on!? The weird part is, that I can get this to work properly when I vary CRF and qpmin some. For instance, CRF = 10 + QPMIN = 10 gives me a flawless encode. This faulting file, however (CRF = 14 + QPMIN = 10) totally flips out. You'd think that makes it a x264 problem; but not so! If I run just the AVS script alone, and watch the output in GOM Player (very slowly, of course), I get some frame mess-ups too.

So, it seems to be a timing problem of some sort rather (in which x264 settings, only indirectly, play a role). Could someone test the above clean sample with the same x24 settings I used, please? Very mysterious things going on. :)

asarian
6th July 2010, 08:44
It's not a problem with enhance=true because it's only spatial.

LaTo, I'm really thinking it may be 'enhance=true' after all. When I remove the enhance option from the MCTemporalDenoise line, and export it simply as a second post-filter, everything goes well again!

FFVideoSource("M:\jobs\trecalltest.mkv").ConvertToYV12()
Crop(0, 4, 0, -4)
MCTemporalDenoise(settings="medium")
GradFun2DBmod(thr=1.4,thrC=1.0,mode=0,str=1.2,strC=0.0,temp=50,adapt=64,mask=false,show=false)
Crop(0, 20, 0, -20)

This script, contrary to the other, yields a perfect encode, under any conditions! So, maybe the 'in-house' enhance feature from MCTemporalDenoise corrupts something internally on occasion (like a buffer accidentally being overwritten? Or some variables maybe?). Whatever the case may be, doing GradFun2DBmod seperately definitely solves the issue, on every test I've run so far.

LaTo
6th July 2010, 09:21
And with temp=-1 ..?

Which version of avisynth do you use?

asarian
6th July 2010, 10:33
And with temp=-1 ..?
No, that makes no difference: same messed-up output.

Which version of avisynth do you use?
I'm using regular AviSynth version 2.5.8 (non-MT!). Why? You think it's a threads issue somehow?

Anyway, thanks for looking into it.

LaTo
6th July 2010, 10:35
Really strange.... I will try with your sample+script.

asarian
6th July 2010, 10:42
Really strange.... I will try with your sample+script.
Thanks, appreciate it. :)

In the meantime at least I can start a 'sane' encode again, using GradFun2DBmod on a separate line.

LaTo
6th July 2010, 12:47
All is working, no problem on my side.

Seriously, it looks like a "source" problem... Replace FFVideoSource by something else.

asarian
6th July 2010, 16:28
All is working, no problem on my side.

Seriously, it looks like a "source" problem... Replace FFVideoSource by something else.
Thanks for your time, LaTo.

FFVideoSource, eh? Hmm, if that's true, then I'm having a problem, as I replace DirectShowSource with FFVideoSource calls, these days, because the former is frame-consistent (and DirectShowSource is not!).

So, is there anything else out there, besides FFVideoSource, which is frame consistent? With a heavy script like MCTemporalDenoise, I really need frame-consistency. :(

LaTo
6th July 2010, 16:32
I haven't FFVideoSource on my PC, so for testing I have replaced this one by DirectShowSource in your script.
No ghosting at all, maybe a bug in your version of FFVideoSource?

Try with DGAVCIndex or DGNVTools, the problem should be solved.

asarian
7th July 2010, 12:32
I haven't FFVideoSource on my PC, so for testing I have replaced this one by DirectShowSource in your script.
No ghosting at all, maybe a bug in your version of FFVideoSource?

Try with DGAVCIndex or DGNVTools, the problem should be solved.
Thanks, LaTo; I'll have a look at Neuron2's DG NV tools. :)

asarian
29th July 2010, 05:37
I wonder, if I have a really grainy source, could I just double the MCTemporalDenoise line? Like so:

MCTemporalDenoise(settings="medium")
MCTemporalDenoise(settings="medium")
GradFun2DBmod(thr=1.8,thrC=1.0,mode=0,str=2.4,strC=0.0,temp=50,adapt=64,mask=false,show=false)

Instead of using 1x MCTemporalDenoise(settings="high").

Or does that mess up the lookahead functionality of MCTemporalDenoise?

Reason I ask, is that MCTemporalDenoise(settings="high") takes incredibly long on HD material (several hundred hours on my i7 980x). So maybe just doubling is the way to go.

LaTo
29th July 2010, 15:24
I wonder, if I have a really grainy source, could I just double the MCTemporalDenoise line? Like so:

MCTemporalDenoise(settings="medium")
MCTemporalDenoise(settings="medium")
GradFun2DBmod(thr=1.8,thrC=1.0,mode=0,str=2.4,strC=0.0,temp=50,adapt=64,mask=false,show=false)

Instead of using 1x MCTemporalDenoise(settings="high").

Or does that mess up the lookahead functionality of MCTemporalDenoise?

Reason I ask, is that MCTemporalDenoise(settings="high") takes incredibly long on HD material (several hundred hours on my i7 980x). So maybe just doubling is the way to go.
Try with MCTemporalDenoise(settings="high",stabilize=false,bwbh=32,owoh=16).
It should be a good speed boost ;)

asarian
30th July 2010, 09:48
Try with MCTemporalDenoise(settings="high",stabilize=false,bwbh=32,owoh=16).
It should be a good speed boost ;)

Thanks. :) Good tips.

I guess the real issue is still that I can't get MCTemporalDenoise to utilize the CPU properly. At 'high' CPU usage drops tp about 8% (over all 12 logical cores). And an MT"" call, or using any of the SetMTMode calls, makes MCTemporalDenoise crash; at least on my Highlander Blu-Ray.

P.S. Callimg MCTemporalDenoise twice in a row, btw, doesn't seem to work: it uses CPU, but x264 never starts up; so I guess it just hangs at initializong things, or gets into a loop of some sort; or twice 'medium' is simply even slower than 1x 'high'. :)

tormento
30th July 2010, 10:02
I guess the real issue is still that I can't get MCTemporalDenoise to utilize the CPU properly.
AFAIK horizontal/threads and vertical/threads must be multiple of 4. Check it out.

skaleton
22nd August 2010, 02:18
Hello,
Where can I download MCTemporalDenoise?
The link in avisynth.org does not work anymore.

poisondeathray
22nd August 2010, 05:15
Hello,
Where can I download MCTemporalDenoise?
The link in avisynth.org does not work anymore.

Look on the very 1st page of this thread

skaleton
22nd August 2010, 14:41
Thanks poisondeathray
I saw the link but yesterday I didn't know what to do with it. I expected a zip or something like most other filters.
Thanks to another post of yoursmost .dlls are autoloading if put into the avisynth\plugins directory
.avsi are autoloading scripts if put into the plugins directory
.avs are manually loaded - use Import("path\script.avs") . You can rename extension to .avsi to autoloadI just saved the avsi file.

What is not clear to me is what do you do about the required filters?
Do you need to load the 15 filters before loading the avsi? Should you make a script so that they are all loaded in one go?

poisondeathray
22nd August 2010, 14:59
The prerequisite filters are listed at the top of the script. You have to get them (not included)

If the prereq's are .dll's most are autoloading if placed in the plugins folder. Otherwise use LoadPlugin() , or you can make your own custom .avsi file . But beware the more autoloading filters you have, the slower and more memory consumption . Once you start accumulating a bunch of filters, it can make a difference

The reason why a static .zip file is not provded, is the filters are always being updated . You should get them from the original source, with original documentation. People sometimes modify filters. This way no mixups or filter version errors occur when debugging

You don't need all the pre-req's for this one . Only if you use some of the PP functions. It will tell you what one you are missing if you try to use it.

skaleton
23rd August 2010, 00:05
Thank you poisondeathray

So if I understand correctly,
Only the most frequently used .dll's and .avsi's should remain in the plugins folder.
When in another folder, should a .avsi be loaded with "loadplugin" or with "import" like a .avs or should it be renamed .avs?

For this script, I don't need to load all pre-req filters,
the MCTemporalDenoise script will tell me which one I am missing and then I can incorporate it in my .avs
and although it may be easier, as I was asking before, to make a .avs that would contain all the loadplugin/import of the pre-req filters
The first solution would be more efficient in the long run.

Am I correct?

poisondeathray
23rd August 2010, 03:08
When in another folder, should a .avsi be loaded with "loadplugin" or with "import" like a .avs or should it be renamed .avs?


you can rename it .avs and leave it in the plugins folder and it won't load until you use Import()


For this script, I don't need to load all pre-req filters,
the MCTemporalDenoise script will tell me which one I am missing and then I can incorporate it in my .avs
and although it may be easier, as I was asking before, to make a .avs that would contain all the loadplugin/import of the pre-req filters
The first solution would be more efficient in the long run.

Am I correct?

you can organize it however you like :)

some people load everything with loadplugin or import at the top of each and every script

you can make your own avsi that autoloads everything if you want

aand
25th August 2010, 21:46
Any chance of this getting a bit of multithreading? Using GPU is a big boost (0.9 to 1.5 fps). Two instances don't work.

Also I think post-TTempSmooth is broken (i added vis_blur=1 inside the scrip but nothing happened).

asarian
18th September 2010, 10:59
I'm having trouble with MCTemporalDenoise 'hanging' at times. Well, it doesn't really hang, in the sense of not responding any more; it just doesn't output anything any more, like being caught in a loop somehow. Here's a good example of a video fragment (5 MB) causing this, from the movie 'Push':

Push fragment (http://www.mediafire.com/?b66rvl2ig9fql6x)

Processed as follows:

DSS2("c:\video\push_test.m2ts", fps=24).ConvertToYV12()

Crop(0, 132, 0, -132)

MCTemporalDenoise(settings="low")
GradFun2DBmod(thr=1.4,thrC=1.0,mode=0,str=1.2,strC=0.0,temp=50,adapt=64,mask=false,show=false)

It happens with more movies (Stargate); but this sample is nice, as it occurs directly from the start.

I would really like to know what's causing this; and how to fix it, of course.

Thanks.

7ekno
18th September 2010, 12:35
DSS2("c:\video\push_test.m2ts", fps=24).ConvertToYV12()


Use a different source filter, DSS2 is pretty bad at direct M2TS ...

Index it first for a much better chance at success (I know indexing is stable, I tried a few source filters on BD M2TS files and DSS2 was the least likely to complete the encode ... I use DGDecNV to consistently run 30GB M2TS's thru MCTemporalDenoise() for the compression boost) ...

7ek

asarian
18th September 2010, 14:10
Use a different source filter, DSS2 is pretty bad at direct M2TS ...

Index it first for a much better chance at success (I know indexing is stable, I tried a few source filters on BD M2TS files and DSS2 was the least likely to complete the encode ... I use DGDecNV to consistently run 30GB M2TS's thru MCTemporalDenoise() for the compression boost) ...

7ek
Indexing is not really the issue here, I think. I tried it with FFVideoSource too (which I didn't use in this case, as I need to set the fps; FFVideoSource just assumes 23.976).

Mind you, I use MCTemporalDenoise a lot (~300GB a week, as I'm reprocessing my now vast Blu-Ray collection). Mostly it goes very well. There's just a few films where the process gets stuck somehow, like with 'Push'.

EDIT: I'll be d*amned. :) Finally bought a license for DGDecNV (about time; no point in spending $1,000 on a i7 980x CPU, only to skimp out on this cheap decoder license), and now it actually works. :) Guess FFVideoSource isn't at good at indexing as it thinks. I should have done this much earlier!

P.S. DGDecNV is also the only decoder, so far, that gets the framerate right without external help.

Usedocne
18th September 2010, 14:57
I'm having trouble with MCTemporalDenoise 'hanging' at times. Well, it doesn't really hang, in the sense of not responding any more; it just doesn't output anything any more, like being caught in a loop somehow. Here's a good example of a video fragment (5 MB) causing this, from the movie 'Push':

Push fragment (http://www.mediafire.com/?b66rvl2ig9fql6x)

Processed as follows:

DSS2("c:\video\push_test.m2ts", fps=24).ConvertToYV12()

Crop(0, 132, 0, -132)

MCTemporalDenoise(settings="low")
GradFun2DBmod(thr=1.4,thrC=1.0,mode=0,str=1.2,strC=0.0,temp=50,adapt=64,mask=false,show=false)

It happens with more movies (Stargate); but this sample is nice, as it occurs directly from the start.

I would really like to know what's causing this; and how to fix it, of course.

Thanks.

Hmm... maybe mt_masktools-25.dll could be the issue? As both MCTemporalDenoise and GradFun2DBmod seem to call it. Possibly causing a conflict.

kypec
26th September 2010, 09:32
Is there anybody out there who successfully runs this script in MT mode?
I mean, though I've an Intel i7-920 (quad core+HT = 8 threads) I can't make it to use more than 13% of CPU (which effectively means that only 1 thread is always running).
Here's my AVS script:# Initialize variable with path to my A/V tools
global avdir="C:\Program Files (x86)\AVTools\"
SetMTMode(2,2)
# Load all the plugins that will be used in the script
LoadPlugin(avdir + "DGDecNV\DGDecodeNV.dll")
Loadplugin(avdir + "plugins\mvtools2.dll")
Loadplugin(avdir + "plugins\mt_masktools-25.dll")
Loadplugin(avdir + "plugins\FFT3DFilter.dll")
Loadplugin(avdir + "plugins\TTempSmooth.dll")
Loadplugin(avdir + "plugins\RemoveGrainSSE2.dll")
Loadplugin(avdir + "plugins\RepairSSE2.dll")
Loadplugin(avdir + "plugins\deblock.dll")
Loadplugin(avdir + "plugins\DctFilter.dll")
Loadplugin(avdir + "plugins\EEDI2.dll")
Loadplugin(avdir + "plugins\SangNom.dll")
Loadplugin(avdir + "plugins\gradfun2db.dll")
Loadplugin(avdir + "plugins\AddGrainC.dll")

Import(avdir + "plugins\LSFmod.v1.9.avsi")
Import(avdir + "plugins\Deblock_QED.avsi")
Import(avdir + "plugins\GradFun2DBmod.v1.5.avsi")
Import(avdir + "plugins\MCTemporalDenoise.v1.4.20.avsi")

SetMTMode(5)
# Open source video clip
DGSource("300_raw_bd.dgi")

SetMTMode(2)
MCTemporalDenoise(settings="medium")

SelectRangeEvery(FrameCount/12, Round(FrameRate*5), 2400)

I can't select more than 2 threads in initial SetMTMode(2,2) because I'm using only 32-bit Avisynth and any more threads would just crash (tested).
Any suggestions of proven solutions are welcome, quality of LaTo's script is outstanding but not being able to utilize the full power of my CPU efficiently is just so frustrating :(
Maybe 64-bit MT Avisynth build is needed? But are there all required plugins available in 64-bit then?

levi
26th September 2010, 19:35
I mean, though I've an Intel i7-920 (quad core+HT = 8 threads) I can't make it to use more than 13% of CPU

Try disabling HT in the BIOS, I know it sucks but I always get better performance without it. 64 bit is an option, all requirements are available. However improvement in speed are about 10-15% in fps in my experience & does not help with maximizing CPU.

asarian
26th September 2010, 19:46
I can't select more than 2 threads in initial SetMTMode(2,2) because I'm using only 32-bit Avisynth and any more threads would just crash (tested).
Any suggestions of proven solutions are welcome, quality of LaTo's script is outstanding but not being able to utilize the full power of my CPU efficiently is just so frustrating :(
Maybe 64-bit MT Avisynth build is needed? But are there all required plugins available in 64-bit then?

I know SetMTMode is supposed to be the better way; but I'm having bad experiences with it myself (very slow, and not very compatible, regardless of mode). I currently encode just the old MT() call; like:

MT("""MCTemporalDenoise(settings="medium")""", threads=5, overlap=8)

Guaranteed to cause a 100% CPU load.

asarian
26th September 2010, 20:03
Try disabling HT in the BIOS, I know it sucks but I always get better performance without it. 64 bit is an option, all requirements are available.
Disabling HT is not a very good option. Sure, single-threaded processes may run marginally faster; but best is just to properly thread the MCTemporalDenoise call (see also above).

And 64-bit? Since when are all prerequisites for MCTemporalDenoise available in 64-bit?

Didée
26th September 2010, 20:22
Somwhen past, I compared plain source->x264 encoding with and without HT. The maximum performance with HT was 20% faster.
___

OTOH, it seems people just don't understand how very complex & ressource-hungry MCTemporalDenoise actually is, even more so with full-HD input.

With the (blataneously simple) assumption that many not-specifically-optimized processes have a complexity of O(x^2), the (same blataneously-simple) estimation is:

full-HD has 5 times the pixels of SD, requiring 5^2 = 25 times more work to do for processing filters.

levi
26th September 2010, 20:39
Disabling HT is not a very good option. Sure, single-threaded processes may run marginally faster; but best is just to properly thread the MCTemporalDenoise call (see also above).

And 64-bit? Since when are all prerequisites for MCTemporalDenoise available in 64-bit?

I'll definitely try your suggestion. you can find all 64 needs here (http://forum.doom9.org/showthread.php?t=152800).

asarian
27th September 2010, 04:24
I'll definitely try your suggestion. you can find all 64 needs here (http://forum.doom9.org/showthread.php?t=152800).

All my x64 needs? Looking at that threads, it seems SangNom, for instance, doesn't exist for 64-bit yet (needed for MCTemporalDenoise).

kypec
27th September 2010, 20:04
I know SetMTMode is supposed to be the better way; but I'm having bad experiences with it myself (very slow, and not very compatible, regardless of mode). I currently encode just the old MT() call; like:

MT("""MCTemporalDenoise(settings="medium")""", threads=5, overlap=8)

:thanks: a heap for your recommendation! Yeah, I was also a bit sceptical in the beginning about MT(...) due to its spatial splitting nature but eventually after reading your post I thought: "What the heck, MCTD works in temporal domain anyway so why should it be affected in negative way by spatial multithreading?"
Few sample runs seem fairly promising
MT("""MCTemporalDenoise(settings="medium")""", threads=4, overlap=8)
speeded up my encoding performance from 0.95 fps -> 2.33 fps with about same target bitrate as running regular non-MT MCTD. I encode with x264 at CRF=18, Preset=Slow and CPU utilization boosted ~90% all the time. Increasing number of threads to 8 didn't really help, the performance even dropped to 2.14 fps so I think 4 threads are sweet spot for me. :)

asarian
28th September 2010, 06:54
:thanks: a heap for your recommendation! Yeah, I was also a bit sceptical in the beginning about MT(...) due to its spatial splitting nature but eventually after reading your post I thought: "What the heck, MCTD works in temporal domain anyway so why should it be affected in negative way by spatial multithreading?"

It wouldn't. Except perhaps around the edges/borders of the individually processed segments, where you might see some if not artifacts, then visible distortions (so that the whole wouldn't look seamless any more). Fortunately, the overlap takes care of those. :)


Increasing number of threads to 8 didn't really help, the performance even dropped to 2.14 fps so I think 4 threads are sweet spot for me. :)

It depens on your CPU, for one (on how much physical threads it has to give; like my i7 980x has 12). And if you crop HD sources (like a typical 140px off of both top and bottom), you'll find that not all number of threads work: some settings will simply crash on the spot (has to do with internal divisibility).

Sometimes the MT() call will crash regardless. Like if you're 16 hours underway, at 56% or something. Most annoying. Then, when you simply rerun the process, you'll see it get past the previous crash-point without a problem. Can't be helped. Still, the speed increase is simply worth it. And going it 'safe' and always run single-threaded is not a real solution, either, as memory requirements are so high that some HD sources I had simply became stuck somewhere, and only doing the MT() thing solved it.

Again, it's all worth it, though. :) MCTemporalDenoise is the best script ever!

kypec
28th September 2010, 09:44
It depens on your CPU, for one (on how much physical threads it has to give; like my i7 980x has 12). And if you crop HD sources (like a typical 140px off of both top and bottom), you'll find that not all number of threads work: some settings will simply crash on the spot (has to do with internal divisibility).
Yep, setting threads=6 kept failing in my case (1920x800) though 4 or 8 worked fine.

Sometimes the MT() call will crash regardless. Like if you're 16 hours underway, at 56% or something. Most annoying. Then, when you simply rerun the process, you'll see it get past the previous crash-point without a problem. Can't be helped.:eek: Now you have scared me a little, hopefully my full run on 2-hour movie will finish OK at first attempt.
And going it 'safe' and always run single-threaded is not a real solution, either, as memory requirements are so high that some HD sources I had simply became stuck somewhere, and only doing the MT() thing solved it.
Again, it's all worth it, though. :) MCTemporalDenoise is the best script ever!If only all required plugins were available in 64-bit too, that would solve big memory demands this script has on HD material. My rig has 6GB DDR3 that deserve to be (ab)used up to the top now when CPU is on its job! :goodpost:

levi
28th September 2010, 14:32
MCTD can do a very good job without sangnom. Just set useEEDI2 = TRUE (64bit available) or disable the anti-aliasing.

asarian
28th September 2010, 14:51
MCTD can do a very good job without sangnom. Just set useEEDI2 = TRUE (64bit available) or disable the anti-aliasing.

And what do you do for DctFilter? Haven't seen a 64-bit version of that yet.

And what about GradFun2DB(mod)?

royia
3rd October 2010, 11:38
Does this filter apply some kind of Spatial NR?

Thanks.

LaTo
3rd October 2010, 11:56
Does this filter apply some kind of Spatial NR?

Thanks.

Only if post > 0.

royia
3rd October 2010, 12:08
Only if post >= 0.
Sorry I didn't get you.

LaTo
3rd October 2010, 12:54
Sorry I didn't get you.

Only if you set "post=x" in MCTD.

royia
3rd October 2010, 13:01
Are there profiles made by others?
I want to apply delicate Temporal and Spatial NR.

Thank You.

Yobbo
3rd October 2010, 21:19
LaTo, don't you mean only if post > 0 ??

LaTo
4th October 2010, 07:25
LaTo, don't you mean only if post > 0 ??

Yes of course :)

Yobbo
4th October 2010, 09:49
royia, for delicate work just use MCTemporalDenoise(settings="very low", post=1) # or settings="low"/"medium"/etc... or post=1.5/2/3/etc! ... (open the avsi in notepad and read the instructions!)

While I'm here, I must thank you LaTo for such a workhorse of a function! It is truly fantastic, and I use it all the time. It is so simple to use and so much fun too! (I use it with AVSPmod of course!). You should write a good "layman's bible" for it though!? ... with example before/after pics etc heh!

radigast
9th November 2010, 10:25
Hey all. I love this filter. However, I am having major problems when using it to encode an HD cartoon (Charlie Brown). I use AviSynth 2.6 (have also tried 2.5.8 to no effect), up-to-date filters, and a fully-updated MeGUI. Whenever the filter is used, I get some major blocks/artifacts/things (as you can see in the screenshots) for nearly every scene. It seems to center on something that moves, but also happens on non-moving things too. If the filter is not used, no glitching occurs. The source is 1080p and 23.976 fps. Can anyone lend some advice? Thanks!
AVI Synth Script:
DirectShowSource("My Movie Name Here", fps=23.976, audio=false, convertfps=false)

crop( 220, 0, -220, 0)

LanczosResize(984,720) # Lanczos (Sharp)

import("C:\Program Files\Video Tools\AviSynth\plugins\MCTemporalDenoise.avsi")
MCTemporalDenoise(settings="medium")


Screens:

http://thumb.phyrefile.com/r/ra/radigast/2010/11/09/300/Screen_1.png (http://www.phyrefile.com/image/view/A7IeEjRAzY8sdB9H)http://thumb.phyrefile.com/r/ra/radigast/2010/11/09/300/Screen_2.png (http://www.phyrefile.com/image/view/v1JHTZsZM1DXABzE)
http://thumb.phyrefile.com/r/ra/radigast/2010/11/09/300/Screen_3.png (http://www.phyrefile.com/image/view/iBCTvz0EXX0R8x8J)http://thumb.phyrefile.com/r/ra/radigast/2010/11/09/300/Screen_4.png (http://www.phyrefile.com/image/view/b5dNUd4lOYCVREF8)

Great Dragon
9th November 2010, 10:40
I doubt this is because of MCTD. I've tried to encode Charlie Brown cartoons myself and I don't have such problems.
I think this is caused by your directshow decoder.

radigast
9th November 2010, 16:14
According to GraphStudio, ffdshow is decoding the h264 stream. So, ffdshow would be the directshow source, correct? Movies play fine in MPC-HC without the weird artifacts. What suggestions could you give that may help improve this problem using this filter during encoding?

poisondeathray
9th November 2010, 16:21
Try dss2() or ffvideosource() instead of directshowsource() . It might be losing it's place getting the frames mixed up, causing those errors with temporal filters

radigast
9th November 2010, 18:19
You're right. Turns out it wasn't the filter after all. My source was muxed in an m2ts container, which apparently is not the most ideal.
As per the FFMS2 user manual:
Known issues
* There will appear decoding artifacts on h264 in transport streams.
I can only assume the same happens with directshow, as that is exactly what the resulting encode was showing. Remuxing into an .mkv container fixed the decoding artifact problem, and I was still able to use directshow.

SilaSurfer
21st November 2010, 17:57
Lato , outstanding script, tried it on some DVDs got awasome results. Just one question. FF3dgpu is not meant for Multithreading, and fft3dfilter is too slow even with Avisynth MT. I was wondering if I could call FFT3dgpu before MCTemporaldenoise, but I would need the paramaters which are used in your script for FFt3gpu.
Something like:

FFt3dgpu(settings)
SetMTmode(2,0)
McTemporaldenoise("settings=x, without fft3dgpu) like if I wanted to extract FFt3dgpu and use it in it own. Is this possible? Thanks

LaTo
21st November 2010, 19:12
Lato , outstanding script, tried it on some DVDs got awasome results. Just one question. FF3dgpu is not meant for Multithreading, and fft3dfilter is too slow even with Avisynth MT. I was wondering if I could call FFT3dgpu before MCTemporaldenoise, but I would need the paramaters which are used in your script for FFt3gpu.
Something like:

FFt3dgpu(settings)
SetMTmode(2,0)
McTemporaldenoise("settings=x, without fft3dgpu) like if I wanted to extract FFt3dgpu and use it in it own. Is this possible? Thanks

Yes, you need to do something like this:
sigma = 4
prefilter = FFT3Dgpu(sigma=sigma*0.8, sigma2=sigma*0.6, sigma3=sigma*0.4, sigma4=sigma*0.2)

SetMTmode(2,0)
MCTemporalDenoise([settings], p=prefilter)

SilaSurfer
22nd November 2010, 17:19
Yes, you need to do something like this:
sigma = 4
prefilter = FFT3Dgpu(sigma=sigma*0.8, sigma2=sigma*0.6, sigma3=sigma*0.4, sigma4=sigma*0.2)

SetMTmode(2,0)
MCTemporalDenoise([settings], p=prefilter)

Thanks LaTo for your response. Great news about FFt3dgpu.:p Because I never used Fft3dgpu with so many sigmas I don't have experiance with so many settings for sigmas. After reading your function script, sigma=4 is used in "very low" preset, please correct me if I'm wrong.

sigma = 4
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=4*0.8, sigma2=4*0.6, sigma3=4*0.4, sigma4=4*0.2, bw=16, bh=8, ow=8, oh=4, plane=0) luma plane denoising
SetMTmode(2,0)
MCTemporalDenoise(settings="low", p=prefilter)

Correct? If so this example is for "low" preset? If I wanted to use lets say "very low" preset

sigma = 2
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=2*0.8, sigma2=2*0.6, sigma3=2*0.4, sigma4=2*0.2, bw=16, bh=8, ow=8, oh=4, plane=0) luma plane denoising
SetMTmode(2,0)
MCTemporalDenoise(settings="very low", p=prefilter)

For "chroma = true" in McTemporalDenoise if I wan't to denoise Chroma plane also using "very low" preset, calling FFt3dgpu as prefilter would be like this

sigma = 2
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=2*0.8, sigma2=2*0.6, sigma3=2*0.4, sigma4=2*0.2, bw=16, bh=8, ow=8, oh=4, plane=4) - Chroma and Luma
SetMTmode(2,0)
MCTemporalDenoise(settings="very low", p=prefilter, chroma=true)

Am I wrong? If I am, could you please be so kind to write me down the settings for FFt3dgpu as prefilter like you specified in McTemporalDenoise script for "very low" and "low" presets, those two are the only ones that I use for my encodings. Thanks for your patience.

LaTo
22nd November 2010, 18:19
Thanks LaTo for your response. Great news about FFt3dgpu.:p Because I never used Fft3dgpu with so many sigmas I don't have experiance with so many settings for sigmas. After reading your function script, sigma=4 is used in "very low" preset, please correct me if I'm wrong.

sigma = 4
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=4*0.8, sigma2=4*0.6, sigma3=4*0.4, sigma4=4*0.2, bw=16, bh=8, ow=8, oh=4, plane=0) luma plane denoising
SetMTmode(2,0)
MCTemporalDenoise(settings="low", p=prefilter)

Correct? If so this example is for "low" preset? If I wanted to use lets say "very low" preset

sigma = 2
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=2*0.8, sigma2=2*0.6, sigma3=2*0.4, sigma4=2*0.2, bw=16, bh=8, ow=8, oh=4, plane=0) luma plane denoising
SetMTmode(2,0)
MCTemporalDenoise(settings="very low", p=prefilter)

For "chroma = true" in McTemporalDenoise if I wan't to denoise Chroma plane also using "very low" preset, calling FFt3dgpu as prefilter would be like this

sigma = 2
prefilter = FFT3Dgpu(mode=1, precision=2, bt=1, sigma=2*0.8, sigma2=2*0.6, sigma3=2*0.4, sigma4=2*0.2, bw=16, bh=8, ow=8, oh=4, plane=4) - Chroma and Luma
SetMTmode(2,0)
MCTemporalDenoise(settings="very low", p=prefilter, chroma=true)

Am I wrong? If I am, could you please be so kind to write me down the settings for FFt3dgpu as prefilter like you specified in McTemporalDenoise script for "very low" and "low" presets, those two are the only ones that I use for my encodings. Thanks for your patience.

All seems to be correct!

SilaSurfer
22nd November 2010, 18:33
So the sigma setting found in your script for example Low preset

"Low" sigma=4 must be multiplied with sigma settings in Fft3dgpu call like (fft3dgpu(sigma=4x0.8, sigma2=4x0.6, sigma3=4x0.4, sigma4=4x0.2)

"Very Low" sigma=2 (fft3dgpu(sigma=2x0.8, sigma2=2x0.6, sigma3=2x0.4, sigma4=2x0.2)

I know I'm taking your time and patience but I'm kind of precise so I rather check twice, btw great tool just like Lsfmod 1.9, Keep it up!;)

LaTo
22nd November 2010, 19:06
So the sigma setting found in your script for example Low preset

"Low" sigma=4 must be multiplied with sigma settings in Fft3dgpu call like (fft3dgpu(sigma=4x0.8, sigma2=4x0.6, sigma3=4x0.4, sigma4=4x0.2)

"Very Low" sigma=2 (fft3dgpu(sigma=2x0.8, sigma2=2x0.6, sigma3=2x0.4, sigma4=2x0.2)

I know I'm taking your time and patience but I'm kind of precise so I rather check twice, btw great tool just like Lsfmod 1.9, Keep it up!;)

Yes it's OK ;)

SilaSurfer
23rd November 2010, 13:28
Thanks LaTo for everything! Wish you all the best!

~SilaSurfer~

SilaSurfer
28th November 2010, 16:07
I' m getting some ringing on my Dvd backups. These are good quality DVD sources for example LOTR series. Ringing around small objects like candels and swords.

Mctemporaldenoise(settings="very low")

I was wondering LaTo, is Edgeclean meant for preventing ringing like preblur in LsfMod, or more for cleanup if those are present in the source? The next that comes to my mind is lowering the sharpening strength.

LaTo
28th November 2010, 17:13
I was wondering LaTo, is Edgeclean meant for preventing ringing like preblur in LsfMod, or more for cleanup if those are present in the source?

Edgeclean is for cleanup the video after le denoising

SilaSurfer
28th November 2010, 17:36
So if there are halos and ringing already present in the source, then it should be used?

LaTo
28th November 2010, 17:44
So if there are halos and ringing already present in the source, then it should be used?

Yes it's OK

DVDBob
31st December 2010, 00:46
Hello.

I can't find all the needed filters to this filter.

So i hope someone they can upload a package with all the needed filters

Rumbah
11th January 2011, 16:49
That would be really great as I struggle to get all the correct versions, too.

DVDBob
11th January 2011, 17:57
That would be really great as I struggle to get all the correct versions, too.

Here: http://www.mediafire.com/?ehgc74m3nc1l3ve

The remaining dlls that may be required go in the system32 / (syswow64 for 64 bit windows). open your .avs in virtualdub & it will tell you if one is missing.

Rumbah
12th January 2011, 03:42
Thank you very much, I now got it working.

And I am really astonished. The results are great. I never thought you get that much out of a bad source ;)

Boulder
15th January 2011, 21:35
Is there a specific reason for using hpad=0 and vpad=0 in the MSuper calls?

LaTo
16th January 2011, 08:25
Is there a specific reason for using hpad=0 and vpad=0 in the MSuper calls?

It's a minor speed optimization:
MCTemporalDenoise already pad the clip to next+1 mod16 value, so no need to do it in MSuper

LaTo
20th January 2011, 21:42
May I know why you default search=2(Diamond search) in MAnalyse instead of official default search=4(Hexagon search)? And is it not worthy to use better search method like search=5(Uneven Multi Hexagon search) or search=3(Exhaustive search)?

Because when I wrote the script search=2 was the default in MVTools and search=4/5 was added later.

DVDBob
26th January 2011, 03:46
I have converted a movie with this AviSynth Script and obtained a good result:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\ffms\ffms2.dll")
FFVideoSource("C:\Users\Pepsi\Documents\hidownload\My Movie.flv")
crop(16,6,-12,-2)
MCTemporalDenoise(settings="medium")

I need to deblock and i know i can do it with the filter too.

But i don't know how i can enable it.

kypec
26th January 2011, 08:12
I need to deblock and i know i can do it with the filter too.

But i don't know how i can enable it.

MCTemporalDenoise(settings="medium",deblock=true)

DVDBob
26th January 2011, 14:21
Ok Thanks

Boulder
27th January 2011, 17:25
Is it possible to use a prefiltered clip for motion estimation only (for example a clip processed with the functions here: http://forum.doom9.org/showthread.php?p=1474191#post1474191)? If I've understood correctly, using p in MCTemporalDenoise means that the properties of the prefiltered clip are also used for the denoising process. If I've understood the process (by looking at the code) incorrectly, please clarify the idea a bit.

SilaSurfer
27th January 2011, 21:06
spatial = MinBlur(1)
temporal = spatial.FluxsmoothT()
mixed = temporal.merge(spatial,0.251)

prefilter=mixed.sbr()

MCTemporalDenoise([settings], p=prefilter)

I think Fft3dgpu or Fft3dfilter can be replaced by a custom prefilterer.

Boulder
27th January 2011, 21:38
Yes I know, I was just wondering whether a blurry (but dead calm) prefiltered video messes up the actual denoising process. It's not mentioned anywhere that the prefiltered clip is only a helper for the motion estimation process.

LaTo
28th January 2011, 08:07
Yes I know, I was just wondering whether a blurry (but dead calm) prefiltered video messes up the actual denoising process. It's not mentioned anywhere that the prefiltered clip is only a helper for the motion estimation process.

The prefiltered clip is only used for the motion estimation process.

But it's also used to limit the denoising when limit=-1/limit2=-1: if the results are bad you can try to use limit>0.

Boulder
28th January 2011, 12:08
The prefiltered clip is only used for the motion estimation process.

But it's also used to limit the denoising when limit=-1/limit2=-1: if the results are bad you can try to use limit>0.

Thanks, that clears things up :) I didn't think about the limit setting at all.

SilaSurfer
28th January 2011, 13:09
Lato would be nice if you would incorporate Motion Compensated Sharpening in your function.:p

LaTo
28th January 2011, 14:03
Lato would be nice if you would incorporate Motion Compensated Sharpening in your function.:p

It has already been implemented long time ago

SilaSurfer
28th January 2011, 14:37
Oh didn't see that sorry for my mistake.

SilaSurfer
12th February 2011, 17:35
Hi LaTo. I'm interested in Edgecleaning used in MCTemporalDenoise. Which filters or functions are used? How can I call Edgecleaning on its own? I use MCTD continuosly. It awasome, but I have a source which is clean only some ringing and halos are in it hence my request. Thank you in advance.

MShoulerUK
18th February 2011, 00:05
Has anyone noticed that on a high stigma value (5 or above for example), that speech doesn't look as fluid? At first I thought it might be a audio sync problem, but the video I encoded with a lower stigma looks fine, anyone else come across this?

Dogway
22nd February 2011, 13:33
I had some confusion over the different MDegrain based function scripts, with a cleanup in mind I made a test on a DVD source with similar settings*. Just wanted to share the comparison.
*(I only defined important parameters like SAD, temporal, and sharpness if it had)

MCTemporalDenoise.v1.4.20.avs
TemporalDegrain.avs
MC_Spuds.avs
SMDegrain.avs
Killer.avs
GTDegrain.avs

PSD 9Mb
http://www.sendspace.com/file/e07zoy

Finally decided to stay with smdegrain for speed/simplicity and mctemporaldenoise for accuracy/options. Thanks LaTo : P

SilaSurfer
22nd February 2011, 13:46
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.

DVDBob
22nd February 2011, 22:38
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.

Yes but very slow.

StainlessS
22nd February 2011, 23:02
@LaTo

You are aware that DGDecode.DLL decode also has a DeBlock() function
with different arguments/ranges/colorspaces?
Assuming that the DeBlock.dll is called "DeBlock.dll", then perhaps it
would be preferable to use DeBlock_DeBlock() so as to use your required
DeBlock v1.2.

Didée
22nd February 2011, 23:27
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.
To put an analogy ...


MDegrain1/2/3:

http://img87.imageshack.us/img87/1124/messer2b.jpg


MCTemporalDenoise:

http://img16.imageshack.us/img16/8671/messer9b.jpg

:D

Hint: this ain't a straight compliment.

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)

LaTo
7th May 2011, 13:04
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.

star5
7th May 2011, 13:49
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:

levi
8th May 2011, 15:41
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...

jmac698
28th September 2011, 18:49
Ok,
The original Deblock_QED_MT2.avsi is at http://www.64k.it/andres/dettaglio.php?sez=avisynth. This version requires masktools <a35 to work, because of new "bias" parameter added. The newer Deblock_QED_MT2.avsi made some minor changes, and now needs masktools a45+ to work. Using a48 should be ok. The requirements are actually different if you update some of the scripts.
So just tell me, does my pack work as is?

Yes I used old version fftw3, once I tried to use new version and it didn't work for me. I should test again.

Update:
I checked the changelog from a43-a48. Some bugs were fixed and new features added, but nothing incompatible.

Alpha 48 :

added : signed and unsigned binary shifts to LUTs, ceil/floor/trunc float -> int conversions. @ is now equivalent to °

Alpha 47 :

added : signed and unsigned binary operators to LUTs

Alpha 46 :

fixed : with mt_lutf, "std" mode wasn't working. Could also affect "std" with mt_luts and mt_lutsx

Alpha 45 :

fixed : mt_clamp on sse2 platforms with resolution not multiple of 64
added : mode parameter to mt_lutspa, to clean up biased/relative mess

Alpha 44 :

added : new mode (weighted sum) for mt_luts and mt_lutsx


I will also list the differences in the new Deblock_QED_MT2.avsi:

# Changes 2008-08-18: (Didée)
# - Replaced the ugly stackXXX cascade with mt_LutSpa() (requires MaskTools v2.0a35)
# - Changed Quant and Offset defaults to 24,28,2,4,4,8

# Changes 2010-05-25:
# - Explicitly specified parameters of mt_LutSpa()
# (required due to position of new 'biased' parameter, starting from MaskTools 2.0a43)
# - Non mod 16 input is now padded with borders internally

# Changes 2010-08-18:
# - Replaced AddBorders with PointResize
# - Changed Quant and Offset defaults to 18,19,3,4,1,1 to reduce blurring

# Changes 2010-10-16:
# - Replaced 'relative' with the new 'mode' parameter in mt_LutSpa(), starting from MaskTools 2.0a45
# - Changed Quant and Offset defaults to 24,26,1,1,2,2 to increase effectiveness, but still within sensible limits.
# (see for details: http://forum.doom9.org/showthread.php?p=810932#post810932)

totya
28th September 2011, 19:09
Ok,
The original Deblock_QED_MT2.avsi is at http://www.64k.it/andres/dettaglio.php?sez=avisynth. This version requires masktools <a35 to work, because of new "bias" parameter added. The newer Deblock_QED_MT2.avsi made some minor changes, and now needs masktools a45+ to work. Using a48 should be ok.

Thanks for the info!

So just tell me, does my pack work as is?
Not much different for me "packs" :)


Yes I used old version fftw3, once I tried to use new version and it didn't work for me. I should test again.

All new version is work's for me (need libfftw3f-3.dll... rename it to fftw3.dll. I read this somewhere on doom9 forum). You can run benchmark "benchf.exe -opatient 64 128 256 512 1024 2048 4096" and you see speed different.

Thanks!

jmac698
28th September 2011, 20:03
Ok, I will update the one file and try to read the correct installation directory.
Thanks for the testing and feedback.

Boulder
28th September 2011, 20:41
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?I've noticed a similar issue sometimes with SD material as well. Using a radius of over 2 frames is somewhat slower (or at least was with my old Q6600), and that's the big difference between medium and the lower defaults.

asarian
30th September 2011, 12:30
I've noticed a similar issue sometimes with SD material as well. Using a radius of over 2 frames is somewhat slower (or at least was with my old Q6600), and that's the big difference between medium and the lower defaults.

The problem for me is not so much that 'medium' takes a bit longer than 'low' (which is totally reasonable), but that sometimes 'medium' (or higher) slows down by an order of magnitude (like I said, ca. 0.08 fp/s on my i7 980X). In fact, it slows down so much that you think the process is stuck; only it isn't (it looks correctly when you examine the output) -- it just goes extremely slow; like where it would suddenly take 700 hours to complete.

Like I stated, the slowdown doesn't always happen; merely on some sources (I suspect because of the the grain being pretty intense).

cretindesalpes
30th September 2011, 12:59
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.

asarian
30th September 2011, 14:23
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.

Thanks! Never really understood the memory max variable. Gonna give it a try (when the current render is done); and I'll let you know if it worked. :)

LaTo
1st October 2011, 07:43
It would be great to find a script & sample that isolate the problem. Someone?

chainring
4th October 2011, 05:23
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?I'm currently doing some 1080 BD to 720p downconversions and have no problems. If I try to do anything with SetMTMode, no matter the mode and number of threads, all hell breaks loose.

i7 2600K
4 GB RAM
Win7 x64 Ult

Avisynth 2.6 with SET's latest MT .dll
Latest MeGUI set for dev updates
All the correct versions of Avisynth plugin's for MCTD, except I'm using the latest Masktools.

chainring
4th October 2011, 05:24
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.I noticed that with, IIRC, when playing with SetMTMode.

asarian
4th October 2011, 15:48
I noticed that with, IIRC, when playing with SetMTMode.

It says here (http://avisynth.org/mediawiki/Internal_functions/Control_functions) SetMemoryMax is limited to 512MB on 2.5.8. :(

Didée
4th October 2011, 16:02
That limit is only for the *default* value (so that e.g. on a 16GB machine, the default won't be set to a 4GB-ish value).

You can of course specify a value >512MB manually.

asarian
4th October 2011, 16:07
That limit is only for the *default* value (so that e.g. on a 16GB machine, the default won't be set to a 4GB-ish value).

You can of course specify a value >512MB manually.

Guess I read it wrong then. My bad. :) Thanks!

DVDBob
13th October 2011, 15:57
Hello.

I use DGIndexNV and this script, but i only convert with 2-3 fps, if i use medium setting.

How can i get it to convert faster???

x264Boy
14th October 2011, 12:07
Hello.

I use DGIndexNV and this script, but i only convert with 2-3 fps, if i use medium setting.

How can i get it to convert faster???

I got same problem.

Reino
24th October 2011, 21:08
I've been trying out some denoisers today, but I'm having some trouble getting MCTemporalDenoise to work.

For MCTemporalDenoise my Avisynth plugin directory contains:
addgrain.avs, AddGrainC.dll, DctFilter.dll, deblock.dll, Deblock_QED_MT2.avs, EEDI2.dll,
FFT3DFilter.dll, gradfun2db.dll, GradFun2DBmod.v1.5.avsi, LSFmod.v1.9.avsi, MCTemporalDenoise
.v1.4.20.avsi, mt_masktools-25.dll, mt_masktools-26.dll, mvtools2.dll, RemoveGrain.dll,
Repair.dll, RSharpen.dll, SangNom.dll, TTempSmooth.dll and fftw3.dll in the WINDOWS-directory

The following error-message shows up with "MCTemporalDenoise(settings="low")":
Evaluate: System exception - Illegal Instruction
(GradFun2DBmod.v1.5.avsi, line 291)
(MCTemporalDenoise.v1.4.20.avsi, line 1072)
(MCTemporalDenoise.v1.4.20.avsi, line 1090)
(New File (2), line 10)

Setting up this filter proves to be quite a challenge, so can somebody point me in the right direction?

P.s. My computer is rather old; AMD Athlon XP 3200+, so only SSE. Hope that's not the cause.

jmac698
25th October 2011, 02:00
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec

I had mentioned it here:
http://forum.doom9.org/showthread.php?t=162622
It's also here:
http://avisynth.org/mediawiki/MCTemp...quired_Filters

Reino
25th October 2011, 06:36
I have seen it, I have used it, but it caused Avisynth to crash completely. At least now, collecting everything by hand, I get an error message.

jmac698
25th October 2011, 06:40
SSE only is your problem.
I only included optimized versions I believe.

Reino
25th October 2011, 17:58
You're absolutely sure? Quickly looking through each filter's readme didn't reveal one to be SSE2 only.
As I mentioned earlier, Avisynth here crashed on your package with optimized versions. The fact it doesn't crash on my handpicked collection shows you it's not a SSE or SSE2 problem I guess.
Something else must be the problem...

LaTo
25th October 2011, 18:35
Seriously I don't understand why people have always problems to set up MCTD.
It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder.
That's all.

(Sometime you need to choose between .dll according to your avisynth's version and to your CPU's instructions. Read the information file of each filter before.)

jmac698
25th October 2011, 18:49
No, not sure just a suggestion. However for me it worked, but I used avisynth 2.58 32bit. If you can find the problem and proper versions I can update the installer.

Ok 291 is

\ : Eval("dither." + custom)

so your custom string is incorrect. Since you used preset low that's strange. Try playing with the script, setting custom to empty for example...

Reino
25th October 2011, 20:30
Put the corresponding .dll or .avsi in autoloading folder.Keep it cool, ok? I did exactly that:For MCTemporalDenoise my Avisynth plugin directory contains:
addgrain.avs, AddGrainC.dll, DctFilter.dll, deblock.dll, Deblock_QED_MT2.avsi, EEDI2.dll,
FFT3DFilter.dll, gradfun2db.dll, GradFun2DBmod.v1.5.avsi, LSFmod.v1.9.avsi, MCTemporalDenoise
.v1.4.20.avsi, mt_masktools-25.dll, mt_masktools-26.dll, mvtools2.dll, RemoveGrain.dll,
Repair.dll, RSharpen.dll, SangNom.dll, TTempSmooth.dll and fftw3.dll in the WINDOWS-directoryAll latest versions. Also libfftw3f-3.dll resides in the WINDOWS-dir btw. Afaik the only plugin with multiple (optimized) versions available is RemoveGrain, and I'm even using the most basic one.
so your custom string is incorrectMCTemporalDenoise(settings="low") is all I initially tried. I haven't touched any other command. MCTemporalDenoise() doesn't work either.
No matter what I try, I keep getting the error message mentioned earlier.

Btw jmac698, I found out why Avisynth failed to load at all. Deblock_QED_MT2.avsi within your package is saved as UTF-8 when it should be ANSI! Have people even successfully used your package? You can't use Avisynth at all if you haven't solved this first.
AND you forgot MVTools2. Without it you'll get:Script error: there is no function named "MSuper"
(MCTemporalDenoise.v1.4.20.avsi, line 712)
And what is AvsRecursion.dll for, when it's not required for MCTemporalDenoise.v1.4.20.avsi.

This whole filter is driving me nuts atm...

Using jmac698's package, with RemoveGrain.dll, Repair.dll and RSharpen.dll instead of their SSE2 counterparts and with an ANSI version of Deblock_QED_MT2.avsi gives me the same error as in my initial post

LaTo
25th October 2011, 21:02
Keep it cool, ok?
Are we friends? So stop talking to me this way!
I do not see when I could be offensive to you...

I did exactly that
No you have not done what I said above.
Moreover I just saw that your mistake is obvious, simply read the documentation of each filter to find the solution.

Reino
25th October 2011, 22:09
Nice attitude!
Forget about it...

the_weirdo
25th October 2011, 22:10
..., mt_masktools-25.dll, mt_masktools-26.dll,...


Not sure this is the cause of your problem, but you only need one of those two. Choose the one that compatible with your Avisynth's version.

Reino
25th October 2011, 23:58
Deleting mt_masktools-26.dll (I'm using Avisynth 2.5.8) doesn't make a difference. Thanks though.

LaTo
26th October 2011, 07:45
The error said this:
Evaluate: System exception - Illegal Instruction
(GradFun2DBmod.v1.5.avsi, line 291)
*Illegal Instruction*: your CPU doesn't support some used instructions


First thing, we check the line 290-291 of GradFun2DBmod.v1.5.avsi:
grain = custom=="empty" ? dither.addgrainC(str,strC,0,0)
\ : Eval("dither." + custom)
diff = custom=="empty" ? blankclip(dither,color_yuv=$808080).addgrainC(str,strC,0,0)
\ : Eval("blankclip(dither,color_yuv=$808080)." + custom)
These lines only contains one filter call: AddGrainC, it should be the culprit.



Second step, we remove AddGrainC's calls to confirm the problem:
grain = custom=="empty" ? dither
\ : Eval("dither." + custom)
diff = custom=="empty" ? blankclip(dither,color_yuv=$808080)
\ : Eval("blankclip(dither,color_yuv=$808080)." + custom)
If this modification works, it's a problem with AddGrainC.



Third point, we look at the readme and the official thread.

Readme states that AddGrain only requires SSE cpu. So it should work on your CPU, strange...

But in the official thread (http://forum.doom9.org/showthread.php?t=111849), it seems that foxyshadis might forget to remove the SSE2 switch during the compilation.



If everything is correct, you should post on AddGrainC's thread to get a fix.

So you see, I hope to be enough *cool* for you :p

jmac698
26th October 2011, 08:43
And that's the same spot I pointed out as well.. though didn't go as far..

Gavino
26th October 2011, 09:46
And that's the same spot I pointed out as well.. though didn't go as far..
Ok 291 is

\ : Eval("dither." + custom)

so your custom string is incorrect.
What you failed to take into account is that for a multi-line statement, the line numbers reported might be out by one. The actual error occurred on line 290 (addgrainC).

jmac698
26th October 2011, 10:13
good tip, thanks!

Reino
26th October 2011, 20:13
Well, there you have it. AddGrainC is indeed the culprit. After having removed it's calls from GradFun2DBmod.v1.5.avsi, your filter actually works. I'll definitely stop by foxyshadis's AddGrainC thread. Thanks for your help.

You know, I've never dug deep into Avisynth filter-scripts like this. I never alter or even touch script at all. Whenever I had an Avisynth error, it was always a faulty command in the initial script or an issue with the dependencies (dlls). So all in all, there's a bit more to "It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder." than you'd think at first, but hey, we learn everyday.

I was rather indignant at your initial post, as if I just asked the most stupidest thing. On the other hand, I know the feeling however from my own experience with people asking rather silly questions at first site. Anyway, let's forget about our altercation. Thanks again.

LaTo
26th October 2011, 21:10
You know, I've never dug deep into Avisynth filter-scripts like this. I never alter or even touch script at all. Whenever I had an Avisynth error, it was always a faulty command in the initial script or an issue with the dependencies (dlls). So all in all, there's a bit more to "It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder." than you'd think at first, but hey, we learn everyday.
My first post was referring to a global view of errors caused by the lack of reading the documentation (mt_masktools-25.dll & mt_masktools-26.dll).

The purpose of my post was not to be offensive, it was just an observation about recurring errors over a lot of pages in this thread.


I was rather indignant at your initial post, as if I just asked the most stupidest thing. On the other hand, I know the feeling however from my own experience with people asking rather silly questions at first site. Anyway, let's forget about our altercation. Thanks again.
Sorry about that, but your answer was really a bit too offensive... So that is why my second post was such direct.

Anyway there is nothing personal. I'm glad the problem is partially solved, don't hesitate if you have any further questions ;)

jmac698
26th October 2011, 22:21
I'm glad you've resolved your issues, and it looks like there's a new version of addgrainC, so I can see if I can account for that in the installer. I think there's a cpudetect plugin for the installer. Anyhow that's low on my priority list for today...

fbs
25th November 2011, 15:27
Has anyone managed to run it with multithreading?

chainring
26th November 2011, 07:07
Has anyone managed to run it with multithreading?Yes.
I have the "SetMemoryMax()" in there, but you may or may not need it. I have 16GB RAM and bumped it up from the default max of 512 to 768. In all honesty, I haven't seen any changes by going higher or lower, so I just leave it, and that's for SD and HD sources.

From what I've read, SetMTMode has to be set to 5 before your source call and the second number is threads, which if you don't set here will effectively set you to one. I have a i7 2600K and set it to 3 since going any higher does nothing.

The later SetMTMode sets it back to a more aggressive multi-threading mode.

There ya go!

SetMemoryMax(768)
SetMTMode(5,3)
LoadPlugin("C:\Apps\Video\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\VIDEO\01 IFO\00 NO ANGLES\007_WORLD_NOT_ENOUGH\VIDEO_TS\VTS_01_1.d2v", info=3)
LoadPlugin("C:\Apps\Video\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)

crop( 8, 62, -8, -66)

SetMTMode(2)

MCTemporalDenoise()

Gavino
26th November 2011, 09:47
From what I've read, SetMTMode has to be set to 5 before your source call and the second number is threads, which if you don't set here will effectively set you to one.
You're right that the second parameter is only used on the first call, but the default is the number of processors available, not one.

fbs
26th November 2011, 15:16
That's what I do and I always get crashes after some minutes.. maybe that's because I'm using QTGMC's dlls..? qtgmc works fine with them.. :\

-Vit-
26th November 2011, 17:44
It could be the opposite fbs, maybe you need more modded plugins...
The general advice I offer for multithreading in the first post of the QTGMC thread applies to all multithreaded scripts:
- Use SEt's 2.6 MT, all other MT versions have known threading bugs
- Recompile all plugins with SEt's fixes. This has been done in the QTGMC modded plugins.

MCTemporalDenoise uses plugins that are not used by QTGMC. Some of those plugins will contain known threading bugs, unless their authors have updated them recently for that reason.

chainring
26th November 2011, 19:16
You're right that the second parameter is only used on the first call, but the default is the number of processors available, not one.Now, for clarification sake, is that the number of physical CPU's, or the number of real cores, not including hyperthreading, etc...?

Didée
26th November 2011, 19:30
As much as there are diagrams in the Taskmanager. ;)

I.e. the logical cores from hyperthreading are included. A 4C8T CPU identifies itself to the OS as to have 8 cores.

fbs
27th November 2011, 02:22
MCTemporalDenoise uses plugins that are not used by QTGMC. Some of those plugins will contain known threading bugs, unless their authors have updated them recently for that reason.

I wonder where I could find these extra modded plugins ~~

-Vit-
27th November 2011, 03:03
I wonder where I could find these extra modded plugins ~~
Rear end of a compiler
:p

chainring
27th November 2011, 03:09
As much as there are diagrams in the Taskmanager. ;)

I.e. the logical cores from hyperthreading are included. A 4C8T CPU identifies itself to the OS as to have 8 cores.Excellent, helpful as always, Didée. Thank you!

Corpsecreate
28th November 2011, 14:09
My encode always crashes when I use MCTemporalDenoise on my 1080p anime source. It is an extremely noisy video source so I have to use settings = high or very high. I have downscaled it to 720p before denoising it but I still have the same problem. Is there any way I can stop this from happening? The exact line in my script is:

MT("""MCTemporalDenoise(settings="high")""", threads = 4, overlap=0)

The results of MCTD are amazing and nothing I've tried comes close to it but if it keep crashing, I may have to use something else :(

kypec
28th November 2011, 15:49
Is there any way I can stop this from happening? The exact line in my script is:

MT("""MCTemporalDenoise(settings="high")""", threads = 4, overlap=0)

The results of MCTD are amazing and nothing I've tried comes close to it but if it keep crashing, I may have to use something else :(
Did you try to run your script in non-MT mode? Usually it's multi-threading that causes all problems with such demanding processing...

fbs
3rd December 2011, 06:58
It seems it only works stable if it's the LAST line of the .avs. if there's a converttorgb() or whatever at the end, it crashes after some minutes. (it's not a immediate crash)
Why would it be like that? SEt's bug? :P

setmemorymax(600)
setmtmode(3, 7)
avisource("d:\ds000.avi")
ChromaShift(C=4)
crop(16, 8, -20, -8)
setmtmode(2)
MCTemporalDenoise(settings="medium",enhance=true,stabilize=true,interlaced=true,sharp=false,chroma=true,edgeclean=true,truemotion=true,post=2,ncpu=1)

I'm afraid VirtualDub will have problems with it's output, because the source .avi is an interlaced YV12 720x480 vhs rip.. and I couldn't put a "converttorgb()" at the end... am I in trouble?

oh I'm using set's 2.6mt with -vit-'s modded plugins \o

Corpsecreate
8th December 2011, 07:57
Ok I managed to get it to stop crashing by removing the MT call.

I noticed that on scene changes, the denoise isnt applied well and you get grain/noise for the first 1-2 frames after a scene change. I understand that this is part of how a temporal denoiser works but is there any way I can reduce the effect? I am using the preset "high" setting.

An IP BreAKDoWN
12th January 2012, 07:49
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:

##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")

##Setting Speed##
SetMTMode(5)

##Source Video##
AVCSource("G:\%PATH%\video.dga")

##Setting Cores##
SetMTMode(8)

##Decimate for timecodes##
Decimate(timecodes="G:\%PATH%\timecodes.txt",
\vfrstats="G:\%PATH%\timecodes.vfrstats")

##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)

##Some Tweaking##
Spline36Resize(960,720)

##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")

##Filtering##
MCTemporalDenoise(settings="low")

Taurus
12th January 2012, 09:34
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:

##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")

##Setting Speed##
SetMTMode(5)

##Source Video##
AVCSource("G:\%PATH%\video.dga")

##Setting Cores##
SetMTMode(8)

##Decimate for timecodes##
Decimate(timecodes="G:\%PATH%\timecodes.txt",
\vfrstats="G:\%PATH%\timecodes.vfrstats")

##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)

##Some Tweaking##
Spline36Resize(960,720)

##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")

##Filtering##
MCTemporalDenoise(settings="low")
Should be SetMTMode(2,8)
if your eight core monster handles it.
Some encoding frontends prefer
Distributor()
at the end of the script.
But for Virtualdub and MeGui this is a NoNo.
AVCSource("G:\%PATH%\video.dga")
Is this your real path?
And maybe try another decoder...
Which Avisynth MT version?

Zep
12th January 2012, 18:36
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:


Should be SetMTMode(2,8)
if your eight core monster handles it.
Some encoding frontends prefer
Distributor()
at the end of the script.
But for Virtualdub and MeGui this is a NoNo.


And maybe try another decoder...
Which Avisynth MT version?

yeah all good tips from Taurus. I will add get rid of

SetMemoryMax(1024)


the defaults are more than enough. Using 1024 is gonna cause low memory crashes and huge slow down if you are lucky not to crash. For me the 2.6 MT latest build by SET is the best. For me setting the number of cores to the number of REAL cores you have works best. Do you have 8 real cores?

An IP BreAKDoWN
12th January 2012, 19:13
Should be SetMTMode(2,8)
if your eight core monster handles it.

I thought i had to set the speed then the cores as stated here (http://forum.doom9.org/showthread.php?t=148782). And why 2, I thought I have to do 5?
Should be [COLOR="Red"]
Is this your real path?
And maybe try another decoder...

No of course not :P I have a working path. And for the decoder which one would you recommend?
Should be [COLOR="Red"]
Which Avisynth MT version?

2.6 MT (http://forum.doom9.org/showthread.php?t=148782)
I will add get rid of

SetMemoryMax(1024)


the defaults are more than enough. Using 1024 is gonna cause low memory crashes and huge slow down if you are lucky not to crash.

I'm going to comment it out and see what will happen. However I have 16 gigs of RAM and when I encode I barely use 20% total (including all other programs and OS). Should I still leave it out?

For me the 2.6 MT latest build by SET is the best. For me setting the number of cores to the number of REAL cores you have works best. Do you have 8 real cores?

Yes I have a FX8150 that has 8 cores, not threads, nor hyperthreading, 8 cores. That's why I think I should be able to get more encoding time.

Thanks for the quick responses please keep them coming!

Gavino
12th January 2012, 19:32
I thought i had to set the speed then the cores as stated here (http://forum.doom9.org/showthread.php?t=148782). And why 2, I thought I have to do 5?
The first call to SetMTMode is the one that sets the cores (or more exactly, the number of threads to be used). The mode (the first parameter to SetMTMode) should be set to 5 for AVCSource(), then changed to 2 for the other filters, so your script should look like:
##Setting initial mode, and cores##
SetMTMode(5, 8)

##Source Video##
AVCSource("G:\%PATH%\video.dga")

##Setting mode for filters##
SetMTMode(2)

##Decimate for timecodes##
...

Didée
12th January 2012, 20:15
Don't put a frame decimator in an MT-enabled section. The better case is that it pulls the whole thing down to 1-threaded speed. The worse case is that it creates other, more serious problems.

Taurus
12th January 2012, 20:37
Don't put a frame decimator in an MT-enabled section.
I knew there was something wrong :mad:
Could not get in to my head for this.
Maybe clogged synapses on my side.
But Didée is here for the rescue.

Didée
12th January 2012, 20:41
Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)

Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.

- edit -

Oh, and for a start, try with SetMTmode(5,4) at the beginning. 8 Threads might be too much for MCTD, creating memory problems. 4 threads is much easier to get running.

An IP BreAKDoWN
12th January 2012, 20:46
Don't put a frame decimator in an MT-enabled section. The better case is that it pulls the whole thing down to 1-threaded speed. The worse case is that it creates other, more serious problems.

Makes sense, however I already made the timecodes without the MT. So I deleted it.

Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)

Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.

So this would be my script: (?)
##Setting Memory (HW has 16 GB)##
#SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")

##Setting Speed##
SetMTMode(5)

##Source Video##
AVCSource("G:\%PATH%\video.dga")

##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)

##Some Tweaking##
Spline36Resize(960,720)

##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")

##Setting Cores? I have an 8 core processor##
SetMTMode(2)

##Filtering##
MCTemporalDenoise(settings="low")

An IP BreAKDoWN
12th January 2012, 21:02
I tried using that script and if the setting is on low I can queue it, encoding it now. However when I try to queue the same script with the very high setting on the Temp Denoiser it crashes MeGUI when I try to queue it. I wonder why its doing that.

Taurus
12th January 2012, 21:25
I tried using that script and if the setting is on low I can queue it, encoding it now. However when I try to queue the same script with the very high setting on the Temp Denoiser it crashes MeGUI when I try to queue it. I wonder why its doing that.
Are you sure you are using exactly the plugins Lato mentioned in the readme part of his script?
I dont use MCTemporalDenoise but made a little test with it.
Runs rockstable with a Core2duo. About 10fps at SD content with MT enabled.
No, and I dont use MeGui and would never even bother to try the "very high" settings in MCTemporalDenoise.
Leave some dirt in the movie and enjoy the show :p

An IP BreAKDoWN
12th January 2012, 21:50
Are you sure you are using exactly the plugins Lato mentioned in the readme part of his script?
I dont use MCTemporalDenoise but made a little test with it.
Runs rockstable with a Core2duo. About 10fps at SD content with MT enabled.
No, and I dont use MeGui and would never even bother to try the "very high" settings in MCTemporalDenoise.
Leave some dirt in the movie and enjoy the show :p
I have all the plugins and all the other stuff. Just double checked. However I did get this to queue and encode:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")

##Setting Speed##
SetMTMode(5)

##Source Video##
AVCSource("G:\%PATH%\video.dga")

##Decimate for timecodes##
#Decimate(timecodes="G:\%PATH%\timecodes.txt",
#\vfrstats="G:\%PATH%\timecodes.vfrstats")

##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)

##Some Tweaking##
Spline36Resize(960,720)

##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")

##Setting Cores##
SetMTMode(8)

##Filtering##
MCTemporalDenoise(settings="very high")

but not:

##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")

##Setting Speed##
SetMTMode(5)

##Loading Original Video##
AVCSource("G:\%PATH%\00012.dga")

##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)

##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")

##Setting Cores##
SetMTMode(8)

##Processing Filters##
MCTemporalDenoise(settings="very high")

Only difference is the length of the video. First one is a 23 minute show, other is a 45 second clip. They are untouched from two separate BDs. Could that be the issue?

Didée
12th January 2012, 22:09
I'm too lazy to make a practical test, AVCsource I haven't used in ages (it's depreciated and buggy, use ffmpegsource (from *.mkv, not from *.m2ts) or DGDecodeNV instead), and MCTemporalDenoise I don't use either.

However, now you have this SetMTmode(8) -thing in the script, again. Concentration please, it should be SetMTmode(2).


'Untouched' can be a dangerous word, btw.

Taurus
12th January 2012, 23:23
There is no SetMTMode(8) as far as I remember.
Maybe just read the Avisynth MT doc's...
Edit: Didée was faster

An IP BreAKDoWN
13th January 2012, 00:12
However, now you have this SetMTmode(8) -thing in the script, again. Concentration please, it should be SetMTmode(2).

Ok I misinterpreted the SetMTMode function, I thought the second was to set the number of cores. Major facepalm. And I wouldn't have to claim the number of again if I change it to SetMTmode(2) would I?

Didée
13th January 2012, 00:46
Yes. The number of threads is defined only by the very first call of setmtmode. Later on, you can change the "mode", but not the number of threads.

Example script.


(1) SetMTmode(5,4)
(2) Mpeg2source("source.d2v")
(3) Filter1()
(4) SetMTmode(2)
(5) Filter2()
(6) return(last)


(1) - Define that the script will use 4 threads for mutlithreading. However, don't actually use multithreading now (mode=5), because source filters usually don't like that
(2) - source filter, using only one thread (we're in "mode=5")
(3) - a processing filter, using only one thread (we're still in "mode=5") - perhaps a GPU-assisted filter, these filters don't like multithreading either
(4) - now switch the multithreading on. It will activate mode=2, and (inherently) use 4 threads (as defined in the very 1st call)
(5) - a processing filter, this one now runs in mode=2, using 4 threads
(6) - end of story, erh, script


If in (4) you would write SetMTmode(2,6) (mode=2, threads=6), then it'll switch to mode 2, but still use only 4 threads (as defined at the beginning)

An IP BreAKDoWN
13th January 2012, 01:33
Ok I really appriciate the help guys alot; however I'm still having problems with this. Here is new modified script that should implement all the suggesting everyone's posted. Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")

##Setting Modes And Cores##
#SetMTMode(5,4)

##Loading Original Video##
FFVideoSource("G:\TEST\T1_Video - .mkv", track = -1, cache = true, cachefile = "G:\TEST\T1_Video - .ffindex", fpsnum = -1, fpsden = 1, pp = "", threads = -1, timecodes = "G:\TEST\test timecodes.txt", seekmode = 1, rffmode = 0, width = -1, height = -1, resizer = "BICUBIC", colorspace = "", utf8 = false)

##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)

##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")

##Changing Modes##
SetMTMode(2)

##Processing Filters##
MCTemporalDenoise(settings="very high")

It still crashes MeGUI when I load it into queue (but loads video preview just fine :confused:)

Zep
13th January 2012, 17:02
Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)

Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.

- edit -



really you have had crashes or some other decimate problem?

I always use 3 and never had a problem. Note i only use 3 cause SET said 3 was better and i only use 3 with HIS Builds.
yeah for sure no decimate at level 2. that always is crash for me i just leave it at 3 and it works fine in the SET builds.

Zep
13th January 2012, 17:20
[QUOTE=An IP BreAKDoWN;1551042

I'm going to comment it out and see what will happen. However I have 16 gigs of RAM and when I encode I barely use 20% total (including all other programs and OS). Should I still leave it out?

[/QUOTE]


how much ram you have access to depends on the OS version and avisynth version you have installed and a few other things. IIRC since SET only makes 32 bit builds the most you have access to is 4 gigs on a 64 bit OS. Even less if the "few other things" are not good to go :D

Zep
13th January 2012, 17:23
Ok I really appriciate the help guys alot; however I'm still having problems with this. Here is new modified script that should implement all the suggesting everyone's posted. Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)

##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")

##Setting Modes And Cores##
#SetMTMode(5,4)

##Loading Original Video##
FFVideoSource("G:\TEST\T1_Video - .mkv", track = -1, cache = true, cachefile = "G:\TEST\T1_Video - .ffindex", fpsnum = -1, fpsden = 1, pp = "", threads = -1, timecodes = "G:\TEST\test timecodes.txt", seekmode = 1, rffmode = 0, width = -1, height = -1, resizer = "BICUBIC", colorspace = "", utf8 = false)

##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)

##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")

##Changing Modes##
SetMTMode(2)

##Processing Filters##
MCTemporalDenoise(settings="very high")

It still crashes MeGUI when I load it into queue (but loads video preview just fine :confused:)

because you still have SetMemoryMax(1024) perhaps

Didée
13th January 2012, 17:40
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.

No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?

An IP BreAKDoWN
14th January 2012, 07:38
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.

No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?

Oh ha, that was an old test one. I don't have it commented out now. But I'll post there thanks.

Zep
14th January 2012, 16:57
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.

No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?

haha yeah i didn't notice he commented the MT out. proof that just quickly glancing at code is a bad mojo :D

However, my gut says he pasted bad code as there is no way not to notice MT off CPU wise.


UPDATE: it appears my gut was correct :P

nibus
14th February 2012, 14:53
LaTo - is there any advantage to running TTempSmooth inside MCTD rather than separately? I'd like to tweak the lthresh and cthresh parameters.

torwart
17th February 2012, 20:54
People help.

I want to make working this MCtemporal denoise. I have every plugin and avsi in one folder. my script is there too. when i drop in VD ERROR OCCURS!!!!!! /there is no function ff3dfilter/ I have fft3d system 32. everything is ok. all i need is to run that script. what to do????????????????????????

06_taro
17th February 2012, 21:55
Download: MCTDmod_v1.4.20mod4.2.rar (http://www.nmm-hd.org/upload/get~2CjpwHPhJhk/MCTDmod_v1.4.20mod4.2.rar)

Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous versions, find them here (http://j.mp/MF-06_taro) ):
v1.4.20 mod4.2
-- fix documents and code comments of pMode

v1.4.20 mod4.1
-- recalculate motion vectors for the second pass if refine=True
-- recalculate motion masks and motion compensated frames of delta=1 for the second pass properly
-- try to use native MDegrainN when radius > 3, but still keep backward capability with official mvtools2

v1.4.20 mod4
-- rework on pMode's adaptive pre-filter, use [0:255 16:255 75:0 255:0] gradient mask map instead of [0:x bias:255 255:y](x=0 or y=0)

v1.4.20 mod3.8
-- only use the finest hierarchical level for MSuper when capable
-- added "refine" to recalculate super clip for more robust motion estimation
-- added "pMode" to use adaptviely pre-filtered or even range-expanded clip for motion search
-- added negative "sigma" value to use dfttest as a frequency-based adaptive pre-filter
-- separate "limitC" and "limitC2" from "limit" and "limit2" to define different limit value for chroma planes
-- added -2 for limit* to use luma-adaptive auto-limit mode

v1.4.20 mod3.7
-- bug fixes
-- added "ssource" as lsfmod's "source" clip

v1.4.20 mod3.6
-- adjusted merge16_8 usage to latest version of dither package

v1.4.20 mod3.5
-- now accept negative value of post as sigma ( was only used to define whether fixband is used on post-denoise, and must be used with custom "ppnr" )
-- added "useMMask" in MCTD to turn motion mask on/off for sharpen/stabilize/enhance

v1.4.20 mod3.4
-- fully supported Y/U/V in -65535~5 of MCPP_merge16_8, although MCTD_PP only needs value of 1/3

v1.4.20 mod3.3
-- added "stF" to allow custom stabilizing filter

v1.4.20 mod3.2
-- made lthresh/cthresh changeable

v1.4.20 mod3.1
-- added "useMMask" in MCTD_PP to turn motion mask on/off for sharpen/stabilize/enhance
-- changed the type of "sigma" from int to float

v1.4.20 mod3
-- fixed scene change frames not being filtered correctly with sharp/stabilize/enhance
-- added "pp" in MCTD to turn all post-processing in MCTD_PP off
-- supported stacked 16-bit output for custom "dbF" ( mainly implemented by SAPikachu )

v1.4.20 mod2
-- removed deblock mod16 warnings when deblock=true, pad and crop internally
-- updated Deblock_QED with custom bug fix

v1.4.20 mod
-- added "p1nr", "p2nr", "ppnr", "shF", "aaF", "dbF" to allow custom filters

Requirements pack(packed some days ago, should contained all the plugins/scripts, but I didn't check. MCTD uses some functions in other scripts, and I was not sure if I had splitted all these funcions out):
MCTDmod_Requirements.7z (http://www.nmm-hd.org/upload/get~QWy1xdGiHi0/MCTDmod_Requirements.7z)(edit: Dither package in requirements pack hasn't been updated, you need to manually update it to v1.15.0 or above)

Taurus
17th February 2012, 22:27
I have fft3d system 32. everything is ok

No, you have to put FFTW3.DLL in system32.
fft3dfilter.dll -> avisynth\plugins folder.
Please read the readme's and/or the html:
http://avisynth.org.ru/fft3dfilter/fft3dfilter.html
Good luck.
MCTD is a little bastard, I won't use it:p:D

nibus
18th February 2012, 04:23
MCTD v1.4.20 mod 3.2
Download: MCTDmod_v1.4.20mod3.2.rar (http://www.nmm-hd.org/upload/get~jiGTwAFhlUE/MCTDmod_v1.4.20mod3.2.rar)

Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous version, find it here (http://j.mp/MF-06_taro) ):


Thanks taro, I'll give your mod a shot. :cool:

torwart
18th February 2012, 08:57
Sorry. Ofcourse I have fftw3.dll in system 32 and the fft3dfilter.dll in plugins.........

StainlessS
18th February 2012, 13:10
People help.

I want to make working this MCtemporal denoise. I have every plugin and avsi in one folder. my script is there too. when i drop in VD ERROR OCCURS!!!!!! /there is no function ff3dfilter/ I have fft3d system 32. everything is ok. all i need is to run that script. what to do????????????????????????

FFT3DFilter. (EDIT: If that's not too obvious)

canuckerfan
5th March 2012, 05:44
MCTD v1.4.20 mod 3.3
Download: MCTDmod_v1.4.20mod3.3.rar (http://www.nmm-hd.org/upload/get~o_ydt3aaV00/MCTDmod_v1.4.20mod3.3.rar)

Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous version, find it here (http://j.mp/MF-06_taro) ):


Requirements pack(packed some days ago, should contained all the plugins/scripts, but I didn't check. MCTD uses some functions in other scripts, and I was not sure if I had splitted all these funcions out):
MCTDmod_Requirements.7z (http://www.nmm-hd.org/upload/get~QWy1xdGiHi0/MCTDmod_Requirements.7z)
Those are some interesting modifications. How would I combine MCTDmod with the Dither package to perform post dithering on a clip?

Edit: Can MCTDmod output 16-bit like the modified dfttest can in the dither package?

06_taro
5th March 2012, 07:28
Example:
MCTD(enhance=true, dbF="GradFun3(lsb=true)")

In this way, output is stacked 16-bit.

Actually both stabilize and enhance period accept 16-bit process ( they share the same mask/merge ):
MCTD(stabilize=true, stF="dfttest(lsb=true)",
\ enhance=true, dbF="GradFun3(lsb=true, lsb_in=true)")

But be careful that if stabilize period outputs 16-bit clip, enhance filter should be able to accept 16-bit input.

And you can use MCTD(enhance=true, dbF="""dfttest(lsb=true).GradFun3(lsb=true, lsb_in=true)""") to do the same thing.

lansing
26th March 2012, 19:50
can MCTD be multithreaded? I'm currently trying to run it on my 100 minutes bluray anime movie, and it's going to take like 30 hours on my AMD 4 core, while only with 35% cpu usage. Is there a way to utilize all the cores?

rm2kpro
28th June 2012, 04:33
I am also interested in running MCTDMod with multiple threads. Can someone share their experience?

Yellow_
28th June 2012, 13:43
I'm running MCTD mod16 version with 2.58 32bit Avisynth vanilla on a dual Xeons with 2GB RAM (2 sticks are stuffed) on 64bit Linux via Wine and get 85% CPU usage on both processors and both virtual processors.

Not sure if that helps but I had thought on Windows you'd get all cores being used even with non MT version.

rm2kpro
28th June 2012, 23:39
I'm on 64-bit Windows 8. Vanilla 32-bit Avisynth 2.6 did not make MTCDmod use all my cores.

I later installed Avisynth 2.6 MT 2012.05.16 (http://forum.doom9.org/showthread.php?t=148782) and used Setmtmode(2). It works problem-free while using all my cores and providing a very nice speedup. That was simpler than I thought.

Though pipeling to x264 64-bit does no longer work. I have to use x264 32-bit instead.

Edit: I did one step too much. Just using Avisynth 2.6 MT is enough. Setmtmode is apparently not needed when the filters have built-in threading.

Now, pipelining works again.

lauguru
30th August 2012, 21:57
hello
someone could tell me, how to use the avs denoise filter and grain reduction.
Commands that must be put? in bdrebuilder

http://subir.cc/images/sinttugog.jpg

To do this:

http://latoninf.free.fr/d9/MCTD/300_0SRC.png http://latoninf.free.fr/d9/MCTD/300_3MCTDveryhigh.png


Required Filters:
http://avisynth.org/mediawiki/MCTemporalDenoise

Note: You do not necessarily need all of these filters for this script to function for you. There are special modes that enable the use of specific filters at specific times, but these are only used when necessary. Just to be safe, make sure you have all of the filters listed below in you "Plugins" folder.
MVTools (v2.5.10) http://avisynth.org.ru/mvtools/mvtools2.html#download
MaskTools (v2.0a43) http://manao4.free.fr/masktools-v2.0a48.zip
LSFmod (v1.9) http://avisynth.org/mediawiki/LSFmod
FFT3Dgpu (v0.8.2.7) or FFT3Dfilter (v2.1.1) http://avisynth.org.ru/fft3dfilter/fft3dfilter.html
TTempsmooth (v0.9.4) http://avisynth.org.ru/docs/english/externalfilters/ttempSmooth.htm
RemoveGrain + Repair (v1.0PR) http://home.arcor.de/kassandro/prerelease/RemoveGrain-1.0.rar
Deblock (v1.2) http://avisynth.org/mediawiki/DeBlock
Deblock_QED (25.may.2010) http://avisynth.org/mediawiki/Deblock_QED
DctFilter (v0.0.1.4) http://avisynth.org/mediawiki/DCTFilter
EEDI2 (v0.9.2) http://web.missouri.edu/~kes25c/EEDI2v092.zip
SangNom (v1.0beta) http://avisynth.org/mediawiki/SangNom
GradFun2DBmod (v1.5) http://avisynth.org/mediawiki/GradFun2DBmod
GradFun2db (v1.0) http://forum.doom9.org/showthread.php?t=108681
AddGrainC (v1.5) http://forum.doom9.org/showthread.php?t=111849


All-in-one installer beta: http://www.sendspace.com/file/1gggec





Thanks in advance for the help

zerowalker
2nd September 2012, 10:34
I get error about "ssource" with MCTD, it doesn´t know what it is:(

zerowalker
8th September 2012, 20:21
can´t anyone help me get MCTDmod to work please;S?
I don´t know what to do:(

I only get the error that it doesn´t know the command "ssource"

cobo
9th September 2012, 01:59
Look and find where in your script that "source" is mis-spelled as "ssource" and correct it by deleting the extra "s".

lauguru
9th September 2012, 09:21
could put a complete example of how to write the script, to remove grain?
I do not always load them I get error.

MCTemporalDenoise(settings="very high") ???

zerowalker
9th September 2012, 11:44
I don´t think, source is misspelled, it´s in the code of MCTD, something with lsfmod (i got that plugin;S).

I don´t know what to do, i downloaded the MCTD along with the requirements.

x265
6th February 2013, 18:35
is it safe to use settings="high" for animated DVD Footage?
Screenshot:
http://img687.imageshack.us/img687/3527/newfile016458.png

http://img40.imageshack.us/img40/2209/newfile007745ca.png

sinz718
12th February 2013, 01:43
If you don't mind detail loss sure it's fine.
If you want to remove only the noise you have to use specific settings.
^which would mean learn about the whole filter and what each settings do, I.E. trial and error.
Best with trial and error, also each script that works for one animated source WILL most likely NOT work with another.

x265
12th February 2013, 09:14
Won't there be anymore updates for this filter?

Mystery Keeper
12th February 2013, 14:32
Won't there be anymore updates for this filter?What kind of update do you need?

Poutnik
13th February 2013, 08:16
Won't there be anymore updates for this filter?

Sometimes there are no updates, as it is considered there is no need for updates. Solution has reached mature phase and the author is focusing to other things.

I agree some users can perceive it as possibly bad thing, like what if it is abandoned ?

Tempter57
14th February 2013, 10:43
Won't there be anymore updates for this filter?
MCTDmod_v1.4.20mod4.2 (http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=475)

tartak
14th April 2013, 07:35
What kind of update do you need?
A real update would be to make MCTD compatible with avisynth 2.6, all the planar formats. It would work then with YUY2, which would be great for squeezing the maximum information from all those NTSC DV tapes (alas, we need to downsample 4:1:1 to YV12 now)

Mystery Keeper
14th April 2013, 10:41
A real update would be to make MCTD compatible with avisynth 2.6, all the planar formats. It would work then with YUY2, which would be great for squeezing the maximum information from all those NTSC DV tapes (alas, we need to downsample 4:1:1 to YV12 now)'Tis not up to the script at all. The plugins it uses are what need to be updated.

tartak
14th April 2013, 17:04
'Tis not up to the script at all. The plugins it uses are what need to be updated.
Many of the key plugins are fine already. MVTools, MaskTools, RemoveGrain/Repair, deblock, eedi, fft3d, GradFun2db... And some are probably fine with YUY2 at least.

The script could sure do a few things on its own with Planar2Interleaved/Interleaved2Planar funcs, like in QTGMC. Say, scripts Deblock_QED and GradFun2DBmod look like they can be updated that way. Not sure about LSFmod. Updating the rest of the plugins is a lot of work, perhaps they could be replaced with something similar?

TankTreads
16th June 2013, 17:27
May someone please do me a favor and incorporate MP_Pipeline (http://forum.doom9.org/showthread.php?t=163281) into the latest MCTDmod?

I am bottlenecking on a single core; MT() looks bad in high motion scenes, and I cannot guarantee that the individual strips are MOD4; I could never get setMTmode() to work on any reasonable setting I use. MP_pipeline is pretty stable, and I'm already using it. I would incorporate it directly into MCTDmod, but it's just too much code.

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.

Khun_Doug
12th May 2018, 19:00
Here is the entire piece of code that is faulting. I will highlight the two areas that fail.

Sclp = (sharp == true) ? (shF!="internal") ? Eval("smE."+shF) :
\ IsBool(ssource) ? ssource ? smE.LSFmod(strength=strength,Smode=SHmode,Smethod=SHmethod,Lmode=0,overshoot=Sovershoot,preblur="ON",secure=true,edgemode=0,soft=0,soothe=false,ss_x=1.00,ss_y=1.00,source=i)
\ : smE.LSFmod(strength=strength,Smode=SHmode,Smethod=SHmethod,Lmode=Slimit,overshoot=Sovershoot,preblur="ON",secure=true,edgemode=0,soft=0,soothe=false,ss_x=1.00,ss_y=1.00) :
\ IsClip(ssource) ? smE.LSFmod(strength=strength,Smode=SHmode,Smethod=SHmethod,Lmode=0,overshoot=Sovershoot,preblur="ON",secure=true,edgemode=0,soft=0,soothe=false,ss_x=1.00,ss_y=1.00,source=ssource) :
\ Assert(False, "MCTD: ssource should be bool or clip!")
\ : NOP()
Tmax = (sharp == true) ? i.mt_logic(f1c,"max",U=1,V=1).mt_logic(b1c,"max",U=1,V=1) : NOP()
Tmin = (sharp == true) ? i.mt_logic(f1c,"min",U=1,V=1).mt_logic(b1c,"min",U=1,V=1) : NOP()

shrp = (sharp==false) ? smE
\ : (Tlimit==true) ? Sclp.mt_clamp(Tmax, Tmin, Tovershoot, Tovershoot, U=1, V=1) <=== fails if sharp=true AND tlimit=true
\ : Sclp

sL = (sharp==true&&adapt==true) ? useMMask ? mt_merge(smE,shrp,mL,U=chr21,V=chr21)
\ : mt_merge(smE,shrp,mR,U=chr21,V=chr21) <=== sharp=true AND tlimit=false
\ : shrp.mergechroma(smE)

If sharp=false and tlimit=true the filter works, but presumably is not sharpening. The defaults are for both sharp and tlimit to be true.
My script that calls the filter is as follows:

LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
FFVideoSource(source="D:\Doug\Videos\DVD\FRANKENSTEIN\VTS_01_1.VOB")
ConvertToYV12() <=== Added as a suggestion. Makes no difference to the outcome.
Spline36Resize(640,480)
Tweak(sat=1.06,cont=1.06,bright=1)
MCTD (sharp=false) <==== This works

MCTD ()
script error: invalid arguments to function 'mt_clamp'

MCTD(sharp=true,tlimit=false)
script error: invalid arguments to function 'mt_merge'

Khun_Doug
12th May 2018, 19:39
I think you are on to something with the parameter/syntax. I grabbed the version from the Wiki and added your two lines at the end. Just colorbars and a call the function and voila, THE SAME ERROR! That leads me to believe the version of masktools2 has parameter or syntax difference than what the filter expects.

Using MCTD(sharp=true,tlimit=false) with the colorbars the error changes to invalid arguments to function 'mt_merge'.

I tried using the older masktools, not masktools2 and the same error.

I have the output from avsmeter -avsinfo that I can post if anyone believes that will be helpful.

StainlessS
12th May 2018, 20:17
I've now tried all three versions that I could find,
LaTo v1.4.20,
taro mod_4.2
AmjadSONY mod_4.3 (at bottom of this page http://avisynth.nl/index.php/MCTemporalDenoise )

No problems with any of them.

EDIT: Avsmeter log might be useful.

Khun_Doug
12th May 2018, 20:38
Keep in mind that I tested LimitedSharpenFaster, that uses mt_clamp, and the filter runs. Other filters that use these same plugins also work correctly.

Here is the avsmeter output:

C:\TEMP>avsmeter -avsinfo

AVSMeter 2.7.5 (x86) - Copyright (c) 2012-2017, Groucho2004

VersionString: AviSynth+ 0.1 (r2664, MT, i386)
VersionNumber: 2.60
File / Product version: 0.1.0.0 / 0.1.0.0
Interface Version: 6
Multi-threading support: Yes
Avisynth.dll location: C:\WINDOWS\SysWOW64\avisynth.dll
Avisynth.dll time stamp: 2018-03-29, 01:04:18 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth 2.5\plugins
PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+


[CPP 2.5 Plugins (32 Bit)]
C:\Program Files (x86)\AviSynth 2.5\plugins\AddGrainC.dll [1.7.1.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\deblock.dll [1.2.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb.dll [2013-02-26]
C:\Program Files (x86)\AviSynth 2.5\plugins\EEDI2.dll [0.9.2.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\flash3kyuu_deband.dll [2015-05-02]
C:\Program Files (x86)\AviSynth 2.5\plugins\FluxSmooth.dll [2006-11-09]
C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll [2018-05-11]
C:\Program Files (x86)\AviSynth 2.5\plugins\LSMASHSource.dll [2017-02-25]
C:\Program Files (x86)\AviSynth 2.5\plugins\MaskTools.dll [1.5.1.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-25.dll [2.0.48.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-26.dll [2.0.48.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\SangNom.dll [2004-01-18]
C:\Program Files (x86)\AviSynth 2.5\plugins\SSIM.dll [0.25.1.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\TDeint.dll [1.1.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\TTempSmooth.dll [0.9.4.0]

[CPP 2.6 Plugins (32 Bit)]
C:\Program Files (x86)\AviSynth 2.5\plugins\AutoAdjust.dll [2.6.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\DCTFilter.dll [0.5.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\DCTFilter_avx2.dll [0.5.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\DePan.dll [2.13.1.3]
C:\Program Files (x86)\AviSynth 2.5\plugins\DePanEstimate.dll [2.10.0.2]
C:\Program Files (x86)\AviSynth 2.5\plugins\DirectShowSource.dll [2.6.0.3]
C:\Program Files (x86)\AviSynth 2.5\plugins\eedi3.dll [0.9.2.1]
C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll [2016-12-29]
C:\Program Files (x86)\AviSynth 2.5\plugins\fft3dfilter.dll [2.4.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\masktools2.dll [2.2.14.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\msharpen.dll [2017-12-03]
C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2.dll [2.7.25.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\nnedi3.dll [0.9.4.33]
C:\Program Files (x86)\AviSynth 2.5\plugins\RgTools.dll [0.96.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\SangNom2.dll [2018-05-11]
C:\Program Files (x86)\AviSynth 2.5\plugins\TCPDeliver.dll [2.6.0.7]
C:\Program Files (x86)\AviSynth 2.5\plugins\yadifmod2.dll [2017-12-16]
C:\Program Files (x86)\AviSynth 2.5\plugins\yadifmod2_avx2.dll [2017-12-16]
C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll [2018-03-29]
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll [2018-03-29]
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll [2018-03-29]
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll [2018-03-29]
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll [2018-03-29]
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll [2018-03-29]

[Scripts (AVSI)]
C:\Program Files (x86)\AviSynth 2.5\plugins\colors_rgb.avsi [2015-03-30]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.avsi [2016-07-05]

[Uncategorized DLLs (32 Bit)]
C:\Program Files (x86)\AviSynth 2.5\plugins\avcodec-57.dll [57.81.100.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avformat-57.dll [57.66.102.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avresample-3.dll [3.2.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avutil-55.dll [55.47.100.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3-3.dll [2016-07-30]
C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3f-3.dll [2016-07-30]
C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3l-3.dll [2016-07-30]
C:\Program Files (x86)\AviSynth 2.5\plugins\swscale-4.dll [4.3.101.0]

[Uncategorized files]
C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.lib [2016-12-29]
C:\Program Files (x86)\AviSynth 2.5\plugins\ffmsindex.exe [2016-12-29]
C:\Program Files (x86)\AviSynth 2.5\plugins\masktools2.dll-old [2.2.10.0]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.txt [2016-07-05]

C:\TEMP>

StainlessS
12th May 2018, 21:25
[CPP 2.5 Plugins (32 Bit)]
C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-25.dll [2.0.48.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-26.dll [2.0.48.0] # Wrongly labelled, same as above

[Uncategorized DLLs (32 Bit)] # All Rubbish
C:\Program Files (x86)\AviSynth 2.5\plugins\avcodec-57.dll [57.81.100.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avformat-57.dll [57.66.102.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avresample-3.dll [3.2.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\avutil-55.dll [55.47.100.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3-3.dll [2016-07-30]

# this one usually in system32/SysWOW64 for dfttest (also same file renamed as fftw3.dll for FFT3DFilter)
C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3f-3.dll [2016-07-30]

C:\Program Files (x86)\AviSynth 2.5\plugins\libfftw3l-3.dll [2016-07-30]
C:\Program Files (x86)\AviSynth 2.5\plugins\swscale-4.dll [4.3.101.0]


[Uncategorized files] # Rubbish
C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.lib [2016-12-29]
C:\Program Files (x86)\AviSynth 2.5\plugins\ffmsindex.exe [2016-12-29] # For ffms2, but not really needed.
C:\Program Files (x86)\AviSynth 2.5\plugins\masktools2.dll-old [2.2.10.0]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.txt [2016-07-05]

Groucho2004
12th May 2018, 21:40
@Khun_Doug
You have 3 versions of MaskTools2 in your auto-load directory:
mt_masktools-25.dll [2.0.48.0]
mt_masktools-26.dll [2.0.48.0]
masktools2.dll [2.2.14.0]

Hard to say which one is loaded first. Get rid of the mt_* versions and try again. While you're at it, delete the "MaskTools.dll [1.5.1.0]" as well unless you need it.

Edit:
Also, pick just one of these two:
yadifmod2.dll [2017-12-16]
yadifmod2_avx2.dll [2017-12-16]

Khun_Doug
12th May 2018, 21:56
Groucho, you just helped me learn something new. I didn't realize that if the plugin was in the directory it may get loaded. I'm going to clean this up and do more testing.

I am also updating a VMware test box that I can use for testing. I'll get this resolved ... push, pull, or drag!

StainlessS
12th May 2018, 22:39
Also, pick just one of these two:
yadifmod2.dll [2017-12-16]
yadifmod2_avx2.dll [2017-12-16]


And again here

C:\Program Files (x86)\AviSynth 2.5\plugins\DCTFilter.dll [0.5.0.0]
C:\Program Files (x86)\AviSynth 2.5\plugins\DCTFilter_avx2.dll [0.5.0.0]

Khun_Doug
13th May 2018, 06:49
The problem is resolved! Yippee!!

Thanks to everyone that provided some help. A special thanks to StainlessS and Groucho2004. With their help I was able to eliminate several older plugins, and now have a much cleaner report from avsmeter.

For anyone that hits this thread in the future and is having the same problem, the solution is to get the proper version of LSFmod. There is a version "v1.9 - 05 October 2009 Modded Version by LaTo INV." That did NOT work on my install. The version I found that DOES work is "v2.1 - 13 July 2017 another Modded Version by A.SONY." Once that was included and the v1.9 was left out, the script began to work as expected.

The only way I found the solution was to diddle the script. I could see where a variable smE was being referenced and LSFmod was being used on that variable. I stuffed smE in as the paramter to mt_clamp instead of using Sclp, and the script worked. That pointed to something with LSFmod. I looked on Internet and found a newer version than what I had, and that version resolved the problem.

MysteryX
14th May 2018, 03:37
I searched and cannot find such a thing as LSFMod v2.1; and v1.9 does work for me.

I also looked into whether this could work in 16-bit. Changing the validations is easy, there are 2 IsYV12() calls in MCTemporalDenoise and 1 in LSFMod, change them to Is420().

However, it uses a lot of filters and not all support 16-bit. Looking at the list of filters

Supports high-bit-depth

- MVTools: yes
- MaskTools2: yes
- RgTools: yes
- FFT3Dfilter: yes
- AddGrainC: yes (?)

- TTempSmooth: NO
- DeBlock: NO
- DctFilter: NO
- EEDI2: NO
- SangNom: NO
- GradFun2db: NO

There's still a lot of work to do to add high-bit-depth support into existing plugins, and unfortunately there's a big lack of man-power when it comes to developers.

Furthermore, it doesn't work well with MT, it could require extensive testing to figure out which functions need to be configured with which mode.

If I look at debug output, I get this message: "FFT3DFilterMulti: cannot work in reentrant multithread mode!". If I specify a MT mode for FF3DFilter, however, it says "Ignoring unnecessary MT-mode specification for fft3dfilter_FFT3DFilter() by script"

Khun_Doug
14th May 2018, 04:59
Here are the links to the LSFmod 2.1. I'm not sure why LSFmod 1.9 is a no-go on my machine, but tracing the MCTD filter when it crashed helped me isolate the trouble area. This version of LSFmod resolves the problem.

https://forum.doom9.org/showthread.php?t=174752
-and-
https://pastebin.com/NnjaqCa8

I just hit the error "FFT3DFilterMulti: cannot work in reentrant multithread mode!" in my evaluation of the filter, today. What I did that worked was use SetFilterMTMode("MCTD", 4, force=true). Using this I was able to take an SD source and save as an uncompressed AVI without a crash. Possibly a fluke, but I will use that again on another SD source. I'll use a different tool to encode the uncompressed AVI to X265.

Stereodude
14th May 2018, 15:31
I also looked into whether this could work in 16-bit. Changing the validations is easy, there are 2 IsYV12() calls in MCTemporalDenoise and 1 in LSFMod, change them to Is420().

However, it uses a lot of filters and not all support 16-bit. Looking at the list of filters

Supports high-bit-depth

- MVTools: yes
- MaskTools2: yes
- RgTools: yes
- FFT3Dfilter: yes
- AddGrainC: yes (?)

- TTempSmooth: NO
- DeBlock: NO
- DctFilter: NO
- EEDI2: NO
- SangNom: NO
- GradFun2db: NO

There's still a lot of work to do to add high-bit-depth support into existing plugins, and unfortunately there's a big lack of man-power when it comes to developers.
Thanks for your investigation.

MysteryX
14th May 2018, 15:59
I would also note that high-bit-depth would be ESPECIALLY useful for this filter because it runs at the beginning of the script. The slight rounding errors have cascading effects on the rest of the script.

But so far, Pinterf is among the very few porting existing plugins into high-bit-depth. I unfortunately have no knowledge of assembly whatsoever -- and have too many other priorities to start learning that.

poisondeathray
14th May 2018, 16:06
The vapoursynth version works at higher bit depth , could some elements be back ported or at least be a starting point?

Boulder
14th May 2018, 17:50
Why not use the VS + Avisynth combo? Or just VS for videos that require the filter.

MysteryX
28th May 2018, 04:28
The vapoursynth version works at higher bit depth , could some elements be back ported or at least be a starting point?
Was looking into VapourSynth code. SangNomMod only supports 8-bit-depth, so that would make the whole script fail if you're using that. Deblock and DCTFilter do support HBD.

poisondeathray
28th May 2018, 05:26
Was looking into VapourSynth code. SangNomMod only supports 8-bit-depth, so that would make the whole script fail if you're using that. Deblock and DCTFilter do support HBD.

sangnommod is not used in the vpy version

And there are no error messages at , say 10bit or 16bit (Float fails because mvtools super complains)

Let HolyWu know if you find a problem in the havsfunc thread

MysteryX
6th June 2018, 19:41
I have back-ported Deblock from VapourSynth to Avisynth, and Chikuzen had developed a new DCTFilter but the Wiki was outdated. Perhaps some other filters have HBD versions that I'm not aware of.

Supports high-bit-depth

- MVTools: yes
- MaskTools2: yes
- RgTools: yes
- FFT3Dfilter: yes
- AddGrainC: yes (?)
- DeBlock: yes
- DctFilter: yes

- TTempSmooth: NO
- EEDI2: NO
- SangNom: NO -- Note: VapourSynth version doesn't use SangNom
- GradFun2db: NO

VoodooFX
22nd October 2018, 23:57
I accidentally noticed that MCTemporalDenoise() gives random quality results. I'm lost a bit what is going on, anyone can confirm it?
I used latest MeGui to encode (tried VirtualDub but it is random with any avs script I tested).

avs script:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\Test\Test_VTS_01_1.d2v")
Trim(0, 159)
MCTemporalDenoise()

crc of files (above avs encoded few times using same settings):
Test_VTS_01_1_enc-1.mkv AC6B9993
Test_VTS_01_1_enc-2.mkv 8EC5D5ED

For example avs script without MCTemporalDenoise:
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\Test\Test_VTS_01_1.d2v")
Trim(0, 159)
QTGMC( Preset="Medium", InputType=1 )
LSFmod()

crc of files (above avs encoded few times using same settings):
Test_VTS_01_1_enc-1.mkv 75FCDA51
Test_VTS_01_1_enc-2.mkv 75FCDA51

poisondeathray
23rd October 2018, 00:53
crc of files (above avs encoded few times using same settings):
Test_VTS_01_1_enc-1.mkv AC6B9993
Test_VTS_01_1_enc-2.mkv 8EC5D5ED


MCTD has addgrain and gradfun (enhance=true) applied by default ("randomness" from the grain generator)

VoodooFX
23rd October 2018, 16:13
MCTD has addgrain and gradfun (enhance=true) applied by default ("randomness" from the grain generator)

That makes sense now. Thanks for answer.

Stereodude
13th January 2019, 20:09
Where are we at for running MCTD in 64-bits AVS+? I know we don't have >8-bit support yet. :(

MCTD has addgrain and gradfun (enhance=true) applied by default ("randomness" from the grain generator)
Not only that, x264/x265 are not deterministic video encoders with the commonly used options.

poisondeathray
13th January 2019, 23:20
Where are we at for running MCTD in 64-bits AVS+? I know we don't have >8-bit support yet. :(


Four more, see post 720 . MysteryX was having a go at it but got lost in the mountains or something (went on a trip)
https://forum.doom9.org/showpost.php?p=1843774&postcount=719



Not only that, x264/x265 are not deterministic video encoders with the commonly used options.

Are you sure ? --non-deterministic is disabled by default, and the previous poster got crc check match without mctd a few times, but no match with mctd

A quick test with default encoding settings looks ok too
[Parsed_psnr_2 @ 000000d202242000] PSNR y:inf u:inf v:inf average:inf min:inf max:inf

Stereodude
14th January 2019, 00:13
Four more, see post 720 . MysteryX was having a go at it but got lost in the mountains or something (went on a trip)
https://forum.doom9.org/showpost.php?p=1843774&postcount=719
I thought he was speaking to >8bit color depth support, not 64-bit support.

Are you sure ? --non-deterministic is disabled by default, and the previous poster got crc check match without mctd a few times, but no match with mctd

A quick test with default encoding settings looks ok too
[Parsed_psnr_2 @ 000000d202242000] PSNR y:inf u:inf v:inf average:inf min:inf max:inf
AFAIK, using VBV makes them non-deterministic. Aren't those enabled and enforced by default per the level you select?

poisondeathray
14th January 2019, 00:31
I thought he was speaking to >8bit color depth support, not 64-bit support.



Sorry I misread

It works fine in avisynth+ x64 MT for 8bit right now



AFAIK, using VBV makes them non-deterministic. Aren't those enabled and enforced by default per the level you select?

I don't know what the current status is .

At one point --level didn't enforce anything and was just a "label." That might have changed

A quick test with --vbv-maxrate and --vbv-bufsize specified shows the same per frame PSNR wise - but it might not have been long enough, or diverse enough test

Stereodude
31st March 2020, 13:51
Where are we at for running MCTD in 64-bits AVS+? I know we don't have >8-bit support yet. :(
So i decided to try getting MCTD to work in x64 again the other day (no MT). It was quite easy to get working. I tried it once before some years ago and found it finicky and unstable, but there seems to be no issues thanks to all of pinterf's work on mvtools and the other key components. Clearly I should have taken poisondeathray's report above and tried it a year ago. It is a little faster too.

I still wish for >8-bit support though.

Stereodude
6th April 2020, 03:17
Updated the script to use SangNom2 for full x64 support. Also updated the filter dependency list to the latest filters.

Edit: Note that SangNom2 requires AviSynth 2.6 Alpha4 (or later) or Avisynth+.

Stereodude
10th April 2020, 17:45
Updated to v1.4.22x (x for experimental)

Changes:
Uses NeoFFT3D (https://github.com/HomeOfAviSynthPlusEvolution/neo_FFT3D) instead of FFT3dFilter
YUY2 support is removed
ncpu parameter is removed
~10% faster on preset low for HD material [1920 wide]
~20% faster on preset medium (and higher) for HD material [1920 wide]

Edit: pastebin with the script: https://pastebin.com/ZtL3ZcM3

StainlessS
11th April 2020, 01:04
If you are gonna remove functionality, maybe also a name change is prudent (as MeteorRain did for the FF3DFilter/NeoFFT3D),
Maybe McTemporalDenoiseNeo(). If it makes sense for the dll, why would it make less sense for a script function which is similarly enhanced/crippled.

[Either that or continue original support with script work arounds where HBD, call original dll where Neo-dll not available, or where YUY2].

pinterf
11th April 2020, 05:20
What's the point of working with yuy2 instead of converting it to yv16 right after the source filter? Which filters do not know about planar 422?

MeteorRain
11th April 2020, 07:48
Actually, it would just be an extra convert to YV16 and back in order to support YUY2.

And no it doesn't make sense to always support the exact same feature as it was. Plugins and scripts supported YUY2 only because it was a widely used color space back then. There shouldn't be reasons to deliberately use a legacy format at this moment..

pinterf
11th April 2020, 08:08
Yep, I do it at some filters. No special code for yuy2 inside but convert to and from yv16 on the fly. Same can apply on packed rgb formats

StainlessS
11th April 2020, 08:35
Actually, it would just be an extra convert to YV16 and back in order to support YUY2.
I would have no probem with that [EDIT: so long as conversion is lossless].

It's just that I like if script can adjust to whatever is thrown at it, where automatic handling can remove human intervention,
and if it can be done relatively easily, then why not.
The only colorspace that I really have no probs avoiding is YV411 [and dont even go anywhere near YV410, that aint nice
EDIT: 3x3 luma for single chroma UV pair, think its called YV410].

pinterf
11th April 2020, 08:42
On the other hand, if yuy2 support is still allowed, users won't bother with removing it, resulting in huge complex scripts full with IsYUY2? : constructs. And a small speed penalty.

StainlessS
11th April 2020, 08:47
users won't bother with removing it
Well then that is down to user, and they have to pay penalty for it, but should it throw error, me would say not.
I might feel different if there was a non lossless colorspace change involved.
[EDIT: My time is more valuable to me than the computers run time, others may disagree.]

EDIT: "just do what I say and dont give me any lip !" [ my command to script, not to Pinterf :) ]

EDIT: For non native English speakers
“Don't give me any lip” would be something said by someone who received an impudent, insolent, and impertinent reply.
They perceived that they were addressed in a very disrespectful or cheeky manner.
Typically, “don't give me any lip” is spoken by an adult to someone younger, often parents to their children.

EDIT:
resulting in huge complex scripts full with IsYUY2? : constructs. And a small speed penalty.
Assuming that we are not in runtime environment eg scriptclip, then any IsYUY2 would only execute during graph building stage anyway [maybe 50us]
with only any ConvertToYV16 [and back again] embedded in the filter graph, whereas if user converted to YV16 before calling script function,
then same converToYV16 [and maybe back] would be called outside of script, no great difference really except in human intervention time.
If input colorspace is already YV16, then the IsYUY2 stuff is pretty much irrelevant, unless in runtime environment, eg scriptclip.
Of course it would be best if input is already YV16, but aint nuttin' wrong with having a safety value to stop it exploding.

tormento
11th April 2020, 09:28
Just to satisfy my curiosity: what is the speed advantage to create its own dll instead of avsi?

I mean, how much is the penalty between avisynth interpreting a script and instead executing a dll?

StainlessS
11th April 2020, 09:42
In the main, avisynth script is only used to 'stitch' filters [dll or in-built] together, once frame serving starts no huge great difference
unless using runtime environment somewhere [eg Scriptclip], implementing any runtime environment script as dll filter would/might make a big-ish difference though.

My first attempts at RgbAmplifier() script function [for user Forensic], was real slow [cant remember how slow, something like 15 secs per frame],
conversion to dll where method a near copy of script function [with a few shortcuts] was I think about 76,000 times faster.
Most Scriptclip functions would NOT exhibit that kind of improvement, that script function manipulated R, G, & B components for each individual pixel.

RgbAmplifier:- https://forum.doom9.org/showthread.php?t=168293

EDIT: Another script functions, S_ExLogo(), simply stitches together a few Crop(), BilinearResize(), StackVertical(), StackHorizontal(), and Layer() filters together,
and that goes like the clappers [FAST, does not use runtime environment], and doing same as dll would not make any vast improvement to speed [maybe none worth mention].

tormento
11th April 2020, 10:20
In the main
:thanks:

So MCTemporalDenoise is a good candidate. xD

StainlessS
11th April 2020, 11:21
Probably not, also dont think anybody would want to take that on as a task.
I've never actually used McTemporalDenoise, just took a little look at it and there is a lot of it, but again just seems to stitch together a load of filters.
Something like sRestore might benefit (I think that uses scriptclip or some other runtime filter, not sure), but again dont think anybody would want to do it.
(and more difficult to modify CPP, also not good if any non built-in filters used, cannot rely on external dll filter being correct version etc)

Stereodude
11th April 2020, 15:36
If you are gonna remove functionality, maybe also a name change is prudent (as MeteorRain did for the FF3DFilter/NeoFFT3D),
Maybe McTemporalDenoiseNeo(). If it makes sense for the dll, why would it make less sense for a script function which is similarly enhanced/crippled.

[Either that or continue original support with script work arounds where HBD, call original dll where Neo-dll not available, or where YUY2].
Well, it is listed as "experimental". Currently if someone wants the extra speed from using NeoFFT3D they can't use YUY2 because NeoFFT3D doesn't support it. I'm sure there's any number of solutions ranging from the script changing YUY2 input to YV16, forking the script, etc. Which one is the right one, I'm not sure. I have no idea if most of the filters used by MCTD support YV16.

FWIW, I wasn't intending to become the maintainer/developer of MCTD. I just made a few easy changes to something that's about a decade old (and still the best Avisynth NR plugin I know of).

StainlessS
11th April 2020, 17:16
Maybe I should give it a try, when I see that many parameters, I just think, "Not today Josephine".
I also dont often use QTGMC, seems to use way too much noise reduction or something [by default],
I'de rather use my own NR which inevitably would be McDegrainSharp(), use it for nearly everything.
(Somebody else recently made the QTGMC default noise observation, and that is exactly why I'm not overjoyed by it).
EDIT: I dont think you can switch OFF noise reduction altogether in QTGMC, thats what I would prefer.

I wasn't intending to become the maintainer/developer of MCTD.
Tag, you're 'it'!

https://thegrammarexchange.infopop.cc/topic/tag-you-re-it

tormento
11th April 2020, 17:18
Maybe I should give it a try, when I see that many parameters, I just think, "Not today Josephine".
The same reason for me to use SMDegrain almost every time but a few really peculiar situations.

StainlessS
11th April 2020, 17:25
Thats another one that I know is used by many, and I have yet to try it.
(I recently download both scripts and will try them one day).

Boulder
11th April 2020, 18:58
EDIT: I dont think you can switch OFF noise reduction altogether in QTGMC, thats what I would prefer.

I've been using QTGMC parameters SourceMatch=2, Lossless=2, EZKeepGrain=0.4, Sharpness=0.1 and tr2=0 for years. I think the result looks pretty much non-denoised, got those other parameters except tr2=0 from the author himself so I think they are as good as it gets.

real.finder
11th April 2020, 20:53
I'm sure there's any number of solutions ranging from the script changing YUY2 input to YV16, forking the script, etc. Which one is the right one, I'm not sure. I have no idea if most of the filters used by MCTD support YV16.


that is the problem, some developers remove the YUY2 from plugins then scripts that use that plugin was made with YUY2 in mind will not able to use YUY2 after update, and not all other filters work with YV16 so it's now only YV12 script filter :)

that why I did some edits for these cases in SMDegrain and QTGMC back then, nowadays SMDegrain can work with all avs+ colors (Except motion analyzing with float clip) but QTGMC still not yet

StainlessS
11th April 2020, 21:36
Cheers Boulder, I'm taking note of that and gonna try it out with those args. :)

EDIT:
real.finder, good post, you nail'd it dead.

real.finder
18th April 2020, 22:17
Stereodude

since you start work on this, will you keep going? I think you can even add basic HBD if you tried (of course not for all setings since not all dlls work with HBD yet)

if you already stopped maybe I will do it myself

StainlessS
19th April 2020, 08:34
I've been using QTGMC parameters SourceMatch=2, Lossless=2, EZKeepGrain=0.4, Sharpness=0.1 and tr2=0 for years. I think the result looks pretty much non-denoised, got those other parameters except tr2=0 from the author himself so I think they are as good as it gets.

I tried your posted settings in my (pretty much standard) script, and am probably as happy as I'm ever gonna be, so thanks for the nudge, working well. :thanks:

EDIT: I also added NoisePreset="Faster" ("Faster" by Default but changeable, your args are fixed although I might try change to Sharpness=0.0, I do my own sharp thingy later).

tormento
19th April 2020, 09:17
I tried your posted settings in my (pretty much standard) script, and am probably as happy as I'm ever gonna be, so thanks for the nudge, working well.
I always wondered myself why QTGMC has a denoise part or, at least, it's not possible to disable it at all. There are much better scripts out there to do that filthy job. :p

hello_hello
19th April 2020, 17:12
tormento,
The old help file says QTGMC naturally denoises due to multiple temporal smooths. The way I read it, QTGMC needs to identify the noise and then restore it after de-interlacing.

It appears if you want to retain some noise, which personally I rarely do, you need to use a setting such as EZKeepGrain to put it back. The help file says Lossless=1 restores the exact source pixels to the output (I assume that refers to the original scan-lines) but may result in artefacts. Lossless=2 makes the output lossless before the final sharpening and temporal smooth.

SourceMatch seems to be a way to retain detail without actually being lossless, although the help file says it can also faithfully reproduce artefacts such as blocking and banding, with higher modes being sensitive to noise, and could possibly cause occasional aliasing. It does mention that SourceMatch can reduce haloing, which I'd forgotten about, so I might try it myself as QTGMC does tend to enhance existing halos with the default settings.

It seems noise can only get in the way of de-interlacing. If QTGMC didn't deal with it in some way it'd probably look more like Yadif.

In QTGMC's denoising defence, I dug out an old torture test clip and ran some comparison denoising encodes. It's nothing definitive, because I didn't play around with settings much, but they're all denoisers I'd use. Even though the source is progressive (I assume it was originally progressive as outdoor scenes were generally shot on film), and looks like it might have been unnecessarily de-interlaced, that probably also makes it an example of the shimmering and aliasing that would result if you de-interlaced without denoising a noisy clip first. QTGMC does the best job of settling that down, and I had to use MCTD's highest settings for it to compete, although QTGMC can sometimes produce artefacts other denoisers don't. Whatever works for a source.

Denoising Comparisons.zip (https://files.videohelp.com/u/210984/Denoising%20Comparisons.zip) (58MB)

Stereodude
20th April 2020, 04:19
Stereodude

since you start work on this, will you keep going? I think you can even add basic HBD if you tried (of course not for all setings since not all dlls work with HBD yet)

if you already stopped maybe I will do it myself
At this point in time I wasn't planning on tackling that.

tormento
20th April 2020, 09:14
The way I read it, QTGMC needs to identify the noise and then restore it after de-interlacing.
I call it a loss of time, with all the due respect for the author. That's why I never used that filter and I content myself with DGSource native deinterlace.

hello_hello
20th April 2020, 11:00
I call it a loss of time, with all the due respect for the author. That's why I never used that filter and I content myself with DGSource native deinterlace.

You could apply the same logic to any denoiser slower than Undot and simply use Undot for all denoising.

tormento
20th April 2020, 11:03
You could apply the same logic to any denoiser slower than Undot and simply use Undot for all denoising.



Nope, I apply the logic to what it should be a deinterlacer and instead manage noise too.

hello_hello
20th April 2020, 12:59
Nope, I apply the logic to what it should be a deinterlacer and instead manage noise too.

That'd be fine if noise can't interfere with de-interlacing.

Thinking about it, I don't know how to de-interlace with DGSource. Are you referring to FieldDeinterlace? Can you bob-de-interlace to 50/59.94fps that way?

In my opinion, it's really source dependant like every other type of filtering. The harder something is to de-interlace well, and the noisier it is, the better QTGMC compares to other de-interlacers if you let it denoise too. Better to fix the problems while de-interlacing than fix newly created ones after de-interlacing.
If the source is nice and clean you can often get away with simpler de-interlacing methods, although in my opinion QTGMC pretty much always does a better job. And for many de-interlacing methods, you can specify a de-interlaced clip from which to take de-interlaced frames or pixels rather than the de-interlacer doing the de-interlacing itself. Using a clip de-interlaced by QTGMC can sometimes be the best of both worlds, especially if the de-interlacer only takes pixels from the second clip where it detects combing, leaving the rest of the picture untouched.

Here's an example where the SourceMatch and Lossless options for QTGMC aren't a good thing. There's a link to the source. I'd be interested to learn how to de-interlace and denoise it in two steps and arrive at a similar result to QTGMC.

De-interlacing methods compared:

FieldDeinterlace()
QTGMC(EZDenoise=2.5)
QTGMC(FPSDivisor=2, SourceMatch=2, Lossless=2, EZKeepGrain=0.4, Sharpness=0.1, tr2=0)
Yadif(Mode=1)
Yadif()

DGDecode_mpeg2source("D:\DVD1_VTS_01_1.d2v")
Trim(5500,5951)
#Deinterlacing Here
CropResize(0,0, 20,2,-20,-2, InDAR=20.0/11.0, ResizeWO=true)
GradFun3()

Deinterlacing.zip (Deinterlacing_2.zip) (76MB)
Source VTS_01_1.ts (https://files.videohelp.com/u/210984/VTS_01_1.ts) (12MB)

videoh
20th April 2020, 13:03
Thinking about it, I don't know how to de-interlace with DGSource. Are you referring to FieldDeinterlace? Can you bob-de-interlace to 50/59.94fps that way? tormento is talking about the bundled CUDA deinterlacers. Yes, there are bobbers and double-rate modes. Read the documentation!

tormento
20th April 2020, 13:17
That'd be fine if noise can't interfere with de-interlacing.
If the source is interlaced and comes from a pure digital chain, there is no sense in denoise to deinterlace. You will deal with it later.
Thinking about it, I don't know how to de-interlace with DGSource.
Videoh replied for me.:D

hello_hello
20th April 2020, 13:46
If the source is interlaced and comes from a pure digital chain, there is no sense in denoise to deinterlace. You will deal with it later.

There's a qualification you're only just adding. I'm still not sure why a purely digital chain makes a difference though. Is digital noise less likely to interfere with de-interlacing? Is encoder blocking less of a problem when the source is digital?
Chances are a digital source will be cleaner and easier to de-interlace, and as I said previously that means you can sometimes get away with faster de-interlacing, but how does that show it's better to de-interlace and denoise in two steps?

I assume you didn't look at my examples. It's an extreme case, but I'm not sure how it doesn't illustrate my point. I've added the source file to my previous post.

tormento is talking about the bundled CUDA deinterlacers. Yes, there are bobbers and double-rate modes. Read the documentation!

I don't use them, but does that mean the de-interlacing is done by the video card? If so, what sort of quality are we looking at? Yadif type de-interlacing?

tormento
20th April 2020, 13:50
Is digital noise less likely to interfere with de-interlacing?
Explain me how a completely digital chain can introduce noise in an interlaced signal that cannot be removed later. Not artifacts, noise.

Boulder
20th April 2020, 13:54
Explain me how a completely digital chain can introduce noise. Not artifacts, noise.

If you think that digital means no noise at all, I'm afraid you are quite wrong. I've done and seen enough DV material to know that pure digital sources can be quite noisy indeed. Or consider the camera on your phone. It's digital noise you see there in the final result.

tormento
20th April 2020, 13:57
If you think that digital means no noise at all, I'm afraid you are quite wrong.
The only possible noise comes from the video sensor. After signal conversion, no noise is possible anymore. And if the sensor captures interlaced or is treated as interlaced, the noise is digitalized in separate scans, so there is no meaning in denoise it before making the video progressive.

Boulder
20th April 2020, 14:03
The noise is still confusing the motion detection, sometimes quite a lot. The whole idea of QTGMC is that it is a motion compensated deinterlacing method. That is why the denoising part is there.

tormento
20th April 2020, 14:06
The noise is still confusing the motion detection, sometimes quite a lot. The whole idea of QTGMC is that it is a motion compensated deinterlacing method. That is why the denoising part is there.



How a denoise can be effective in motion compensation when you have to predict vectors having only half of the image at a time, with interlaced lines moreover?

hello_hello
20th April 2020, 14:19
Explain me how a completely digital chain can introduce noise in an interlaced signal that cannot be removed later. Not artifacts, noise.

When did we only start talking about purely digital chains?
What difference does it matter if it's interlaced?
If there's noise introduced that can be dealt with after de-interlacing, how is there not noise?
When did artefacts become irrelevant simply because a source is digital?

All your saying is that a digital source will likely be "cleaner" than film or video etc, and therefore it will de-interlace okay using a faster method, which I've acknowledged a few times, but it doesn't explain why de-interlacing and then denoising is necessarily better.

tormento
20th April 2020, 14:25
When did we only start talking about why de-interlacing and then denoising is necessarily better.
Simply because denoising works best on full progressive frames: doing it on separated fields is mathematically inconsistent.

It's like wanting to dig a hole with a rake instead of a shovel.

How can you accurately predict a particle movement having only HALF of the path?

hello_hello
20th April 2020, 14:29
The only possible noise comes from the video sensor. After signal conversion, no noise is possible anymore. And if the sensor captures interlaced or is treated as interlaced, the noise is digitalized in separate scans, so there is no meaning in denoise it before making the video progressive.

That doesn't make sense to me. Deinterlacing is the process of taking fields, captured at different moments in time, and
making them progressive. Even if it's done by interpolating the missing scanlines to produce full frames, how is that not likely to produce a better result for a clean clip than for one with lots of noise? Is the noise not likely to produce shimmering or aliasing etc, or does the noise in film or video have different properties to digital noise?

"Digital" probably means "less noise" but it just means less noisy clips are easier to deinterlace without visible artefacts, not that dealing with the noise at the same time won't still produce a better result.

tormento
20th April 2020, 14:33
That doesn't make sense to me.
How on hell can you effectively denoise a grate of pixels?

Do you have idea of how an intelaced field is made?

You can cleanup the fake frame created by the semifield from whatever noise you have but you are denoising a fake frame, not the picture made by the two semifields together.

Anyway, we are deeply out of topic. I did my tests, you did yours. You have your results, I have mine. Useless to go on.

hello_hello
20th April 2020, 14:38
Simply because denoising works best on full progressive frames: doing it on separated fields is mathematically inconsistent.

It's like wanting to dig a hole with a rake instead of a shovel.

How can you accurately predict a particle movement having only HALF of the path?

Why not denoise the interlaced fields first, then de-interlace? Aren't you dealing with the noise from the top fields independently from the bottom fields before turning them into whole frames? That's the real path.

If I'm digging a hole with a rake instead of a shovel, you're digging a hole with de-interlacing artefacts due to aliasing and shimmering caused by noise, and then hoping removing the noise will fix that too.

Obviously you still haven't looked at my samples, so you're discussing the subject with your fingers in your ears, but how about you upload a sample of noisy interlaced digital video and a sample of how it looks after you've deinterlaced and denoised so we can see the magic properties of digital noise and compare de-interlacing with QTGMC?

tormento
20th April 2020, 14:42
Why not denoise the interlaced fields first, then de-interlace?
Here (http://forum.doom9.net/showthread.php?p=1691569#post1691569)the short answer. Denoising SMEAR and BLUR information between semiframes.

Here (http://vclab.kaist.ac.kr/tip2017/IEEETIP2017_Choi-07990042.pdf) a nice reading about problems with deinterlacing and denoising.

hello_hello
20th April 2020, 14:47
No sample then?

tormento
20th April 2020, 14:51
No sample then?
Here (https://www.mediafire.com/file/ri8pusp1rujqdub/VTS_01_1.mkv/file) a very fast encode. Sorry I am really busy today.

videoh
20th April 2020, 15:04
I don't use them, but does that mean the de-interlacing is done by the video card? Do you even know what CUDA is? One filter invokes the nVidia algorithm; others use my own algorithms implemented in CUDA.

If so, what sort of quality are we looking at? Yadif type de-interlacing? Excellent quality! As good as QTGMC? Of course not, but the focus is on excellent quality at blazing speed. Yes, there is a yadif-like filter. Read the documentation!

Here, I will help you:

DGTelecide() with modes 2 and 3: Adaptive deinterlacing without field matching. FieldDeinterlace-like but not identical. People often overlook these modes thinking it must be just a field matcher with postprocessing.

DGBob(): Yadif-like.

PVBob(): nVidia algorithm.

hello_hello
20th April 2020, 15:19
Here (https://www.mediafire.com/file/ri8pusp1rujqdub/VTS_01_1.mkv/file) a very fast encode. Sorry I am really busy today.

You might need to upload a slower encode later to be in QTGMC's ballpark.
Both encodes upscaled to 1080p by MPC-HC for an easier comparison.

tormento(some settings)

https://i.postimg.cc/kBGG77ZM/tormento.png (https://postimg.cc/kBGG77ZM)

QTGMC(EZDenoise=2.5)

https://i.postimg.cc/w1Wk7xxW/QTGMC.png (https://postimg.cc/w1Wk7xxW)

tormento
20th April 2020, 15:22
Both encodes upscaled to 1080p by MPC-HC

.........

Serious?

hello_hello
20th April 2020, 15:43
.........

Serious?

No, I really upscaled your screenshot with some crappy blurring upscaler while upscaling my screenshot with something sharp.
I'm fairly sure most people would watch the encodes fullscreen. You may do it differently.

Your encode was anamorphic, so it had to be resized anyway. Mine was cropped and resized to 988x572 before encoding (Spline36Resize, which will probably sharpen it a tad). I wasn't going to bother trying to work out how you cropped your encode and run another one to match, so upscaling them both seemed like the fair compromise.

You're welcome to run another encode using your de-interlacing and denoising, while resizing it to match mine if you really think it's going to make it look like it was de-interlaced with QTGMC, restore detail and fix the aliasing. I posted the script I used with the samples I uploaded. The difference in the screenshots is way more than anything upscaling with the same player and resizing method could cause.

Edit: I just noticed QTGMC anti-aliased the black keys on the keyboard at the far side of the stage. Bummer. Nothing's perfect. :)

tormento
20th April 2020, 16:11
No, I really upscaled your screenshot with some crappy blurring upscaler while upscaling my screenshot with something sharp.
MPC is anything but a reliable decoder and there are so many filters you could use to decode the image, not to talk about renderers.
You're welcome to run another encode using your de-interlacing and denoising, while resizing it to match mine
My encode is anamorphic with a SAR of 64:45 because it's the way it's meant to be watched.

hello_hello
20th April 2020, 16:29
MPC is anything but a reliable decoder and there are so many filters you could use to decode the image, not to talk about renderers.

So how does one take a screenshot of video without opening it in a player? If any of those points were relevant, wouldn't they still be relevant if I didn't upscale?
The same renderer was used each time. LAV decoded each time. ffdshow converted the video to RGB each time. MPC-HC used the same upscaling method each time. There was no other filtering.

My encode is anamorphic with a SAR of 64:45 because it's the way it's meant to be watched.

My encode was resized to square pixel dimensions based on a source SAR of 16:11 due to the amount of black down each side (an input DAR of 20:11 rather than 16:9, or 704x576 = 16:9). As a result, I had to tell MPC-HC to stretch your encode to the correct DAR for the screenshot. :)

CropResize tells me the cropping and InDAR specified:

CropResize(0,0, 20,2,-20,-2, InDAR=20.0/11.0, ResizeWO=true)

Resulted in:

Crop(20,2,-20,2)
Spline36Resize(988,572, 0.38,0,-0.38,0)

Using a 16:9 InDAR for CropResize it would have been:

Crop(20,2,-20,2)
Spline36Resize(964,572, 1.09,0,-1.09,0)

None of that has any real relevance to the difference in detail or amount of aliasing between encodes though, but if you think it does, feel free to download my sample and create a more accurate screenshot.

StainlessS
20th April 2020, 16:55
(Spline36Resize, which will probably sharpen it a tad).

You sure bout that HH, twas my understanding that Spline36Resize was neutral, and that Spline64Resize sharpens.

hello_hello
20th April 2020, 17:26
You sure bout that HH, twas my understanding that Spline36Resize was neutral, and that Spline64Resize sharpens.

Everyone wants to argue today. :)

Yes, it does seem to sharpen a little. It's probably close to neutral, but not quite.

All I can tell you is I've compared anamorphic encodes with encodes resized to square pixel dimensions (Spine36Resize), both upscaled to 1080p the same way, and the "square pixel" encodes invariably look a bit sharper.

Here's some screenshots from a long time ago (click on the thumbnails for the full size version). The first two screenshots are encodes upscaled to 1080p using MPC-HC's Bilinear resizing. One was encoded as anamorphic and the other resized to 1024x576 for encoding. The latter definitely looks sharper after upscaling.

The second two screenshots are upscaled with MPC-HC's Bicubic resizing, and once again the square pixel encode looks sharper.

https://forum.videohelp.com/threads/378501-Resolution-Bitrate-and-Quality#post2444902

Maybe it's the two-stage resizing that causes the sharpening. I don't know, but resizing an anamorphic source to square pixels with Spline36Resize will definitely make an encode look sharper when it's running fullscreen. There's been a few times when the source has been over-sharpened out of the box, and I've had to resize to square pixel dimensions with a softer resizer to compensate, especially when my TV is upscaling, as it's upscaling it fairly sharp.

The effect is probably more noticeable when resizing PAL to square pixel dimensions than for NTSC, as there's more resizing involved for PAL.

It probably easy to test by simply opening an anamorphic source in a script and upscaling it this way:

Spline36Resize(1024,576) # Assuming PAL
SomeResizing(1920,1080)

Compared to this way:

SomeResizing(1920,1080)

StainlessS
20th April 2020, 17:46
Everyone wants to argue today

Not arguing, just requesting verification of your statement.
I usually use Spline36 as neutral resize, is there one you recommend as better alternative.

Boulder
20th April 2020, 17:53
Not arguing, just requesting verification of your statement.
I usually use Spline36 as neutral resize, is there one you recommend as better alternative.

Do you need something for cases where you downsize, encode and playback at the original size?

We are so off-topic here :D

StainlessS
20th April 2020, 17:57
Just a general up/down size.

But, what do you think bout MCTemporalDenoise v1,.4.20 Update ? :)

tormento
20th April 2020, 18:00
So how does one take a screenshot of video without opening it in a player?
Personally I use DGIndexNV. You can try AviDemux or VirtualDub2 too.
The same renderer was used each time.
You meant decoder, right? Renderer is the part of the software that create the image on the screen. Which renderer did you use? DX9? DX11? EVR? System default?
My encode was resized to square pixel
The encode should always maximize quality and respect SAR.
on a source SAR of 12:11
You are doing bit of confusion. 16/9 DVDs almost always have SAR of 64:45. The VOB you linked me has a specific SAR of 64:45. You can look at it with FFMpeg.
CropResize tells me the cropping and InDAR specified:
You rely too much on software and too little on knowledge, no offense. Play a bit with FFMpeg, ARS calculator and raw material.

tormento
20th April 2020, 18:01
Everyone wants to argue today.
Nobody wants to argue, just being technically correct.

Did you have the time to read the thread and paper I linked you?

Boulder
20th April 2020, 18:09
But, what do you think bout MCTemporalDenoise v1,.4.20 Update ? :)
It used to be my go-to denoiser at light settings.
Nowadays I have a horrible custom script using stolen ideas off other more capable users.
Just a general up/down size.
Downsizing with Bicubic with an unorthodox combination of b and c is in my toolbox since a long time. I downsize with Bicubic to 720p, 1080p or 1440p and playback at 2160p, so I always do a run with Zopti to try to keep the resizing parameters optimal. They vary quite a lot depending on the source.

hello_hello
20th April 2020, 19:07
Not arguing, just requesting verification of your statement.
I usually use Spline36 as neutral resize, is there one you recommend as better alternative.

I've been playing around, and I'll confess I haven't been able to produce the same sharpening effect today as I have in the past. Take everything I said with a grain of salt and assume the screenshots I linked to were a figment of my imagination. Maybe it depends how sharp the video is to begin with, but at the moment Spline36resize is looking pretty neutral. The source I've been playing with isn't particularly sharp, but I can't produce the same result again. Sigh.....

hello_hello
20th April 2020, 19:36
Personally I use DGIndexNV. You can try AviDemux or VirtualDub2 too.

You meant decoder, right? Renderer is the part of the software that create the image on the screen. Which renderer did you use? DX9? DX11? EVR? System default?

I meant the renderer. WMR9. As I said, LAV was decoding.

MPC-HC is perfectly reliable for comparing video. Here it is displaying the same video 5 times simultaneously. Do they look different?

https://i.postimg.cc/r03SKfxZ/MPC-HC.jpg (https://postimg.cc/r03SKfxZ)

The encode should always maximize quality and respect SAR.

I did respect the original SAR and I cropped and resized accordingly. We just don't agree as to what that SAR should be.
I resize to square pixel dimensions because the USB player built into the TV here assumes all MP4/MKV video is non anamorphic and won't resize anamorphic video correctly.

You are doing bit of confusion. 16/9 DVDs almost always have SAR of 64:45. The VOB you linked me has a specific SAR of 64:45. You can look at it with FFMpeg.

ffmpeg probably defaults to 64:45 just like most other software. It doesn't mean it's correct. It just means the correct SAR isn't ever stored in the DVD video stream.
Most modern DVDs are in fact 64:45, but due to the amount of crud down the sides and the age of the source, I doubt that's one of them. I chose to use the mpeg4 DAR, which is easy to remember and almost identical to the ITU DAR/SAR used for digitising analogue video, which is probably what the source was.
https://forum.doom9.org/showthread.php?p=1058927#post1058927

You rely too much on software and too little on knowledge, no offense. Play a bit with FFMpeg, ARS calculator and raw material.

I was using a function I created for cropping and resizing, while specifying the DAR I wanted to use for the source. The function adjusts the cropping to prevent aspect error based on the input DAR/SAR and resizing, because I was sick to death of having to use a resize calculator to prevent aspect error when resizing.
https://forum.doom9.org/showthread.php?t=176667
You decided the source was 16:9 because you relied on ffmpeg to know the unknowable, while I decided it was 20:11, and I still think that's more likely to be correct.

DAR 16:9 or SAR 64:45, cropped and resized to square pixel dimensions.

https://i.postimg.cc/ykv33sgG/16-9.jpg (https://postimg.cc/ykv33sgG)

DAR 20:11 or SAR 16:11, cropped and resized to square pixel dimensions.

https://i.postimg.cc/G4t8kVvm/20-11.jpg (https://postimg.cc/G4t8kVvm)

hello_hello
20th April 2020, 19:40
Did you have the time to read the thread and paper I linked you?

I've glanced at it but not read it thoroughly yet. I'm not sure it even applies to this discussion.
Plus I'm waiting for a "better than QTGMC" de-interlacing before denoising sample so I know I need to. :)

hello_hello
20th April 2020, 19:50
We are so off-topic here

If a mod comes along, could they please split the non-MCTD discussion off to a new thread?

Probably from somewhere around here.
https://forum.doom9.org/showthread.php?p=1908323#post1908323

poisondeathray
21st April 2020, 01:36
DAR 16:9 or SAR 64:45, cropped and resized to square pixel dimensions.

https://i.postimg.cc/ykv33sgG/16-9.jpg (https://postimg.cc/ykv33sgG)

DAR 20:11 or SAR 16:11, cropped and resized to square pixel dimensions.

https://i.postimg.cc/G4t8kVvm/20-11.jpg (https://postimg.cc/G4t8kVvm)



I'm not a musician, but the drum on the ground (bass drum?) - I think it's usually "circular" .

If you use that as a "circular reference" :D , then that lower image is too wide

tormento
21st April 2020, 09:06
MPC-HC is perfectly reliable for comparing video.
Not true. It can produce multiple times the same image but the image itself is not the correct one for multiple reasons, such as: which hardware you are using to decode, which renderer you are using to show, etc. The only, theoretically correct image, is a software produced one, unless you accept some compromises in chroma, fast decoding routines and so on. The purpose of a player is to keep a constant flow of motion, not to produce the perfect image. The fact itself you consider a player a "perfectly reliable" source speaks for itself.
I did respect the original SAR
Not true. Your screenshots speak for themselves.
ffmpeg probably defaults to 64:45 just like most other software
Errr.... which ones? Moreover FFMpeg has the capability to report the correct SAR for video streams, it doesn't "default" anything. Recently I had to convert some hundreds of DVDs to mkv and every single one had its own SAR, such as 64:45 (the majority), 10:11 and even odder ones. FFmpeg reported each one of them correctly.
It just means the correct SAR isn't ever stored in the DVD video stream.
WTF are you saying? :eek:

Feed ffmpeg.exe -filter:v idet -frames:v 5000 -an -f rawvideo -y null -i with every VOB you have and tell me.
You decided the source was 16:9 because you relied on ffmpeg to know the unknowable, while I decided it was 20:11, and I still think that's more likely to be correct.
Yeah, the oval drum. :rolleyes:

Please don't reply anymore with what you believe, please reply with tecnically consistent proven facts.

P.S: You uploaded jpg images. You know that jpeg is a lossy format, don't you?

Sharc
21st April 2020, 09:39
Errr.... which ones? Moreover FFMpeg has the capability to report the correct SAR for video streams, it doesn't "default" anything. Recently I had to convert some hundreds of DVDs to mkv and every single one had its own SAR, such as 64:45 (the majority), 10:11 and even odder ones. FFmpeg reported each one of them correctly.

WTF are you saying? :eek:

Feed ffmpeg.exe -filter:v idet -frames:v 5000 -an -f rawvideo -y null -i with every VOB you have and tell me.


If I am not mistaken the SAR which ffmpeg reports for DVD VOBs is a calculated value from DAR and frame resolution. DVDs do not specify the PAR (or SAR) in the video stream, only the DAR (4:3, 16:9) and the resolution is given. If the PAR or SAR would be included in the DVD video stream all the past debates about correct resizing (ITU or generic) would become obsolete.

tormento
21st April 2020, 09:43
If I am not mistaken the SAR which ffmpeg reports for DVD VOBs is a calculated value from DAR and frame resolution.
One point more to tell it's NOT a "default" value.

Boulder
21st April 2020, 09:43
tormento, this whole thing of denoising is clearly a matter of opinion, as always, but I still need to ask one question.
Why are you so concerned what comes to denoising as part of the internal operating process of QTGMC? It was already like that in the original script (TempGaussMC_beta2), as a method to calm the bobbed result.
As far as I know, you do like denoised results instead of keeping the grain.

tormento
21st April 2020, 09:45
Why are you so concerned what comes to denoising as part of the internal operating process of QTGMC?
I already answered to this some posts ago. In my opinion it's a loss of time and could ruin the result of deinterlacing smudging spurious values to semiframes.

The fact the output "looks nice" doesn't mean it's the correct one.

Sharc
21st April 2020, 09:53
One point more to tell it's NOT a "default" value.
Agree, but it can be wrong or at least misleading (cropping black borders discussions, 704 vs 720 width, 2.4% aspect ratio error etc.)

tormento
21st April 2020, 09:57
Agree, but it can be wrong or at least misleading (cropping black borders discussions, 704 vs 720 width, 2.4% aspect ratio error etc.)
SAR must been calculated BEFORE any crop. It measures the "squareness" of a pixel, thus it's independent from the final chosen cropped size.

SAR, DAR, PAR are different nonetheless related things.

GSpot gives an idea of those, even requiring some understanding: i.e. on a 64:45 SAR DVD, it reports a SAR of 5:4, PAR of 1.422 (64:45) and DAR of 16;9.

To render the correct SAR, you need to set SAR as 64:45 during encoding.

Boulder
21st April 2020, 09:59
The fact the output "looks nice" doesn't mean it's the correct one.

What? I thought video enthusiasts are looking to create results that please their brains. At least I don't know what is the correct result of denoising, I only know what I like and what I don't and work with that. At this age, I already know my limitations quite well.

tormento
21st April 2020, 10:03
I thought video enthusiasts are looking to create results that please their brains.
I call them biased results. Personally I try to keep, even while denoising, the final result as close as possible to original one. I degrain simply because it's a side effect of poor technology, not an artistic choice. There are exceptions, where grain is put in postproduction to deliberately give that effect. Anyway, when I look with my eyes at the world, I see no grain, that's why I remove it.

Sharc
21st April 2020, 10:13
I already answered to this some posts ago. In my opinion it's a loss of time and could ruin the result of deinterlacing smudging spurious values to semiframes.

The fact the output "looks nice" doesn't mean it's the correct one.
I just recall this discussion from 2004:
https://forum.doom9.org/showthread.php?t=86394
Summarized here:
https://forum.doom9.org/showpost.php?p=595148&postcount=48

Boulder
21st April 2020, 10:18
I call them biased results. Personally I try to keep, even while denoising, the final result as close as possible to original one. I degrain simply because it's a side effect of poor technology, not an artistic choice. There are exceptions, where grain is put in postproduction to deliberately give that effect. Anyway, when I look with my eyes at the world, I see no grain, that's why I remove it.

Then why do you filter your videos to death with MDegrain averaging over almost ten frames? Do you honestly believe that you remove only noise and no detail while smoothing everything that looks like noise?

I'd like to see a before-after sample, I think I already asked for one when we discussed MDegrain. It would be quite interesting to see how it really looks.

tormento
21st April 2020, 10:34
I just recall this discussion from 2004
IMHO every kind of filter altering image "ruins" semiframes and makes deinterlacing less accurate, at least from digital source. If the source is analogue, i.e. tapes and whatsoever, every case must be considered separately.

tormento
21st April 2020, 10:36
Then why do you filter your videos to death with MDegrain averaging over almost ten frames?
Because it's not tr that flattens down details but thsad. As I already told in another thread, the more frames you have to predict movement vectors, the more precise will be the denoising because you will correctly tracking objects.

You can clearly see it on fast moving objects: lower tr gives bad results while higher forms a more detailed image.

hello_hello
21st April 2020, 10:45
Not true. It can produce multiple times the same image but the image itself is not the correct one for multiple reasons, such as: which hardware you are using to decode, which renderer you are using to show, etc. The only, theoretically correct image, is a software produced one, unless you accept some compromises in chroma, fast decoding routines and so on. The purpose of a player is to keep a constant flow of motion, not to produce the perfect image. The fact itself you consider a player a "perfectly reliable" source speaks for itself.

And the method you use to view video all suffer from the same problems. Do you think VDM2 or whatever you're using magically reproduces the image without using a renderer?
Open a slow script with MPC-HC and watch it give up when it's not being fed frames fast enough. It drops frames when they don't arrive quickly enough so your claim is nonsense, and I always compare frames by navigating directly to a frame number while MPC-HC is paused so it'll wait for the frame even if it takes a minute.
The fact that I consider MPC-HC perfectly reliable only reflects how reliable it is.

All you're doing now is trying to avoid explaining why your method of de-interlacing and denoising my sample doesn't look as good as QTGMC by changing the subject.

Not true. Your screenshots speak for themselves.

FFS. I told you why I resize to square pixel dimensions. I didn't just invent some random SAR to base the resizing on.

Errr.... which ones? Moreover FFMpeg has the capability to report the correct SAR for video streams, it doesn't "default" anything. Recently I had to convert some hundreds of DVDs to mkv and every single one had its own SAR, such as 64:45 (the majority), 10:11 and even odder ones. FFmpeg reported each one of them correctly.

Yep, it probably defaults to an exact 16:9 aspect ratio for 16:9 DVDs and to an mpeg4 DAR for 4:3 DVDs because they're most likely to be correct. It still doesn't mean the SAR is saved to the video stream, it just means they're the ffmpeg default guesses for 16:9 and 4:3 DVDs.

Please don't reply anymore with what you believe, please reply with tecnically consistent proven facts.

You'll be in for a shock when you finally realise you're the one making bad assumptions.

P.S: You uploaded jpg images. You know that jpeg is a lossy format, don't you?

Do you think saving the screenshots as jpegs somehow distorts their aspect ratios?

tormento
21st April 2020, 10:47
Do you think saving the screenshots as jpegs somehow distorts their aspect ratios?
Didn’t all started as image quality comparison?

Boulder
21st April 2020, 10:48
I just did a very quick test on a static scene with my script, using 1 or 3 frames for MAnalyse and MDegrain. Even at low sad (thsad=100), the 3-frame method produces a significantly blurrier result and removes detail as well.
Once again the problem is recognizing what is detail and what is noise. The object to track may not be that big, for example features such as pores or small patches of color on one's skin are quite hard to keep if you really start denoising.

tormento
21st April 2020, 10:50
I just did a very quick test on a static scene with my script, using 1 or 3 frames for MAnalyse and MDegrain. Even at low sad (thsad=100), the 3-frame method produces a significantly blurrier result and removes detail as well.

Try with tr=9. :)

Sharc
21st April 2020, 10:51
[QUOTE=tormento;1908534
GSpot gives an idea of those, even requiring some understanding: i.e. on a 64:45 SAR DVD, it reports a SAR of 5:4, PAR of 1.422 (64:45) and DAR of 16;9.
[/QUOTE]

Yes, SAR and PAR are independent of cropping. I never heard of a '64:45 SAR DVD' though. DVD did not even specify the SAR.
Tools report a lot, and not always correct. The PAR (Pixel Aspect Ratio) or SAR (Sample Aspect Ratio) of a given source cannot be calculated. If it is not specified in the header or in the metadata one has to guess it using the "circle test".
Far off topic, no more arguing ;)

hello_hello
21st April 2020, 10:52
Didn’t all started as image quality comparison?

And I uploaded those original screenshots as PNG, but all you've done is find excuses to avoid discussing why the QTGMC version looks better. You're free to download my de-interlacing sample and upload screenshots that show mine were somehow misleading.

hello_hello
21st April 2020, 11:03
https://forum.doom9.org/showthread.php?p=1058927#post1058927

"Those three tables contain all the numbers you will ever need for any DVD source. Which table you use is mainly a matter of personal preference because you have virtually no chance to find out the real DVD PAR (i.e. the PAR used in the mastering process) for sure. It might be generic, it might be ITU. Black bars left/right are an indication for ITU, but you can’t be certain. Also the absence of bars might mean generic, but it’s no proof either."

Sharc
21st April 2020, 11:12
Brother John said it all :)

hello_hello
21st April 2020, 11:13
I'm not a musician, but the drum on the ground (bass drum?) - I think it's usually "circular" .

If you use that as a "circular reference" :D , then that lower image is too wide

Your brain can deceive you. It tends to make things round when experience tells it they should be. The one that appears round is possibly the one you look at first because your brain makes it round and therefore thinks the other one isn't. Possibly.
I thought the mpeg4 aspect ratio looked more round, and the studs on his strap look more natural, but here's some better screenshots with the original frame in case someone else wants to draw circles. Switch between the images I drew circles over and the circles appear to change, yet they're both perfectly round. I'm still on the side of it being mpeg4, but someone else may be able to draw circles in a slightly different place and have the result look different, because the difference isn't huge. It's hard to find a perfectly straight-on, very defined circle to use as a reference, and as there's no easily discernable "centre" for this one, it's hard to centre the drawn circles exactly. If I find a better shot I'll upload it.

Untouched frame:

https://i.postimg.cc/yJ1ffv6N/original-frame.png (https://postimg.cc/yJ1ffv6N)

16:9 resizing:

https://i.postimg.cc/q6qV9pkz/16-9.png (https://postimg.cc/q6qV9pkz)

20:11 resizing:

https://i.postimg.cc/0rb4RWYM/20-11.png (https://postimg.cc/0rb4RWYM)

Uploaded as png so tormento won't claim jpegs distorted the aspect ratio.

tormento
21st April 2020, 11:18
"Those three tables contain all the numbers you will ever need for any DVD source.
That is complete bullshit. Can you read PAR on those tables?

SAR and PAR are definitely not the same thing. I can present you DVD with SAR of 11:9, such as "Super size me" if I recall well.

I will stop replying to you, as your beliefs resembles more a religion than a technical POV.

hello_hello
21st April 2020, 11:26
That is complete bullshit. Can you read PAR on those tables?

SAR and PAR are definitely not the same thing. I can present you DVD with SAR of 11:9, such as "Super size me" if I recall well.

I will stop replying to you, as your beliefs resembles more a religion than a technical POV.

Show me the DVD please. Can you upload a sample? You're just using a new excuse to put your fingers in your ears.

PAR and SAR are exactly the same thing, but digital video doesn't have pixels as such, it has samples, so at some stage the term was changed. If you think they're not the same thing, it'd be a good idea if you refrained from replying further.

One of those tables refers to your SAR of 64:45 which would give you an exact 16:9 image. Do you think the maths changes because the table refers to it as a PAR instead? Seriously, how do you think that works?

DVDs can only have two storage aspect ratios (with the exception of very rare 4:3 DVDs with a width of 704).

720 / 576 = 1.25 for PAL
720 / 480 = 1.5 for NTSC

Boulder
21st April 2020, 11:29
Try with tr=9. :)

Unfortunately still the same results. The details are being removed because thsad needs to be at least 200 if you want to start removing noise (bad quality Blu-ray source; The Walking Dead, season 5). That is why I do very light denoising myself, because that heavy-duty approach leads only to a plastic look.
In my own encodes, I subtract the result from the original and check if it shows something else than noise. Easy to tweak thsad and limit for changing pixel value.

hello_hello
21st April 2020, 11:38
I can't see 11:9 in MeGUI's list of standard generic and mpeg4 SARs. Is it some special SAR? According to the table I linked to it's not an ITU SAR either.

https://i.postimg.cc/PLtvJbDG/ME1.gif (https://postimg.cc/PLtvJbDG) https://i.postimg.cc/crnnbLWz/ME2.gif (https://postimg.cc/crnnbLWz)

Sharc
21st April 2020, 11:57
SAR and PAR are definitely not the same thing….

PAR and SAR are exactly the same thing….


Are we talking about the same SAR here at all?

PAR = Pixel Aspect Ratio
SAR = Sample Aspect Ratio
or:
SAR = Storage Aspect Ratio?

The 3 letters are ambiguous.

hello_hello
21st April 2020, 11:59
As close to another straight on shot as I could find. Not quite (I don't think), so maybe the circle should be stretched horizontally a little due to aspect. It's hard to tell. My money is still on mpeg4 rather than generic.

Original Frame:

https://i.postimg.cc/gXpG2b2c/original.jpg (https://postimg.cc/gXpG2b2c)

Generic:

https://i.postimg.cc/K4FYZB17/generic.jpg (https://postimg.cc/K4FYZB17)

Mpeg4:

https://i.postimg.cc/rdx8TwcY/mpeg4.jpg (https://postimg.cc/rdx8TwcY)

hello_hello
21st April 2020, 12:02
Are we talking about the same SAR here at all?

PAR = Pixel Aspect Ratio
SAR = Sample Aspect Ratio
or:
SAR = Storage Aspect Ratio?

The 3 letters are ambiguous.

Hopefully tormento isn't that confused, given he's been referring to a 64:45 SAR for the video I uploaded. It can only be sample AR. We'll have to wait to find out why it's not the same thing as pixel AR.

Edit: Maybe I'm wrong and he is that confused. 11:9 is the storage AR for a PAL DVD if you ignore 8 pixels each side, giving 704x576 a 16:9 DAR.

704 / 576 = 1.222222
11 / 9 = 1.222222

Sharc
21st April 2020, 12:21
I can present you DVD with SAR of 11:9, such as "Super size me" if I recall well.

Very interesting.
Isn't the 11:9 =1.2222... some tool approximation for either the standard
40:33 = 1.2121.... mpeg-4 PAR for 16:9 NTSC, or
155200:127953 = 1.2129.... ITU PAR for 16:9 NTSC DVD?

Edit:
Or yep, you mean indeed the STORAGE ASPECT RATIO of 704/576=11:9=1.2222.... In this case I am pretty sure that the SAMPLE ASPECT RATIO for this DVD is according to ITU PAL DVD, i.e. 4600:3159 for 16:9 or 1150:1053 for 4:3.
As I said, SAR is not equal SAR, and we should be clear what we mean beforehand :p

tormento
21st April 2020, 12:49
Isn't the 11:9 =1.2222... some tool approximation for either the standard
Not all DVD are anamorphically encoded and not all are 16:9.

Likewise to what happened to panascope movies, they started to use anamorph to optimize PAL/NTSC resolution (that is 720 pixel by 576 by standard, with an aspect ratio of 4:3 considering what is really displayed on screen, i.e. not teletext or overscan) to avoid wasting bandwidth otherwise occupied by horizontal black bars.

Thus doing, they allow to see non 4:3 DVDs with bit better quality on higher resolution screens than SD when the player is resizing them.

Resizing to lower resolution instead of anamorphically encoding is really stupid. You waste all that video material you could benefit from on HD screens.

tormento
21st April 2020, 13:07
Are we talking about the same SAR here at all?
SAR = Storage Aspect Ratio and it can't be PAR at all, as they are defined as:

SAR × PAR = DAR,

where PAR = Pixel Aspect Ratio (>=1) and DAR = Display Aspect Ratio (4:3, 16:9, etc)

On traditional, i.e. 1:1 square pixels, PAR=1 and SAR=DAR, not PAR.

In anamorphic video, PAR > 1.

In that case, you have to modify SAR in the encoder to have the correct final result.

Sharc
21st April 2020, 13:17
In h.264, h.265 standards SAR is defined as Sample Aspect Ratio which is the same as Pixel Aspect Ratio for mpeg-1 and mpeg-2.
This ambiguity has unfortunately caused a lot of confusion.
Also, the --sar parameter in the x264 encoder stands for Sample Aspect Ratio.

I have no idea why the standard bodies changed from PAR to SAR. Maybe because a pixel can't have an 'aspect ratio' in the strict sense.

hello_hello
21st April 2020, 13:32
Not all DVD are anamorphically encoded and not all are 16:9.

ALL DVDs are anamorphic, however the "industry" referred to 16:9 DVDs as anamorphic and 4:3 DVDs as full-screen, harking back to the days of 4:3 CRTs. I've never met a DVD with a 1:1 sample/pixel aspect ratio. If any other sample/pixel aspect ratio means the video is anamorphic, all DVDs are anamorphic.

Resizing to lower resolution instead of anamorphically encoding is really stupid. You waste all that video material you could benefit from on HD screens.

That's why I resized my encodes by simply stretching the width, rather than reducing the height for the correct DAR. Even you should realise that means I've increased the number of pixels, not reduced them, while obviously not increasing the amount of picture detail, but also while not reducing it.
If you're referring to the table of SAR's/PAR's I linked to and the example given for resizing down, did you also notice it was written in 2007 when people were still commonly using Xvid and/or burning their encodes to CD before watching the video on a CRT?

You are however, wrong. Resolution isn't everything. It's a fairly accepted fact that 1080i has roughly the same spacial resolution as 720p, but a higher temporal resolution, therefore you can de-interlace 1080i to 50/59.94fps and resize to 720p without a noticeable loss of detail. Likewise for an interlaced PAL DVD, you can often de-interlace to 50fps and resize down. For interlaced 4:3 PAL DVDs, I often deinterlace with QTGMC and crop and downscale to 640x480, and the encoded version looks at least as detailed, with better deinterlacing than a player would be capable of.

Progressive video is a different story. If a PAL DVD contains 576p worth of detail, you'll obviously lose some of it when resizing down, but that's often not the case. I've regularly resized PAL 16:9 DVDs to 960x540 after cropping, and it rarely loses detail, but with a bit of filtering, the encode can appear sharper and more detailed than the original at 1024x576. For example:

DVD:
https://i.postimg.cc/GTjWg0ct/resized-to-square-pixels.jpg (https://postimg.cc/GTjWg0ct)

960x540 encode:
https://i.postimg.cc/mzWZ0sGy/downsized-and-filtered.jpg (https://postimg.cc/mzWZ0sGy)

I guess my generic vs mpeg4 aspect ratio screenshots are being ignored too now?

hello_hello
21st April 2020, 13:43
SAR = Storage Aspect Ratio and it can't be PAR at all, as they are defined as:

SAR × PAR = DAR,

Riddle me this, do you specify --sar 64:45 in the x264 command line or do you use --par 64:45?

You'd use the former because x264 refers to sample aspect ratio, not pixel aspect ratio, but they're the same thing.

http://www.chaneru.com/Roku/HLS/X264_Settings.htm#sar

sar
Default: Not Set
Specifies the input video's Sample Aspect Ratio (SAR) to be used by the encoder in width:height. This in conjunction with frame dimensions can be used to encode an anamorphic output by determining the Display Aspect Ratio (DAR) via the formula: DAR = SAR x width/height.

where PAR = Pixel Aspect Ratio (>=1) and DAR = Display Aspect Ratio (4:3, 16:9, etc)

Not to be picky, but 4:3 NTSC DVDs have a pixel/sample aspect ratio of less than 1:1.
8:9 for an exact 4:3 DAR.
10:11 for an mpeg4 DAR.

tormento
21st April 2020, 13:43
This ambiguity has unfortunately caused a lot of confusion.
Unfortunately you are right.

In x264 standards DAR = SAR x width/height, when instead, according to standards, SAR = width/height, i.e. x264 SAR = standards PAR...

Stereodude
21st April 2020, 13:44
Is there nothing you guys won't argue about? And is this the right thread for the current discussion?

hello_hello
21st April 2020, 14:18
Unfortunately you are right.

In x264 standards DAR = SAR x width/height, when instead, according to standards, SAR = width/height, i.e. x264 SAR = standards PAR...

I guess that means you were also wrong when you claimed my beliefs were based more on religion than technical fact, although I suspect your fingers are firmly wedged in your ears now.

poisondeathray
21st April 2020, 15:51
Your brain can deceive you. It tends to make things round when experience tells it they should be. The one that appears round is possibly the one you look at first because your brain makes it round and therefore thinks the other one isn't. Possibly.
I thought the mpeg4 aspect ratio looked more round, and the studs on his strap look more natural, but here's some better screenshots with the original frame in case someone else wants to draw circles. Switch between the images I drew circles over and the circles appear to change, yet they're both perfectly round. I'm still on the side of it being mpeg4, but someone else may be able to draw circles in a slightly different place and have the result look different, because the difference isn't huge. It's hard to find a perfectly straight-on, very defined circle to use as a reference, and as there's no easily discernable "centre" for this one, it's hard to centre the drawn circles exactly. If I find a better shot I'll upload it.



When there is pillarboxing, usually it's a good assumption that they are using ITU aspect ratios. I'm guilty of this too. But a lot can go wrong between acquistion and dvd distribution.

These are "perfect" circles in a graphics program. Not hand drawn. You can fiddle with it, subpixel shift up/down, fractional scaling, etc... but the circles themselves are perfect. I find it better to use semi transparent overlays. It's pretty clear that 1024x576 is too narrow, 1048x576 is a closer match. Assuming the ?bass drum is supposed to be circular

1_1024x576
https://i.postimg.cc/mDG2yMSx/1-1024x576-00000.png

1_1048x576
https://i.postimg.cc/9X7sjKVB/1-1048x576-00000.png

2_1024x576
https://i.postimg.cc/2yrQM1rM/2-1024x576-00000.png

2_1048x576
https://i.postimg.cc/qvh3ms2g/2-1048x576-00000.png

hello_hello
21st April 2020, 16:59
poisondeathray,
The program I use for drawing circles (Irfanview) is primarily an image viewer with some paint-like drawing abilities via a plugin. I don't think it can draw transparent overlays (just solid color), but I should find a program that does as it appears to be a better way to do it if you can find perfect circles in the picture. Is there a free, easy to use program you'd recommend?

Sometimes I see a straight on shot of a CRT or LCD display and draw rectangles to measure the aspect ratio.
A fun fact: The aspect ratio of the CRT TV displaying the opening credits at the beginning of The Simpsons (at least the early 4:3 episodes) has an aspect ratio of roughly 1.275 instead of 4:3. I know it's just a drawing but I had to try something.... :)

At least I know my brain didn't let me down for this one (it has before) and it does have an mpeg4/ITU DAR.

Cheers.

Edit: For tormento's benefit that means the PAR/SAR would be 16:11 if you go with an mpeg4 20:11 DAR, giving you display dimensions of 1047.27 x 576, or you can use the harder to remember ITU PAR/SAR of 4600/3159, giving you display dimensions of 1048.43 x 576 (as they're virtually the same), rather than the generic PAR/SAR of 64:45, which gives you exact 16:9 dimensions of 1024 x 576.

The benefit of using the mpeg4 display aspect ratios, rather than ITU, is there's only two of them, much like the generic 16:9 and 4:3 display aspect ratios. 20:11 for both "16/9" PAL and NTSC, or 15:11 for "4/3" PAL and NTSC. The 20:11 and 15:11 display aspect ratios will give you the mpeg4 PARs/SARs listed in the table I linked to, if you calculate them based on the PAL and NTSC storage dimensions.

576 × 20/11 / 720 = 1.4545 = 16:11 (SAR/PAR)
480 × 20/11 / 720 = 1.2121 = 40:33 (SAR/PAR)

576 × 15/11 / 720 = 1.0909 = 12:11 (SAR/PAR)
480 × 15/11 / 720 = 0.9090 = 10:11 (SAR/PAR)

And if you crop any of the above to a width of 704, you end up with exactly 16:9 or exactly 4:3.

As you've apparently discovered, ffmpeg defaults to a generic SAR/PAR for 16:9 DVDs and an mpeg4 SAR/PAR for 4:3 DVDs. In my opinion that will mostly be correct for newer 16:9 DVDs, and almost always correct for 4:3 DVDs, but they can be either.

I suspect, but can't really prove, that all BBC 16:9 DVDs are an exception to the rule and always have an mpeg4/ITU DAR.

poisondeathray
21st April 2020, 20:08
poisondeathray,
The program I use for drawing circles (Irfanview) is primarily an image viewer with some paint-like drawing abilities via a plugin. I don't think it can draw transparent overlays (just solid color), but I should find a program that does as it appears to be a better way to do it if you can find perfect circles in the picture. Is there a free, easy to use program you'd recommend?


Not sure...

I'm don't really use irfanview; but it should be possible in gimp or any image editor program. You can layer on some colored layer at some % opacity (or transparency, same thing, different programs use different terms). You can constrain an elliptical mask to a perfect circle by using hot keys, such as CTRL+SHIFT, or something like that. Then fiddle around with the scale, positioning etc.. It's nicer to have subpixel positioning or scaling control but not all programs have it

I use AE for this. It's overkill for this, but I'm more comfortable with the interface. Hitfilm Express is a free version or Hitfilm, and basically an AE clone, I assume it can do the same as easily, not sure



I suspect, but can't really prove, that all BBC 16:9 DVDs are an exception to the rule and always have an mpeg4/ITU DAR.

BBC uses 702 width for their AR calculation. For them, the 16:9 square pixel equivalent is 1050x576, and 4:3 788x576 . I mirrored their old guideline somewhere before. Something like "BBC A Guide To Picture Size" . If you can't find it on google , I can look for it if you're really interested. But many people round to 704 in practice.

hello_hello
21st April 2020, 20:27
I'm don't really use irfanview; but it should be possible in gimp or any image editor program. You can layer on some colored layer at some % opacity (or transparency, same thing, different programs use different terms). You can constrain an elliptical mask to a perfect circle by using hot keys, such as CTRL+SHIFT, or something like that. Then fiddle around with the scale, positioning etc.. It's nicer to have subpixel positioning or scaling control but not all programs have it

I use AE for this. It's overkill for this, but I'm more comfortable with the interface. Hitfilm Express is a free version or Hitfilm, and basically an AE clone, I assume it can do the same as easily, not sure

The program I use lets you draw perfect circles via CTRL+SHift too, but there's no repositioning them later. I'll check out those programs. Thinking about it, there's a free program called Paint.Net or something like that, which does lots of cool things. I'll see if I can find it too. I still prefer to be XP compatible at the moment though. :)

BBC uses 702 width for their AR calculation. For them, the 16:9 square pixel equivalent is 1050x576, and 4:3 788x576 . I mirrored their old guideline somewhere before. Something like "BBC A Guide To Picture Size" . If you can't find it on google , I can look for it if you're really interested. But many people round to 704 in practice.

Now you mention it, I do remember that, but I think it was for broadcast purposes so I wasn't necessarily sure that always transfers directly to their DVDs.
I'm pretty sure I decided the 16:9 BBC DVDs I have worked with (which is a small number) were mpeg4, so if they do use 702x576 or 1050x576 as 16:9 for DVDs, I was only off by a couple of pixels.

StainlessS
21st April 2020, 20:45
there's a free program called Paint.Net
Used to be free, at least donation/shareware now I think.

Also, dont think XP compatible anymore.

EDIT: Paint.NET.3.5.11.Install(LAST for XP).exe :- http://www.mediafire.com/file/g4b9b534vj40xtv/Paint.NET.3.5.11.Install%2528LAST_for_XP%2529.exe.7z/file

EDIT: Seems to be free according to WikiPedia + other sites,
but look here on M$ site & App Store(Win10 Pro/Home Only : £6.99):- https://www.microsoft.com/en-us/p/paintnet/9nbhcs1lx4r0?activetab=pivot:overviewtab
EDIT: Has free trial.

Was sure that this was developed at some university, M$ seems to have taken total ownership after the students developed it for them.

EDIT:

It started development as an undergraduate college senior design project mentored by Microsoft, and is now maintained and developed by Rick Brewster.
Originally intended as a free replacement for the Microsoft Paint software that comes with Windows, it has grown into a powerful yet simple image and
photo editor tool. It has been compared to other digital photo editing software packages such as Adobe® Photoshop®, Corel® Paint Shop Pro®,
Microsoft Photo Editor, and The GIMP.

If you buy Paint.NET in the Windows Store, you'll be supporting its development directly (normally we ask for a donation).
You will get the convenience of fast, easy installation onto all of your Windows devices along with fully automatic,
behind-the-scenes updates with all the newest features, improvements, and fixes.

EDIT: Wikipedia

Paint.net originated as a computer science senior design project during spring 2004 at Washington State University.
Version 1.0 consisted of 36,000 lines of code and was written in fifteen weeks.[4] In contrast, version 3.35 has approximately
162,000 lines of code. The paint.net project continued over the summer and into the autumn 2004 semester for both the
version 1.1 and 2.0 releases.

Development continues with one programmer who worked on previous versions of Paint.net while he was a student at WSU.
As of May 2006 the program had been downloaded at least 2 million times,[5] at a rate of about 180,000 per month.[6]

Initially, Paint.net was released under a modified version of the MIT License, with the exclusion of the installer, text,
and graphics.[7] It was completely open-source, but because breaches of license, all resource files (such as interface
text and icons) were released under a non-free Creative Commons license forbidding modification, and the installer was
made closed-source.[8] Version 3.36 was initially released as partial open-source, but Brewster later took down the
source code, citing problems with plagiarism. In version 3.5, paint.net became proprietary software.
Users are now prohibited from modifying it.[8][9]

Starting with version 4.0.18, paint.net is published in two editions: A classic edition remains freeware, similar to all other
versions since 3.5. Another edition, however, is published to Microsoft Store under a trialware license and is available to
purchase for US$7. According to the developer, this was done to enable the users to contribute to the development with
more convenience, even though the old avenue of donation was not closed.[10][11]
According to Wikipedia, requires Win7SP1 or above.

hello_hello
21st April 2020, 21:25
StainlessS,
Thanks for the link. I read the Wikipedia stuff and was just about to go hunting for version 3.5.11 when I read your post. I have it downloaded and installed. I've not played with layers much. I understand the principle, I'll just need to play around.
Cheers.

hello_hello
21st April 2020, 23:01
Something like "BBC A Guide To Picture Size".

Why did I look???

I recall reading about industry standard square pixels having a 767:768 aspect ratio, and here's a riddle I've never worked out. If you take the PAL "almost exact" ITU PAR's from Brother John's table and multiply them by 767/768 you get the exact Digital PARs for PAL, before they were fudged to 12:11 & 16:11. According to Wikipedia the exact PAL digital PARs should be 59:54 and 118:81.
https://en.wikipedia.org/wiki/Pixel_aspect_ratio#Digital_video_processing

(128/117) × (767/768) = 59/54
(512/351) × (767/768) = 118/81

Applying the same to the almost exact ITU NTSC PARs doesn't result in a PAR I've ever seen mentioned and I've never understood why. Maybe it's just some mathematical co-incidence for PAL.

Anyway, I understood what I read regarding the BBC version of PARs but I don't understand where 1:1.094 comes from. Are widths of 788 and 1050 differently fudged versions of the exact digital PARs of 59:54 and 118:81??
BBC - Commissioning - A Guide to Picture Size.pdf (https://community.avid.com/cfs-filesystemfile.ashx/__key/CommunityServer.Components.PostAttachments/00.00.54.02.29/BBC-_2D00_-Commissioning-_2D00_-A-Guide-to-Picture-Size.pdf)

StainlessS
21st April 2020, 23:16
Never mind about whatever version of PAR, who cares if looks about right.

Now what about this McTemporalDenoise thing, any good ?

poisondeathray
21st April 2020, 23:41
@Hello_hello , read this for where the numbers come from and the assumptions behind it
https://en.wikipedia.org/wiki/Talk%3APixel_aspect_ratio#Can_sb._check_the_pixel_aspect_ratio_of_4:3_576i?

But, SS is right. Close is good enough. No more AR talk. There are 1000 page threads on several forums going into this

Back to MCTD

hello_hello
22nd April 2020, 04:13
The MCTD chatter is so loud I can hear my pixels changing shape. :)

real.finder
25th April 2020, 03:11
first step, https://github.com/realfinder/AVS-Stuff/commit/bcfd0ef58836adee7148ffdc2b1b8f9e99940f3f

real.finder
28th April 2020, 00:29
ok, so now, let's try make MCTD great again! (with HBD) first is GradFun2DBmod (v1.5), GradFun2db (v1.0)

can those be replaced with f3kdb? I think this what vs port did

TTempsmooth (v0.9.4), need someone port back TTempsmooth from VS! I did said this before https://forum.doom9.org/showpost.php?p=1907953&postcount=28 same for EEDI2 (v0.9.2) (or maybe EEDI3 as new replacement) and SangNom/2 or mod but seems MeteorRain only did VagueDenoiser...

since I have virtual studio 2019 in an old laptop, is there any specific steps so I can do ports myself? or it's impossible for c++ n00b (almost zero knowledge and experience with c/c++)? :)

Boulder
28th April 2020, 06:40
since I have virtual studio 2019 in an old laptop, is there any specific steps so I can do ports myself? or it's impossible for c++ n00b (almost zero knowledge and experience with c/c++)? :)

I believe these cases are the ones where you either step onto the path to learn coding or stay out of it. So, probably not impossible but will surely require a whole lot of work along the way. Maybe HBD = here be dragons now :D

tormento
28th April 2020, 10:34
I believe these cases are the ones where you either step onto the path to learn coding or stay out of it. So, probably not impossible but will surely require a whole lot of work along the way. Maybe HBD = here be dragons now :D
Is there some guide to have Visual Studio compile sources from GIT? I saw some already have .vsproj but for the others?

Boulder
28th April 2020, 11:48
To compile in VS, you need a VS project which should be included with the sources if there is one available. Some plugins can be compiled using other tools, I think mainly GCC. Often you can get this information from the project page if it exists.
I've never created a project out of scratch myself (well, at least in 20 years IIRC) so I don't know any details. I've only used the existing project files provided by the authors. Maybe taking a look at one of the existing ones is useful regarding what is required to even start working on the project.

real.finder
28th April 2020, 15:27
so, no hope but waiting someone do it...

Stereodude
28th April 2020, 19:04
ok, so now, let's try make MCTD great again! (with HBD) first is GradFun2DBmod (v1.5), GradFun2db (v1.0)

can those be replaced with f3kdb? I think this what vs port did

TTempsmooth (v0.9.4), need someone port back TTempsmooth from VS! I did said this before https://forum.doom9.org/showpost.php?p=1907953&postcount=28 same for EEDI2 (v0.9.2) (or maybe EEDI3 as new replacement) and SangNom/2 or mod but seems MeteorRain only did VagueDenoiser...
I don't know if you can use EEDI3 in place of EEDI2. From the wiki (http://avisynth.nl/index.php/Eedi3): "eedi3 doesn't really have anything to do with eedi2 aside from doing edge-directed interpolation (they use different techniques)."

That doesn't sound like it's just a tweaked and improved version that can be substituted. However, I admit I've never really looked at what MCTD does internally, so maybe it still can.

real.finder
9th May 2020, 06:03
ok, so now, let's try make MCTD great again! (with HBD) first is GradFun2DBmod (v1.5), GradFun2db (v1.0)

can those be replaced with f3kdb? I think this what vs port did


ok, so I did read what VS did, it don't has any enhance settings so the output of both already different, I will care for GradFun2DBmod (v1.5), GradFun2db (v1.0) later (since other plugins is still missing)

tormento
9th May 2020, 09:45
What are the missing x64 HDB filters and avsi right now to have a modernized MCTemporalDenoise?

And remember they must have newer AVS+ header ;)

kedautinh12
30th May 2020, 17:40
ok, so now, let's try make MCTD great again! (with HBD) first is GradFun2DBmod (v1.5), GradFun2db (v1.0)

can those be replaced with f3kdb? I think this what vs port did

TTempsmooth (v0.9.4), need someone port back TTempsmooth from VS! I did said this before https://forum.doom9.org/showpost.php?p=1907953&postcount=28 same for EEDI2 (v0.9.2) (or maybe EEDI3 as new replacement) and SangNom/2 or mod but seems MeteorRain only did VagueDenoiser...

since I have virtual studio 2019 in an old laptop, is there any specific steps so I can do ports myself? or it's impossible for c++ n00b (almost zero knowledge and experience with c/c++)? :)

Can replaced with gradfun3mod??
https://pastebin.com/JtWfSQ84
Edited
AviSynth-vsTTempSmooth
https://github.com/Asd-g/AviSynth-vsTTempSmooth
AviSynth-SangNom2
https://github.com/Asd-g/AviSynth-SangNom2

real.finder
30th May 2020, 18:18
Can replaced with gradfun3mod??
https://pastebin.com/JtWfSQ84

not this scripts again! https://forum.doom9.org/search.php?searchid=8730330 and it's a big no

Edited
AviSynth-vsTTempSmooth
https://github.com/Asd-g/AviSynth-vsTTempSmooth
AviSynth-SangNom2
https://github.com/Asd-g/AviSynth-SangNom2

already know about them :) EEDI2 and EEDI3 still missing

real.finder
25th June 2020, 11:24
test update https://github.com/realfinder/AVS-Stuff/raw/Community/avs%202.5%20and%20up/MCTemporalDenoise.avsi it wont use enhance for HBD by default, so it will work with HBD now

I will try some tests later with GradFun2DBmod and GradFun2db vs f3kdb to replace GradFun2db (but enhance for HBD will stay false by default)

tormento
25th June 2020, 11:41
I will try some tests later with GradFun2DBmod and GradFun2db vs f3kdb to replace GradFun2db (but enhance for HBD will stay false by default)
Please do some tests with Neo plugins too.

real.finder
25th June 2020, 18:30
Please do some tests with Neo plugins too.

what you mean? Neo plugins already used now (Neo FFT3D / DFTTest even for HBD are optional, others are not optional in HBD but they not used in this script in first place)

exactly the same for vsXXX plugins that asd did, but since old plugins for these plugins don't has HBD then they are not optional if you work with HBD

the summary is, if it not required then it's recommended to use them unless you see some problems

keep in mind I didn't update the description of the scripts (yet) including the required plugins

tormento
25th June 2020, 19:57
keep in mind I didn't update the description of the scripts (yet) including the required plugins
#this #til

real.finder
27th June 2020, 02:11
f3kdb can't be a compatibility replacement so I used SmoothGrad from Dither tools

so I did another updates (will use modded GradFun2DBmod for more color formats but not HBD) and make sure it not use any deband in HBD (forgotten GradFun2db make it crash after seek when use HBD)

tormento
27th June 2020, 10:44
f3kdb can't be a compatibility replacement so I used SmoothGrad from Dither tools
Dither tools are as old as stone age. :p

Do they support AVS+ new header?

A new compile with HBD support and newer header would be welcome.

real.finder
27th June 2020, 10:53
Dither tools are as old as stone age. :p

Do they support AVS+ new header?

A new compile with HBD support and newer header would be welcome.

dither for avs 2.5 work fine, anyway, it will not be used in HBD by default

instead of port all things in dither, there are some functions from dither tools are useful like https://forum.doom9.org/showthread.php?p=1907352#post1907352

gispos
14th November 2020, 18:57
MCTemporalDenoise crashes regularly with the settings 'high' and 'very high'.
I think I have to update something, just what?

real.finder
14th November 2020, 20:44
MCTemporalDenoise crashes regularly with the settings 'high' and 'very high'.
I think I have to update something, just what?

it's fine here

ColorBars(width=720, height=480, pixel_type="yv12")
MCTemporalDenoise(settings="very high")

gispos
15th November 2020, 11:01
it's fine here

ColorBars(width=720, height=480, pixel_type="yv12")
MCTemporalDenoise(settings="very high")
No, immediately a crash

Edit: Not always, sometimes it works sometimes not

Edit2: I think TTempSmooth is the culprit
https://i.ibb.co/nzsvFKy/Error.jpg (https://imgbb.com/)

gispos
15th November 2020, 11:53
It's getting annoying with all these versions. :mad:
I downloaded this (https://github.com/Asd-g/AviSynth-vsTTempSmooth), and now

Script error: There is no function named 'TTempSmoothF'.
(D:\Tools\AviSynth\plugins64\MCTemporalDenoise\MCTemporalDenoise.avs, line 1083)


Now I've loaded this one (http://avisynth.nl/index.php/TTempSmooth) and didn't want to use it at first.
DLL description: For Avisynth 2.5

But it works, man oh man, why is the information on certain things handled so sloppily.

kedautinh12
15th November 2020, 13:55
No, immediately a crash

Edit: Not always, sometimes it works sometimes not

Edit2: I think TTempSmooth is the culprit
https://i.ibb.co/nzsvFKy/Error.jpg (https://imgbb.com/)

Use vsTTempSmooth replaced
https://github.com/Asd-g/AviSynth-vsTTempSmooth

real.finder
15th November 2020, 16:10
gispos, my edit can use both vsTTempSmooth and TTempSmooth, if you have both it will use vsTTempSmooth

gispos
15th November 2020, 18:23
gispos, my edit can use both vsTTempSmooth and TTempSmooth, if you have both it will use vsTTempSmooth
'My Edit', what do you mean by that?

I think you mean MCTDmod and I ask myself whether the result with this version is comparable with the original.
With the settings of MCTD I always try hard and do not want any other results for my existing scripts
Are the settings comparable?

About TTempSmooth:
I had a port from 'Joshua Duncan' who was causing the problems, with the normal TTempSmooth.dll everything works.

real.finder
15th November 2020, 18:48
'My Edit', what do you mean by that?
in signature or https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/MCTemporalDenoise.avsi

to use it, you will need https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi if you don't have it

gispos
15th November 2020, 20:55
in signature or https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/MCTemporalDenoise.avsi

to use it, you will need https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi if you don't have it
My version that doesn't work with vsTempSmooth:
### v1.4.20 : tweaked some settings
### updated QED_Deblock version

Yours in the link.
### v1.4.20 : tweaked some settings
### updated QED_Deblock version

:D

With yours it also works with vsTempSmooth (thanks for that), but please note an update in the changelog

real.finder
15th November 2020, 21:27
My version that doesn't work with vsTempSmooth:
### v1.4.20 : tweaked some settings
### updated QED_Deblock version

Yours in the link.
### v1.4.20 : tweaked some settings
### updated QED_Deblock version

:D

With yours it also works with vsTempSmooth (thanks for that), but please note an update in the changelog

I was lazy to add these things :D, well, at least I did add
### 27 June 2020 ###

gispos
7th December 2020, 22:24
MCTemporalDenoise crashed with deblock = True. Can someone tell me what could be the cause?
I can't remember swapping the plugins I needed for MCTemporalDenoise.

I still use the older version because the latest version is about 2 fps slower for me.

Edit
Just found out if I set useQED = False there is no crash. But have not changed the Deblock_QED.avs. Strange.

Edit2
The 'Deblock_QED.avs' is the culprit but can't find another. Is there a newer one?

manolito
8th December 2020, 08:13
The 'Deblock_QED.avs' is the culprit but can't find another. Is there a newer one?

The latest one I use is this one:
# Changes 2016-5-8: (Motenai Yoda)
# - Added internal variable uvp for skip chroma post processing when uv!=3
# - Replaced most (chroma=uv>2?"process":"copy") and all U=uv,V=uv by U=uvp,V=uvp to trash chroma planes when uv!=3
# - Replaced last (chroma=uv>2?"process":"copy") by (U= uv<2 ? 1 : uv,V= uv<2 ? 1 : uv) to trash chroma planes when uv=1|-1
https://forum.doom9.org/showthread.php?p=1767112#post1767112

FWIW if you use AVS+ in MT mode the crash can most likely be avoided if the MCTemporalDenoise call is followed by a RequestLinear call.

real.finder
8th December 2020, 15:28
MCTemporalDenoise crashed with deblock = True. Can someone tell me what could be the cause?
I can't remember swapping the plugins I needed for MCTemporalDenoise.

I still use the older version because the latest version is about 2 fps slower for me.

Edit
Just found out if I set useQED = False there is no crash. But have not changed the Deblock_QED.avs. Strange.

Edit2
The 'Deblock_QED.avs' is the culprit but can't find another. Is there a newer one?

for me it's faster in new one and I have no problem with deblock, maybe you want to try my plugins folder https://forum.doom9.org/showthread.php?t=181989

gispos
8th December 2020, 20:16
The latest one I use is this one:

https://forum.doom9.org/showthread.php?p=1767112#post1767112

FWIW if you use AVS+ in MT mode the crash can most likely be avoided if the MCTemporalDenoise call is followed by a RequestLinear call.
Doesn't help either. Still crashing. If useQED is True is 'Deblock_QED.avs' used?
If so, the error can only be caused by Deblock_QED.avs. Maybe I'll find out.

for me it's faster in new one and I have no problem with deblock, maybe you want to try my plugins folder https://forum.doom9.org/showthread.php?t=181989
The new version is slower for me, but I will look at your plugins and experiment with them. Thanks for that.

StainlessS
8th December 2020, 22:44
MCTemporalDenoise crashed with deblock = True
Maybe some further clues would be good, eg error message.
Also, particularly if no error message, then anything in Windows Logs ?
[Maybe also cause fault with DebugView running, some s/w may output debug text prior to collapse.]
Also try via Vdub2, maybe it puts up error debug stuff.

gispos
9th December 2020, 17:59
Maybe some further clues would be good, eg error message.
Also, particularly if no error message, then anything in Windows Logs ?
[Maybe also cause fault with DebugView running, some s/w may output debug text prior to collapse.]
Also try via Vdub2, maybe it puts up error debug stuff.

VirtualDub shows the same error message. Crash in 'ucrtbase.dll'
But I can't understand.
1.) I have installed all C ++ runtimes (and installed it again)
2.) A call to deblock() does not cause an error, only with 'QED_deblock.avs' it pops. I looked at the QED_deblock, there a few calculations are made and basically deblock is also called. ( I am overlooking something ?)

I have tested the deblock.dll version 1.3 with the QED version linked by manolito, then comes the error message 'Deblock_deblock' does not exist.
Now I'll take a look at the real_finder plugins, but I can't understand that.

pinterf
9th December 2020, 18:26
VirtualDub shows the same error message. Crash in 'ucrtbase.dll'
But I can't understand.
1.) I have installed all C ++ runtimes (and installed it again)
2.) A call to deblock() does not cause an error, only with 'QED_deblock.avs' it pops. I looked at the QED_deblock, there a few calculations are made and basically deblock is also called. ( I am overlooking something ?)

I have tested the deblock.dll version 1.3 with the QED version linked by manolito, then comes the error message 'Deblock_deblock' does not exist.
Now I'll take a look at the real_finder plugins, but I can't understand that.
1.) Deblock_deblock means: calls deblock plugin from deblock.dll
2.) which dctfilter version are you using? chikuzens' version was replaced by Asd-g's build (v0.5.1)

gispos
9th December 2020, 19:00
1.) Deblock_deblock means: calls deblock plugin from deblock.dll
2.) which dctfilter version are you using? chikuzens' version was replaced by Asd-g's build (v0.5.1)
DCTFilter, was the correct guess.:)
Thank you!

Mugiiya
4th May 2021, 03:15
in signature or https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/MCTemporalDenoise.avsi

to use it, you will need https://github.com/realfinder/AVS-Stuff/blob/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi if you don't have it

I had problems with your version.
Script error: There is no function named 'gradfun2db3'. Line 711

Also, this version have multi-threading support?

Loaded script:

LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\masktools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\RgTools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\variableblur.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\warpsharp.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\fft3dfilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\TTempSmooth.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\Deblock.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\DCTFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\EEDI2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\AddGrainC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64+\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\Zs_RF_Shared.avsi")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\LSFmod.v1.9.avsi")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\Deblock_QED_MT2Mod.avsi")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\GradFun2DBmod.v1.5.avsi")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\MCTemporalDenoise.avsi")

MCTemporalDenoise(radius=1, sigma=1, twopass=false, useTTmpSm=false, limit=-1,chroma=false, GPU=false, interlaced=false, sharp=true, adapt=true, strength=150, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=false, Tovershoot=0, protect=false, cutoff=64, threshold=127, maxdiff=0, AA=true, useEEDI2=true, reduc=1, maxd=12, AAthr=16, method=0, deblock=false, useQED=true, quant1=40, quant2=80, edgeclean=true, ECrad=8, ECthr=32, ECmode="RemoveGrain(4,4)", stabilize=false, maxr=1, TTstr=1, enhance=true, GFthr=1.1, AGstr=0, bias=-1, bwbh=48, owoh=16, blksize=16, overlap=8, truemotion=false, MVglobal=false, bt=1, ncpu=12, precision=2, pel=2, pelsearch=2, search=-1, searchparam=-1, MVsharp=0, DCT=0)


Solved adding: fixband=false
But still can't use multi-threading.

kedautinh12
4th May 2021, 05:05
Please updated gradfun2dbmod of real.finder here:
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/GradFun2DBmod.avsi
And some script with community branch:
https://github.com/realfinder/AVS-Stuff/tree/Community/avs%202.5%20and%20up
Update new ver of filters&scripts requested from here:
http://avisynth.nl/index.php/MCTemporalDenoise

Mugiiya
4th May 2021, 17:36
Please updated gradfun2dbmod of real.finder here:
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/GradFun2DBmod.avsi
And some script with community branch:
https://github.com/realfinder/AVS-Stuff/tree/Community/avs%202.5%20and%20up
Update new ver of filters&scripts requested from here:
http://avisynth.nl/index.php/MCTemporalDenoise

Missing only his version of GradFun2DBMod, the rest is all updated in x64. I tried and the multi-threading still doesn't work, using only 20% of my processor. I'm using a Ryzen 5 3600.

Boulder
4th May 2021, 17:57
Do you have the Prefetch call at the end of your script? Otherwise Avisynth itself won't do any multithreading, only individual plugins may.

Mugiiya
4th May 2021, 19:18
Do you have the Prefetch call at the end of your script? Otherwise Avisynth itself won't do any multithreading, only individual plugins may.

Don't know how to do this. Can you please explain?

EDIT
I looked around and found how to use it. Thanks a lot for the help.

Script without loaded plugins and imported avsi:

SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("LWLibavVideoSource", 3)

LWLibavVideoSource("D:\Encode\GitS SAC 01.mkv", format="YUV420P8")

MCTemporalDenoise(radius=1, sigma=1, twopass=false, useTTmpSm=false, limit=-1, post=0, chroma=false, GPU=false, fixband=false, interlaced=false, sharp=true, adapt=true, strength=150, SHmode=3, SHmethod=3, Slimit=0, Sovershoot=0, Tlimit=false, Tovershoot=0, protect=false, cutoff=64, threshold=127, maxdiff=0, AA=true, useEEDI2=true, reduc=1, maxd=12, AAthr=16, method=0, deblock=false, useQED=true, quant1=40, quant2=80, edgeclean=true, ECrad=8, ECthr=32, ECmode="RemoveGrain(4,4)", stabilize=false, maxr=1, TTstr=1, enhance=true, GFthr=1.1, AGstr=0, bias=-1, temp=100, bwbh=48, owoh=24, blksize=16, overlap=8, truemotion=false, MVglobal=false, bt=1, ncpu=12, precision=2, pel=2, pelsearch=2, search=-1, searchparam=-1, MVsharp=0, DCT=0)

aWarpSharp2(thresh=100, blur=2, type=1, depth=9, chroma=4)

FFT3DFilter(sigma=1.0, beta=1.0, plane=0, bt=3, sharpen=1.0, ncpu=12)

Prefetch(threads=12)

Selur
4th May 2021, 19:39
for example:
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading plugins&co
....
# loading source
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_853323747_1_0.ffindex",fpsnum=25,colorspace="YV12")
# filtering
....
PreFetch(8)
return last
see: http://avisynth.nl/index.php/SetFilterMTMode

kedautinh12
5th May 2021, 00:55
You missed new ver of Zs_RF_Shared.avsi cause your link only v1.150 and my link v.1.152

Boulder
5th May 2021, 05:18
If you use Prefetch, remove the ncpu parameters from your script. Otherwise you'll be multithreading on the script and function level simultaneously, which is inefficient.

kedautinh12
5th January 2022, 17:39
Asd-g creat a script GradFun3dbMod base GradFun2dbMod. I think we can replace it in MCTemporalDenoise

guest
21st September 2022, 06:54
Asd-g creat a script GradFun3dbMod base GradFun2dbMod. I think we can replace it in MCTemporalDenoise

Hi ked,

I thought I'd have a look on this section of the Forum, and found this post:-

http://forum.doom9.net/showthread.php?p=1942127#post1942127

has a problem with Line 711, but different.

I might try that script....why would it work with Staxrip, and not RipBot ?!?!?

EDIT:- I got it to work :)

kedautinh12
21st September 2022, 08:08
Hi ked,

I thought I'd have a look on this section of the Forum, and found this post:-

http://forum.doom9.net/showthread.php?p=1942127#post1942127

has a problem with Line 711, but different.

I might try that script....why would it work with Staxrip, and not RipBot ?!?!?

EDIT:- I got it to work :)

Oh, how you do that work?? (Reel.Deel won't complain at here :D)

guest
21st September 2022, 10:02
Oh, how you do that work?? (Reel.Deel won't complain at here :D)

If you go to where that link takes you, you'll see a script, then Solved adding: fixband=false, and that fixed it..

kedautinh12
21st September 2022, 10:28
If you go to where that link takes you, you'll see a script, then Solved adding: fixband=false, and that fixed it..

Maybe relate you won't update GradFun2DBMod cause GradFun2DBMod had gradfun2db3 function. And Gradfun2db3 need dither_tool.avs to work

guest
21st September 2022, 10:34
Solved adding: fixband=false


I'd really like to know where you found the "fix" for this, I had been trying to get MCTemporalDenoise to work, and couldn't, but this did :)

guest
21st September 2022, 10:38
Maybe relate you won't update GradFun2DBMod cause GradFun2DBMod had gradfun2db3 function. And Gradfun2db3 need dither_tool.avs to work

So should I try 3 instead of 2, with dither ???

kedautinh12
21st September 2022, 10:51
So should I try 3 instead of 2, with dither ???

No, just update latest ver and remove fixband=false

guest
21st September 2022, 10:54
No, just update latest ver and remove fixband=false

I'm pretty sure I'm running the latest, tho..I'll check. :thanks:

So which one should I use:-

http://avisynth.nl/index.php/GradFun2DBmod

OR

https://github.com/Asd-g/AviSynthPlus-Scripts/blob/master/GradFun3DBmod.avsi

kedautinh12
21st September 2022, 11:39
I'm pretty sure I'm running the latest, tho..I'll check. :thanks:

So which one should I use:-

http://avisynth.nl/index.php/GradFun2DBmod

OR

https://github.com/Asd-g/AviSynthPlus-Scripts/blob/master/GradFun3DBmod.avsi

Wrong, here:
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/GradFun2DBmod.avsi

guest
21st September 2022, 12:10
Wrong, here:
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/GradFun2DBmod.avsi

Excellent, I had the older version from 2009, and this is from 2020 :)

Going to "play" with "UnBand" tomorrow.

Thankyou again, my friend.

kedautinh12
21st September 2022, 12:16
Excellent, I had the older version from 2009, and this is from 2020 :)

Going to "play" with "UnBand" tomorrow.

Thankyou again, my friend.

I said you need update to latest ver from here but you forgot that
https://forum.doom9.org/showthread.php?p=1974926#post1974926

guest
21st September 2022, 12:32
I said you need update to latest ver from here but you forgot that
https://forum.doom9.org/showthread.php?p=1974926#post1974926

Yes, yes, you did, I didn't pay enough attention to the version numbers :(

Stereodude
28th September 2022, 15:55
How do I get the this new MCTD version working? From here: https://github.com/Asd-g/AviSynthPlus-Scripts/blob/master/MCTD_.avsi

I started down the rabbit hole of updating all the dependencies... I got to it complaining about ex_lut missing. Got the ExTools.avsi from here (https://github.com/Dogway/Avisynth-Scripts/blob/master/ExTools.avsi) and now:

https://i.imgur.com/YwCFg46.png

Edit: Fixed. I guess my AVSynth+ version was too old. I updated to 3.7.2 and now that error went away and I can use MCTD_.

Stereodude
28th September 2022, 16:48
What are you guys doing about LSFmod? If you have sharpening enabled in MCTD, LSFmod will puke on something that's not YV12.

The LSFmod version linked from the wiki (http://latoninf.free.fr/d9/LM/LSFmod.v1.9.avsi) has an explicit check for YV12.

The newer version here (https://github.com/avisynth-repository/LSFmod/blob/master/LSFmod.avsi) from TheChaosCoder has a statement on line 419 of:

sisphbd = AvsPlusVersionNumber > 2294

That throws an error

"I don't know what 'AvsPlusVersionNumber' means."

I can modify LSFmod to force sisphbd = true and then MCTD works with sharpening enabled, but it feels pretty half baked.

StainlessS
28th September 2022, 16:53
I think you need current Zs_RF_Shared.avsi for 'AvsPlusVersionNumber'.
(real.finder)

EDIT: Maybe here:- https://github.com/realfinder/AVS-Stuff

Stereodude
28th September 2022, 17:17
I think you need current Zs_RF_Shared.avsi for 'AvsPlusVersionNumber'.
(real.finder)

EDIT: Maybe here:- https://github.com/realfinder/AVS-Stuff
Thanks! That works.

https://raw.githubusercontent.com/realfinder/AVS-Stuff/Community/avs%202.5%20and%20up/Zs_RF_Shared.avsi

Stereodude
28th September 2022, 18:16
While I'm excited to finally have a high bit depth capable version of MCTD, I have to nitpick a bit. No newbie is ever going to get this version up and running chasing down all the right version of all the dependencies.

Also, how well tested is the high bit depth support?

Like I noticed the sharpening becomes less apparent the higher the bit depth. At 16 bits you can't even see it. At 8-bit it's very obvious.

kedautinh12
1st October 2022, 15:39
While I'm excited to finally have a high bit depth capable version of MCTD, I have to nitpick a bit. No newbie is ever going to get this version up and running chasing down all the right version of all the dependencies.

Also, how well tested is the high bit depth support?

Like I noticed the sharpening becomes less apparent the higher the bit depth. At 16 bits you can't even see it. At 8-bit it's very obvious.

Latest ver will fix it
https://github.com/Asd-g/AviSynthPlus-Scripts/blob/master/MCTD_.avsi

Stereodude
2nd October 2022, 22:12
Latest ver will fix it
https://github.com/Asd-g/AviSynthPlus-Scripts/blob/master/MCTD_.avsi
What was wrong with it and how did you fix it?

poisondeathray
2nd October 2022, 22:50
What was wrong with it and how did you fix it?

You can click on the "history" for the commits

https://github.com/Asd-g/AviSynthPlus-Scripts/commits/master/MCTD_.avsi

MCTD_.avsi: fix sharpening internal masks (high bit depth)

https://github.com/Asd-g/AviSynthPlus-Scripts/commit/50770c4732b50ba5ae7a148a486c69f12c8bd347

kedautinh12
3rd October 2022, 00:43
You can click on the "history" for the commits

https://github.com/Asd-g/AviSynthPlus-Scripts/commits/master/MCTD_.avsi

MCTD_.avsi: fix sharpening internal masks (high bit depth)

https://github.com/Asd-g/AviSynthPlus-Scripts/commit/50770c4732b50ba5ae7a148a486c69f12c8bd347

Or check changelog in script
https://github.com/Asd-g/AviSynthPlus-Scripts/blob/50770c4732b50ba5ae7a148a486c69f12c8bd347/MCTD_.avsi#L359

Stereodude
21st October 2022, 19:47
Or check changelog in script
https://github.com/Asd-g/AviSynthPlus-Scripts/blob/50770c4732b50ba5ae7a148a486c69f12c8bd347/MCTD_.avsi#L359
The directions in the latest mod 4.4 version aren't so clear to me and I admit I'm not the best at reading all the conditional statements in the script, so I may be wrong in my understanding here.

Why did you add internal multithreading to MCTD? What benefit does using prefetch internal to the filter vs. letting AVISynth+ do it after the filter with prefetch? I don't see any improvement from using it. I couldn't find a ncpu setting that gave a higher FPS than a prefetch() statement at the end of my script. Additionally, using the internal multithreading in MCTD prevents multithreading any filters in the script after MCTD (I think).

With a minimal script of a source, crop, converting to 16bits, & MCTD I got the best performance with ncpu=1 and prefetch(14). ncpu=-6 is the best value I found for the internal multithreading, but it is slightly slower.

ncpu=1 & prefetch(14):
AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3661, 3.7, x86_64) (3.7.2.0)

Number of frames: 1000
Length (hh:mm:ss.ms): 00:00:41.708
Frame width: 1920
Frame height: 804
Framerate: 23.976 (24000/1001)
Colorspace: YUV420P16

Frames processed: 1000 (0 - 999)
FPS (min | max | average): 0.609 | 117646 | 14.44
Process memory usage (max): 5315 MiB
Thread count: 47
CPU usage (average): 86.7%

Time (elapsed): 00:01:09.242

ncpu=-6 (prefetch(8) before MCTD / none after):
AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3661, 3.7, x86_64) (3.7.2.0)

Number of frames: 1000
Length (hh:mm:ss.ms): 00:00:41.708
Frame width: 1920
Frame height: 804
Framerate: 23.976 (24000/1001)
Colorspace: YUV420P16

Frames processed: 1000 (0 - 999)
FPS (min | max | average): 0.447 | 32.07 | 13.89
Process memory usage (max): 4514 MiB
Thread count: 87
CPU usage (average): 85.7%

Time (elapsed): 00:01:11.984

As soon as I added the neo_f3kdb processing after MCTD the gap between them widened.

ncpu=1 & prefetch(14):
AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3661, 3.7, x86_64) (3.7.2.0)

Number of frames: 1000
Length (hh:mm:ss.ms): 00:00:41.708
Frame width: 1920
Frame height: 804
Framerate: 23.976 (24000/1001)
Colorspace: YUV420P10

Frames processed: 1000 (0 - 999)
FPS (min | max | average): 0.315 | 357140 | 13.96
Process memory usage (max): 5913 MiB
Thread count: 52
CPU usage (average): 86.9%

Time (elapsed): 00:01:11.631

ncpu=-6 (prefetch(8) before MCTD / none after):
AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021
AviSynth+ 3.7.2 (r3661, 3.7, x86_64) (3.7.2.0)

Number of frames: 1000
Length (hh:mm:ss.ms): 00:00:41.708
Frame width: 1920
Frame height: 804
Framerate: 23.976 (24000/1001)
Colorspace: YUV420P10

Frames processed: 1000 (0 - 999)
FPS (min | max | average): 0.380 | 27.16 | 12.89
Process memory usage (max): 4636 MiB
Thread count: 98
CPU usage (average): 71.3%

Time (elapsed): 00:01:17.590

Also, I think the directions could use some tweaks

1) Explain that the default value of 1 disables internal multithreading? (I think this is true)

2) I think the instruction should say "Do not use prefetch() after MCTD if you have enabled internal multithreading." instead of what it says now.

3) Perhaps warn that a good starting value for ncpu is not the value they had been using in their subsequent prefetch statement. I do see it says to start at -2 and decrement by 2 until they find optimal performance, but I think many people will think they if they had been using prefetch(8) they should start with ncpu=-8. I get optimal performance with ncpu=-6 and prefetch(14) respectively.

Stereodude
22nd October 2022, 04:11
You can click on the "history" for the commits

https://github.com/Asd-g/AviSynthPlus-Scripts/commits/master/MCTD_.avsi

MCTD_.avsi: fix sharpening internal masks (high bit depth)

https://github.com/Asd-g/AviSynthPlus-Scripts/commit/50770c4732b50ba5ae7a148a486c69f12c8bd347
I admit to not really understanding what mt_lut does, but I don't understand how the new exponent value that x is raised to compensates for or factors into the bit-depth or how the new exponents values are arrived at to provide an equivalent level of sharpness at each bit depth. :confused: