Log in

View Full Version : New very slow FFT denoiser


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

SuperDuperDave
26th July 2007, 02:19
would the dll in ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw2.zip be compatible with this filter?

If that's the official build, it works for me. Just make sure you use the right DLL.

canuckerfan
26th July 2007, 03:37
well I was just curious because it is newer than the dll posted at: ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip

TheRyuu
26th July 2007, 05:34
well I was just curious because it is newer than the dll posted at: ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw.zip

They're basically the same. Read the readme that comes with the "newer" one.

Alessio didn't include gcc library file (*.a) with his distribution, so extra work was needed to use fftw3 with MinGW.

So only difference would be an added *.a file as far as I can tell.
Correct me if I'm wrong though. :)

BTW, I'm loving fft3dfilter. Just started to use it though. Playing around with all those settings. I'm finding it more powerful then the degrain median I was using. Although removegrain+vague denoiser I still use for extremely noisy animation sources.

SetMTMode almost doubles the speed of it (yay). :)

It is slow, but 15-20fps on a first pass isn't that slow is it? (I can hit about 9fps on the second pass).

Thanks Fizick for all your hard work on it.
:thanks:

grannyGeek
30th July 2007, 07:31
wizboy11, (or anybody who knows) please explain

SetMTMode almost doubles the speed of it (yay).

Where is this "SetMTMode " found?

thanks for any help.

Boulder
30th July 2007, 07:32
http://forum.doom9.org/showthread.php?t=94996

grannyGeek
30th July 2007, 08:48
Boulder, once again you come to my rescue!
Many thanks for the info --- maybe I will now be able to achieve better than 5 fps with my fft3d script :)

Fizick
22nd September 2007, 09:26
Hi Fizick. It's me Jeremy.
I started to use you FFT3DFILTER and I think it's very nice.
I looked at the link to FFTW in the readme and they have newer versions of FFTW than the 3.0 version in use now.

I'm hoping you can update the FFTW3.dll and your FFT3DFILTER so it uses the new FFTW3.dll :)

I'm know that FFT3DFILTER can be used in realtime in FFDshow, so that's why I want to see if it can get faster with the new FFTW, for realtime.

Here's the link: Link (http://www.fftw.org/release-notes.html)

Answer was written here:


New FFTW Version 3.1 is out http://www.fftw.org !

Download the Win32 binaries, extract libfftw3f-3.dll, rename it to fftw3.dll and replace the old one in the \windows\system32 folder.

Somehow it was a bit slower than the old binary (AthlonXP 3000+ / Barton core). Please post some of your benchmarks (can be done with benchf.exe from the archive)
...


FFFTFliter use dynamic linkage of FFT3W.DLL (with LoadLibrary), so it should work for all new versions of FFTW3 (until API is preserved).

Please test and report here

Demi9OD
22nd September 2007, 14:53
I found it to be slower by a couple of FPS as well. I get 67fps with whatever version is packaged with fft3dfilter (mpeg2source video analysis pass in vdub) and 65fps with this version.

Jeremy Duncan
23rd September 2007, 21:19
Will this setting include Temporal denoising, spatial denoising or both ?

FFT3DFILTER(sigma=0.6, ncpu=4, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)

I ask because in the read me, only bt=0 mentions temporal.

Fizick
23rd September 2007, 22:04
both.

Jeremy Duncan
4th October 2007, 02:16
One feature request.
I use fluxsmootht before fft3dfilter because I'm not happy with the temporal denoising strength of fft3dfilter using these settings:
FFT3DFILTER(sigma=0.6, ncpu=2, bw=14, bh=14, ow=7, oh=7, bt=2, dehalo=1, hr=1, sharpen=0.9)

Spatial denoising is fine though.

What would be nice is a setting that adjusts the temporal denoising, specifically.
Then i wouldn't need to use fluxsmootht. :)

Also, ncpu doesn't use the maximum avail cpu.

Fizick
5th October 2007, 05:07
What is "not happy" in technical language?

Dark Shikari
5th October 2007, 05:10
TTempSmooth is quite good for extra temporal denoising IMO :cool:

My favorite denoising script is:

MVAnalyze crap
MVflow/interleave crap, interleave 3 frames (one in each direction)

FFT3DFilter/GPU
TTempSmooth radius 1

selectevery, etc

TTempSmooth radius 7

Jeremy Duncan
5th October 2007, 20:25
What is "not happy" in technical language?

