Log in

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


Pages : 1 2 3 [4] 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

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