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
foxyshadis
28th January 2007, 01:48
!!! I didn't realize you could do decimal that way. Silly me. I'll steal your syntax, if you don't mind.
digitalone
29th January 2007, 07:35
@Anaqim: i need to tweak my script a bit in that case. FFT3DGPU won't work for me as i don't have required graphics card.
I think the best thing to do is to load up AVSp and play with levels (or curves if you're adventurous) until you find something satisfying. I don't really have a clue what the proper levels should be, I just go with what looks decent if I'm ever in need.
Levels([<"Min",0,255,0>],[<"gamma", 0.1, 10, 1.00>],[<"Max",0,255,255>],0,255,false)
You can't play with gamma through a slider yet, because it can't do fractional sliders, but feel free to try moving it.
thx foxyshadis. will play with da function. sorry, but where can i find AVSp? is it some GUI? :o
foxyshadis
29th January 2007, 11:33
Sorry, I'm not linking stuff as often as I used to. It'd come right up in a search, though.
AVSp thread (http://forum.doom9.org/showthread.php?t=115506)
anaqim
29th January 2007, 13:14
Just use FFT3DFILTER with the same settings and you'll get the same result. It uses your CPU instead.
Anaqim
digitalone
30th January 2007, 05:19
@foxyshadis: thx mate. simply awesome utility.
@anaqim: yup...results are good with fast encoding speed.
Bankis
5th February 2007, 21:48
Fizick, want to ask about sigma values to get better compressability. What values should I use for that - 0.5, 1 or others for really clean video (DVD)? are other fft3d parameters to achieve bigger compressability, but not sacrifying (visual) quality?
As I understand, bt=4 mode increases processing time, but also should increase quality (better noise filtering)?
HeadBangeR77
5th February 2007, 23:44
Fizick, want to ask about sigma values to get better compressability. What values should I use for that - 0.5, 1 or others for really clean video (DVD)? are other fft3d parameters to achieve bigger compressability, but not sacrifying (visual) quality?
As I understand, bt=4 mode increases processing time, but also should increase quality (better noise filtering)?
I'm not Fizick himself (:p), but I usually use sigma=0.5-0.7; at 1.0 I've seen some details degradation already. You could also use plane=4 to filter luma and both chroma planes at the same time, which would result in a tad better compressability. The rest at default.
cheers.
EDIT: If you don't mind loosing filmgrain (or most of it) - I don't know your source or your personal preferations - you could also do some more middle-low frequencies filtering without loosing details. For instance:
fft3dgpu(sigma=0.5,bt=3,plane=0,mode=1,degrid=1.0,sigma2=0.6,sigma3=0.7,sigma4=0.8)
fft3dgpu(sigma=0.5,bt=3,plane=3,mode=1,degrid=1.0,sigma2=0.6,sigma3=0.7,sigma4=0.8)
PS. There's a bug in fft3dgpu, that results in the above script being faster than just pure "plane=4". I don't think it affects fft3dfilter though.
HeadBangeR77
13th February 2007, 17:30
I've tested the de-halo function quickly, but I didn't have an appropriate comparison background, so don't take it too seriously. ;) I'm gonna post some screenshots and describe some experiences later on, this night hopefully.
To be updated
HeadBangeR77
15th February 2007, 02:50
Finally I've managed to encode some samples and take some screenshots. I'm not comparing the embedded de-halo function with Didee's scripts (like BlindDeHalo3 or DeHaloAlpha), since I've got very limited experience with those functions. I can only judge on the end effect in comparison with normal and sharpened encodes. My crappy beloved source (shrunk "Black Pearl" DVD) seemed useful for this task ;), since it suffers from some edges enhancement already before sharpening.
1) The first sample, just cropped and resized (nothing more!) - 163MB.
After deblocking and sharpening (LSF + Soothe) - 196MB (I don't include screenshots of this one).
2) The second sample (deblocking, very light denoising, and sharpening) - 184MB.
fft3dfilter(sigma=0.5, plane=3)
fft3dfilter(sigma=0.5, plane=0)
3) The last sample (deblocking, very light denoising with default de-halo values, and sharpening) - 179MB.
fft3dfilter(sigma=0.5, plane=3)
fft3dfilter(sigma=0.5, plane=0, dehalo=1.0, hr=2.0, ht=50)
...screenshots... (http://rapidshare.com/files/16509190/DeHalo.rar)
I couldn't see any details washed away, neither while watching nor while comparing still frames. Some nasty enhanced edges + some textures were darkened (or brightened sometimes) and sort of softened, yet without loosing any details I could spot. Some effects of LSF were undone, though the image remained sharper than the original encode with no filters at all. I must admit I like the end effect - seems more natural than the first two samples. Two examples beneath:
1) http://www.hidebehind.com/thumbs3/7E18F8.png (http://www.hidebehind.com/7E18F8)
2) http://www.hidebehind.com/thumbs3/AE5C2C12.png (http://www.hidebehind.com/AE5C2C12)
3) http://www.hidebehind.com/thumbs3/8266C41F.png (http://www.hidebehind.com/8266C41F)
1) http://www.hidebehind.com/thumbs3/7211839E.png (http://www.hidebehind.com/7211839E)
2) http://www.hidebehind.com/thumbs3/39D42BD.png (http://www.hidebehind.com/39D42BD)
3) http://www.hidebehind.com/thumbs3/EC6C5436.png (http://www.hidebehind.com/EC6C5436)
cheers,
HDBR77
PS. Some ghosting (hard to say if it came from sharpening or from de-halo) can be undone with BlindDeHalo3(PPmode=-3).
Blue_MiSfit
15th February 2007, 15:50
I really like running fft3dfilter/gpu in two instances, one with stronger chroma denoising and one with gentle luma denoising and adding sharpening. I've found that it increases compressibility and image quality at the same time for most sources.
This filter is probably the best chroma denoiser I've ever worked with. Not that I'm an expert or anything..
~MiSfit
Chainmax
16th February 2007, 03:26
I notice that many people prefer to use bt=3 instead of bt=5, why is that?
HeadBangeR77
16th February 2007, 17:19
@ B.MiSfit
I'm no expert at all, but I agree with you. :)
Though in the above sample-case I wanted to keep the grain, so I did a very gentle denoising. De-halo function was my main goal - to see how it works.
@ Chainmax
Most probably from speed reasons. I rarely do any strong denoising, so with values of sigma about 0.5-1.0 I don't think anything can go wrong with bt=3 in terms of accuracy of filtering.
cheers,
HDBR77
HeadBangeR77
19th February 2007, 01:03
@ Fizick:
Since I've noticed you around in some other threads, could you elaborate more on some de-halo settings of your fft3dfilter? As stated above, it basically works very well (at least to my eyes) with default values. Yet some tweaking gave a headache, and the documentation is poor.
Is "dehalo" either enabled (1) or disabled (0) or could it work with some other values, 'cause I can't see any strength settings, just the threshold?
Lowering the threshold setting gave me a bit larger file-sizes while rising a bit smaller. I couldn't see any difference however, even while staring at still frames. Is it supposed to work this way? :confused:
And thanks very much for your work on the filter - appreciated. :)
cheers,
HDBR77
foxyshadis
19th February 2007, 02:24
I notice that many people prefer to use bt=3 instead of bt=5, why is that?
Also, besides the speed: Without any compensation, the further away frames are the less correlation each block has to its counterpart. And if you go through the trouble to invent some map of what matches close enough, so mostly static scenes still get the benefit, you might as well just compensate it anyway. The analysis is a large portion of the time taken.
Fizick
19th February 2007, 06:32
From the offline doc:
dehalo - halo removal strength (float>0, default=50)
It is wrong. :) I fixed doc. Default = 0.0
so you may use 0.0 or 0.1 or 0.5 or 1.0, or 2.5.
Recommended value is about 1.0 for weak dehalo
foxyshadis
19th February 2007, 07:57
My own dehalo question, since I couldn't figure it out from the source - what frequency ranges does it work on? Huge halos, subpixel halos? How exactly does it find them, and how much chance is there of artifacts? Is there any suggested way to tune the parameter, besides trying lots of values and staring really hard?
HeadBangeR77
19th February 2007, 12:17
From the offline doc:
dehalo - halo removal strength (float>0, default=50)
It is wrong. :) I fixed doc. Default = 0.0
I already knew it was wrong, since someone had written that in this thread. I was just wondering if this parameter could work as some kind of strength setting, and ...
so you may use 0.0 or 0.1 or 0.5 or 1.0, or 2.5.
Recommended value is about 1.0 for weak dehalo
This is the answer I was waiting for. :)
Thanks very much for the quick reply. Now I'm ready to tweak and test more. ;)
@ foxyshadis:
I'm almost a complete newbie as to halos-removal, yet I've marked it changes a lot: from the colour of a shirt, through some smaller edges (look at the barrel in the background of the first screenshots) to a thin hair swinging in the air. This with the default values.
I've made a mistake as to the threshold. With the default value of 50 I had smaller files than with e.g. ht=80. So the lower the threshold the more halos are removed, most probably more subtle ones (just a guess, since I couldn't spot differences).
cheers,
HDBR77
PS. As to artefacts, I could see some ghosting, most probably from the poor source and additional sharpening, yet they were just a bit more noticeable with denoising + de-halo + sharpening than without de-halo (the rest of the filter-chain remained the same). BlinDeHalo3 PP is good at fighting the problem, but sometimes it's got a weird darkening effect on small things like eye's iris. :confused:
Fizick
19th February 2007, 18:49
For dehaloing I use some frequecy window with max around 1/hr, small at low and high frequencies.
hr is halo radius (in pixels).
I am not sure, that the formula is optimal. But it works somehow :)
But general rule: do not overdenoise, do not oversharp, do not overdehals.
HeadBangeR77
19th February 2007, 23:34
For dehaloing I use some frequecy window with max around 1/hr, small at low and high frequencies.
hr is halo radius (in pixels).
I am not sure, that the formula is optimal. But it works somehow :)
But general rule: do not overdenoise, do not oversharp, do not overdehals.
I try to stick to the rule, you must have noticed on the basis of my fft3dfilter's parameters. ;)
I don't care how it works (some guys here are probably very interested in the matter), as long as it works, and, I must admit, I haven't seen any details removed with your default de-halo values. And I suffer enormously if I have to compromise between a certain details' loss and removing artefacts or any other unwanted stuff.
Just one remark/question, and I'm gonna leave you in peace (:D): I've noticed a bit more ghosting (or gentle ringing) with de-halo enabled (the rest of my scripts were exactly the same). Is there any way to get rid of this?
cheers,
HDBR77
Fizick
20th February 2007, 01:36
dehalo is pure spatial. It is applied after denoising.
HeadBangeR77
20th February 2007, 02:35
Must have been one step too far with all those edges operations (Deblock-QED, De-Halo, LSF). ;)
I will risk doing the things the other way round and put BlindDeHalo3 PP before fft3dfilter. It does wonders when applied before sharpening, and works much worse after sharpening, most probably because of some ringing/ghosting in the source, that could be eliminated before LSF, and after LSF the artefacts are simply too strong. Never mind. ;)
cheers and thanks again for clarifying. :)
Fizick
21st February 2007, 14:36
released new version 2.1.1 - February 20, 2007 - fixed bug with bw not mod 4 (restored v1.9.2 method, thanks to JKinG for report).
HeadBangeR77
22nd February 2007, 03:04
Thanks very much!
Btw. De-halo works like charm, shame I don't have enough time to compare it against Didee's scripts, but "my need was dire, and the time was short". ;)
Keepitsimple
6th March 2007, 21:36
can this script be run in real time?
708145
7th March 2007, 13:25
can this script be run in real time?
Yes, if you use a cluster encoder like x264farm or ELDER. ;)
netrex
20th March 2007, 08:20
I only get this message:
FFT3DFilter: Can not load FFTW3.DLL!
(info about where the error is)
When I add FFT3.DLL I get the message:
fftw3.dll is not an AviSynth 2.5 plugin.
I get this using versions 1.8.5, 1.9.1 and 2.1.1. And I have AviSynth 2.5.7 installed. I got the same with 2.5.6 as well.
Maybe I have the wrong version of fftw3.dll?
:stupid:
I realized that the fftw3.dll file had to go in my system32 folder :P NOT the AviSynth\plugins folder :) So now it works like I had it before.
Thanks again for this wonderfull tool :thanks:
Boulder
20th March 2007, 08:23
Did you put the file in your Windows\System32 directory? And don't load it in your script, it is automatically used if it's in the correct place.
netrex
20th March 2007, 08:26
Did you put the file in your Windows\System32 directory? And don't load it in your script, it is automatically used if it's in the correct place.
I just edited my previous post as you posted this :) Thansk still though :)
superuser
10th April 2007, 22:37
did not notice fizick had newer version of fft3d out. will give it a try. thnxs fizick for ur efforts :thumbup:
turstar
15th April 2007, 18:45
Script error!
Import("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\LimitedSharpen.avs")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\undot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\WarpSharp.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\colormatrix.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\fft3dfilter.dll")
mpeg2source("D:\DVD\RAISING_CAIN\VIDEO_TS\VTS_01_5.gk.d2v")
crop(4,16,712,546)
LanczosResize(704,384)
FFT3dFilter(sigma=2.0, plane=0, bt=-1, bh=32 ,bw=32, measure=false, sharpen=0.5)
LimitedSharpen( ss_x=1.5, ss_y=1.5,
\ Smode=3, strength=40, radius=2,
\ Lmode=1, wide=false, overshoot=1,
\ soft=false, edgemode=0, special=false,
\ exborder=0 )
UnDot()
ColorMatrix()
http://img160.imageshack.us/img160/1439/aaaaaaadu0.jpg
problems ???
Fizick
15th April 2007, 21:51
Tamam
steve77
17th June 2007, 22:02
Hey,
I've just installed Windows Vista and have restored my collection of filters.
However, for some strange reason, FFT3DFilter is actually going MUCH faster than it used to in XP!
Mpeg2Source("TV.d2v")
Lanczos4Resize(720,400)
FFT3DFilter(sigma=2,bw=32,bh=32,ow=16,oh=16)
Using the following settings in MeGUI:
--pass 1 --bitrate 1427 --stats "D:\Feed.stats" --ref 5 --mixed-refs --no-fast-pskip --bframes 3 --b-pyramid --bime --weightb --filter -1,-1 --trellis 1 --analyse all --8x8dct --me umh --merange 24 --threads 2 --thread-input --progress --no-dct-decimate --no-psnr --no-ssim --output NUL "D:\Feed.avs"
successfully started encoding
Is yielding me nearly 10FPS!
I made sure the filter was working by using the "#" in front of the FFT3DFilter line, and comparing some frames with or without FFT3DFilter.
I'm running a core 2 duo E6300 @ 2.4GHz... but in XP it would be about 1FPS, not 10x that!
Any insight? If you need more info, I'll gladly post what I can.
ficofico
17th June 2007, 22:09
maybe you have forget bt=5
grannyGeek
20th June 2007, 02:27
Could someone post Fizick's newest FFT3d version 2.5 to RapidShare or some other file-hosting site?
Pretty Please?
I've been trying several times a day for a week to access Fizick's site to get the filter, and always get Network Error (tcp_error)
(it might be our corporate firewall that blocks me.)
I will be most grateful for any assistance. I'm hoping the new version will fix my dehalo call glitch that I posted about on anot6her thread.
:thanks:
Boulder
20th June 2007, 03:31
Here's the latest version (v2.1.1):
http://www.savefile.com/files/824261
superuser
20th June 2007, 04:29
^ i also went to check out for fft3d 2.5.* and found 2.1.1 was the latest (which m using happily for more than past 2 months :) ) ... though I m able to access the fizicks site where he hosts all the filters.
had question for Fizick: in 2.0.0 rev you had included internal MC and in 2.1.0 you had temporarily removed it. Is inbuilt MC feature going to be supported in your upcoming release?
Fizick
20th June 2007, 14:28
What upcoming release? I have no any plan for it.
Attemt of internal MC was not ver good (many artefactes)
superuser
22nd June 2007, 05:49
^ thnxs for the feeback.
by upcoming release I meant one of the next fft3d releases, whenever u plan to release it.
was the MC idea in fft3d which u had previously on similar lines what you and Manao have implemented in MVTools? Currently I use fft3d as external denoiser with MC (mvtools) and it works gr8 for me ... is internal MC one of the features you will be working on for upcoming releases, not immediate ones but sometime in future whenever u feel it is appropriate time to work on.
Fizick
22nd June 2007, 15:19
no, i tried to use phase shift method for MC
superuser
23rd June 2007, 05:13
^ oh k .... thnxs ...
grannyGeek
25th June 2007, 03:19
@ boulder -
Thank you so much for the dl link.
Using the new version now, very nice.
Sadly, doesn't fix my "lock-up with multiple dehalo calls", but that's ok.
fjhdavid
12th July 2007, 09:20
Dear all,
Thanks for this great filter!
I use it a lot
after reading the documentation I am still asking a question:
what are the default settings for bw,bh,ow and oh in the last fft3dfilter version?
thanks
Francois
Boulder
12th July 2007, 09:25
They are explained in the Function parameters section in the docs..
fjhdavid
12th July 2007, 09:57
yes but it changes many times and I just would like to be sure
I think it is (last release): bw=bh=32 and ow=oh=16
could you confirm please?
thanks
Boulder
12th July 2007, 10:14
Straight from http://avisynth.org.ru/fft3dfilter/fft3dfilter.html:
bw - block width (integer, default = 48 since v.1.2)
bh - block height (integer, default = 48 since v.1.2)
ow - overlap width (default=bw/3 since v.1.2)
oh - overlap height (default=bh/3 since v.1.2)
fjhdavid
12th July 2007, 10:53
no in the change log it said that since version 1.9.2 (11 september 2006)
"changed default bw=bh=32"
but nothing about oh and ow, so if they stay unchanged to bw/3 and bh/3, there is a problem as 32 is not a multiple of 3
so this is why I post this question.
thanks for your help.
Boulder
12th July 2007, 10:59
Oh, I see that Fizick hasn't updated the actual documentation but the changes are only in the change log. In v2.1.1 it says that "fixed bug with bw not mod 4 (restored v1.9.2 method, thanks to JKinG for report)". Whatever that means..
fjhdavid
12th July 2007, 11:13
so what does it means?
fjhdavid
13th July 2007, 13:05
dear all,
I saw in the documentation that sigma for dvd should be between 1.5 and 2.5 with a default value of 2. For analogue record a sigma of 3 and above is better.
Does somebody has used this filter for DVD which was recording from a digital satellite with an analogue conversion between.
Which value of sigma did you use then?
thanks
Francois
canuckerfan
25th July 2007, 20:35
would the dll in ftp://ftp.fftw.org/pub/fftw/fftw3win32mingw2.zip be compatible with this filter?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.