No FluxsmoothT
Picture of No FluxsmoothT (http://fileserver2.jpghosting.com/images/NoFluxsmoothT_01375d61cbbbf00e2e9572b3b4d969b1.JPG)

Using FluxsmoothT

Picture of FluxsmoothT (http://fileserver2.jpghosting.com/images/UsingFluxsmoothT_94b4785448701d3296811f0e605b983f.JPG)

Subtract

Picture of Subtract (http://fileserver2.jpghosting.com/images/Subtract_42c9a1ec5bb5d22f3d3ed6d192c1a585.JPG)


Unprocessed clip from Rapidshare (http://rapidshare.com/files/60508294/Tears_of_the_Sun_2.zip.html)
Unprocessed clip from Megaupload (http://www.megaupload.com/?d=O13C2XKP)

If you compare the pictures of No FluxsmoothT and Using FluxsmoothT, you'll see there is difference in the dark area on the right of the picture.
This difference flickers rapidly if I don't use fluxsmoothT(1).
So, then if fluxsmootht(1) fixes it, then the temporal denoising of FFT3DFILTER is just shy of the nessessary strength.
Which is why I asked for a temporal knob to turn to set the temporal denoising strength. :)

That difference in subtract is a result of noise flickering.
And I was wondering if tsp could help you tweak the ncpu so it uses the maximum cpu available. :)

Fizick
5th October 2007, 21:30
If you need in simple deflick, use fluxsmooth.
fft3dfilter has quite different algo than fluxsmoothT.
The "defilicking" strength of fft3dfilter is controlled by bt parameter. For bt=2 it is minimal. Did you try bt=5? ;)

(but may be there are some rounding semi-bug in fft3dfilter)

sorry for weak ncpu support. consider it as preliminary blind attempt. IMHO we must have official multi-cpu avisynth 2.6 at first. Make a present (core 2 duo) to IanB ! :)

Jeremy Duncan
6th October 2007, 13:59
"The "defilicking" strength of fft3dfilter is controlled by bt parameter. For bt=2 it is minimal. Did you try bt=5? " - Fizick

Does the BT also affect the spatial denoising too ?

Fizick
6th October 2007, 21:01
yes, of course.
It is spatio-temporal (really mixed, not by sequence) filter.

i am still think how to make variable temporal stength in fft3d....

Vesi
23rd October 2007, 16:31
Hi All!
i'm compeletly new to this filter, i read this thread a bit and fft3d documments.
Most of the time i do rips from DVD Movies to xvid and x264, and i want to know, what are the good and important settings, like to set light denoising and strong?
Like i used this script fft3dfilter(sigma=1.5, bt=3, bw=32, bh=32, ow=16, oh=16, sharpen=0.5)
for one test, and the result was good to me, but still wondering, did i chose the right parmeters or it is strong for New good locking DVD?
2.FFT3D Filter already has it's own sharpener, is it relay nesesery to use other sharpner, like seesaw or LSFwith FFT3D filter? and what are the differences between thes sharpners?

Sorry for bad English :)

Demi9OD
24th October 2007, 02:14
If you have a clean source .7-1.0 sigma is sufficient. Anywhere over 2.0 sigma is for strong noise. 1.5 is a happy median. Those parameters you have are good, I run something very similar real time for DVD playback. The sharpening in fft3d is also quite good, I personally don't think you need LSF or seesaw with fft3d. .4-.7 are good sharpen values, above that you start to get halo'ing, which I don't feel is handled well by fft3d's dehalo.

Vesi
24th October 2007, 10:48
Demi9OD thanks for the replay.
what bt=1-5 do? and which one is recommended?
if i get halo'ing, which filter you recommend?

Demi9OD
25th October 2007, 20:57
The higher the bt, the more frames it uses to detect noise. I like using bt=3, and don't see personally see the benefit of going higher, but I am sure there is some, at the cost of speed.

dehalo_alpha does a great job of removing Halos, but it is processor intensive as well. This is my realtime script, I would use higher bw/bt/ow/oh for encoding, but I can manage this on my quadcore at 3.1ghz.

MT("FFT3DFILTER(sigma=1.5,bw=16,bh=16,bt=3, sharpen=1).dehalo_alpha(darkstr=.3).gradfun2db()",6,2)
aWarpSharp(depth=20, blurlevel=2, thresh=0.21, cm=0)

I strongly recommend against using a sharpen as strong as 1 without a dehalo afterwards.

Vesi
24th November 2007, 22:25
nOOb question ;
I have tried to uderstand, but I couldn't.
ow - overlap width (default=bw/3 since v.1.2)
oh - overlap height (default=bh/3 since v.1.2)

as for bw and bh the default values are 48.
What are default values for ow and oh? is it 3? or i got it wrong.
how to use them in strong denoising and in light?
show them in two defrint script "strong and light", well be great and easy to understand. thanks

Dark Shikari
24th November 2007, 22:32
nOOb question ;
I have tried to uderstand, but I couldn't.
ow - overlap width (default=bw/3 since v.1.2)
oh - overlap height (default=bh/3 since v.1.2)

as for bw and bh the default values are 48.
What are default values for ow and oh? is it 3? or i got it wrong.
how to use them in strong denoising and in light?
show them in two defrint script "strong and light", well be great and easy to understand. thanks
bw = 48
bw / 3 = 48 / 3 = 16

Vesi
24th November 2007, 23:16
thanks Dark Shikari for the Quick answer.
what are the good values for the "bw & bh" and "ow & oh" for light and strong denoising?

Dark Shikari
24th November 2007, 23:23
thanks Dark Shikari for the Quick answer.
what are the good values for the "bw & bh" and "ow & oh" for light and strong denoising?Leave them as they are.

Spuds
25th November 2007, 00:43
what are the good values for the "bw & bh" and "ow & oh" for light and strong denoising?

Before you play with the block sizes and overlap start with changing the sigma value which is the denoising strength. Generally apply a higher sigma to plane 0 (luma) and lesser to plane 4 (color).

talen9
25th November 2007, 02:19
Before you play with the block sizes and overlap start with changing the sigma value which is the denoising strength. Generally apply a higher sigma to plane 0 (luma) and lesser to plane 4 (color).

Sorry Spuds ... IIRC, that was the other way around. That is, it's possible to apply a higher sigma to the color planes than to the luma ones, because the eye is more sensible to luminosity variations than to chroma ones ... am I mistaken? :confused:


EDIT: in the examples given in the documentation, chroma's sigma is actually always slightly higher than luma's ...

Dark Shikari
25th November 2007, 04:44
Sorry Spuds ... IIRC, that was the other way around. That is, it's possible to apply a higher sigma to the color planes than to the luma ones, because the eye is more sensible to luminosity variations than to chroma ones ... am I mistaken? :confused:


EDIT: in the examples given in the documentation, chroma's sigma is actually always slightly higher than luma's ...But in most film footage (not low-quality camera footage, but real film), most of the noise is in luma, not chroma--so even while you'll notice chroma artifacting less, most of the noise is in luma anyways.

talen9
25th November 2007, 15:12
Hmmm ... true :)

Anyway, I suppose that it depends on what is the target of the denoising action.
If it is to improve the visual quality of the clip, then it is correct not to denoise too much the chroma planes ('cause you won't get much visual improvement).
Then again, if you're bitrate-wise hungry, one could slightly force the denoising on chroma without worsening too much the quality, right?

Even if, i must tell the truth, in doing so i started to notice some blocking, especially when the output is to be encoded by x264 ...

Spuds
25th November 2007, 18:29
I should know better then to make generalized statements ! I now want to update my previous generalization with this paradoxical one instead .. Generally no two video clips are the same so no generalizations should be made.

Great Dragon
10th January 2008, 14:59
I've receive an ugly color gradient after filter processing (on wall)
Original:
http://img141.imageshack.us/img141/5584/172497originalnk5.th.jpg (http://img141.imageshack.us/my.php?image=172497originalnk5.jpg)
Filtered:
http://img140.imageshack.us/img140/5185/172497fft3dle9.th.jpg (http://img140.imageshack.us/my.php?image=172497fft3dle9.jpg)

How can i fix it or avoid it...?

mpeg2source("D:\DVD\MainMovie\XMEN2 DISC1\VTS_01_1.d2v", idct=5, cpu2="ooooxx")
Colormatrix(mode="Rec.709->Rec.601")
FFT3DFilter(sigma=2, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4)

tsp
10th January 2008, 17:34
great dragon: read this thread: http://forum.doom9.org/showthread.php?t=132791 for a fix

Great Dragon
11th January 2008, 16:43
tsp
Thanx for advice but gradient is to strong.
I've also try gradfun2db filter but it makes picture even worse :(

tsp
11th January 2008, 19:21
FFT3DFilter(sigma=2,sigma2=0.1,sigma3=0.5,sigma4=1, bt=5, bw=32, bh=32, ow=16, oh=16, plane=4)
or try lowering sigma2 or sigma3 even more. You can see the gradient because you filter out all the grain that are hiding it.

anonova
17th April 2008, 13:30
I've been using dfftest for a while, and fft3dfilter seems to be much faster alternative. Though when I try it, why does it produce much darker results? I thought it was because I was using plane=4, but dfftest filters all three planes by default and does not darken the image.

Also, what is the difference between increasing the overlap and block widths versus increasing just the sigma?

thetoof
17th April 2008, 16:17
much darker results

Could you post some screenshots? It's easier to see images than try to figure out what "much darker" is ;)

I've been using both for a while and I've never seen what you described...

edit: about block size and sigma: too big or too small = miss some noise, sigma=strenght of the filter. One is how the analysis is done and the other is how the filter acts based on that analysis. (well... if I'm not mistaken :p)

anonova
17th April 2008, 21:07
Could you post some screenshots? It's easier to see images than try to figure out what "much darker" is ;)
I suppose me saying much was exaggerated, but it does produce a darker image. I noticed it when I was flipping through tabs on AvsP.

source (http://img236.imageshack.us/img236/5518/sourcekw1.png)
dfftest (http://img236.imageshack.us/img236/6931/dfftestdr5.png)
dfttest(sigma=.42, tbsize=3)
fft3dfilter (http://img247.imageshack.us/img247/183/fft3dfj7.png)
fft3dfilter(sigma=1, plane=4)

edit: about block size and sigma: too big or too small = miss some noise, sigma=strenght of the filter. One is how the analysis is done and the other is how the filter acts based on that analysis. (well... if I'm not mistaken :p)
I wonder wondering because fft3dfilter(sigma=1, plane=4) and fft3dfilter(sigma=.73, bw=32, bh=32, ow=16, oh=16, plane=4) produce strikingly similar results with the former being faster.

thetoof
17th April 2008, 22:23
True... small difference, but negligible imo.

32/16 is more accurate than the defaults, so I think that's why less strenght is needed to achieve similar results.

Dragon4333
24th April 2008, 03:32
can anyone help me get this filter to work with windows 64 bit os.

Dragon4333
24th April 2008, 11:27
never mind i got it to work by using the loaddll filter.

Terranigma
23rd May 2008, 02:01
Fizick, any chance we can get fft3dfilter with bt up to 9, so that we can use the bt parameter with 4 forward/backward frames properly?

Fizick
23rd May 2008, 18:09
IMO It is not useful.

Terranigma
23rd May 2008, 18:55
IMO It is not useful.

Well I thought i'd ask. Just in case someone would want to use fft3d with 3 frames in a similar fashion to mvdegrain3, or go one step beyond and use 4 frames.

thetoof
24th May 2008, 01:12
From what I tried, using a LOT of frames with a frequency based denoiser doesn't help much. Having a tbsize superior to 5 in dfttest didn't help (and results were even worse than 5), so I don't think it should be implemented in fft3dfilter.

Terranigma
24th May 2008, 04:18
From what I tried, using a LOT of frames with a frequency based denoiser doesn't help much. Having a tbsize superior to 5 in dfttest didn't help (and results were even worse than 5), so I don't think it should be implemented in fft3dfilter.

OK, then since you guys feel strongly about this, then ignore my request here. But what do you think about my request in the mvtools thread, to implement MVDegrain4 instead of us having to resort to a much slower scripted version? :)

thetoof
24th May 2008, 06:51
That may be nice... it all depends on the visual/compression improvement it leads to. ;)

Didée
24th May 2008, 09:19
... to implement MVDegrain4 instead of us having to resort to a much slower scripted version? :)
Slower? Why slower, and why much?

Simulating MVDegrain3 with Merge(MVDegrain2,MVDegrain1), it shows that both are running at about the same speed.
(Actually, the Merge-version even seems to run a tad faster!)

Thus, you can't really argue about speed.:) If at all, you've to argue about precision, which is lower in the Merge-version, due to rounding. (Mostly +/-1 in the end, the world breaks apart...)


Edit: Example framework posted here (http://forum.doom9.org/showthread.php?p=1141506#post1141506).

Terranigma
24th May 2008, 14:23
Slower? Why slower, and why much?

Simulating MVDegrain3 with Merge(MVDegrain2,MVDegrain1), it shows that both are running at about the same speed.
(Actually, the Merge-version even seems to run a tad faster!)

Thus, you can't really argue about speed.:) If at all, you've to argue about precision, which is lower in the Merge-version, due to rounding. (Mostly +/-1 in the end, the world breaks apart...)


Well for me, a scripted mvdegrain3 with the correct weightings was around, 1.5fps slower than the actual filter by Fizick.

I don't know why, but it was, and yes I agree, precision is important. :)

egrimisu
25th June 2008, 19:26
When i use fft3dfilter with the default settings the cleaning i great but i get so mind of trails especiali if i have a vertical line that moves from left to right.

Adub
25th June 2008, 19:45
Eh, what?

What is a "mind of trails"? Please try and restate your intention.