Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th June 2012, 02:26 | #821 | Link |
Registered User
Join Date: Nov 2011
Posts: 63
|
This sample script should give a (approximately) Wiener only temporal filter:
Code:
avisource("") clp=last fq=fft3dfilter(sigma=6,bt=1,plane=0)#Use current frame data only ft= fft3dfilter(sigma=6,bt=5,plane=0)#bt= 2...5 difffq=mt_makediff(clp,fq,y=3,u=2,v=2)#only luma is filtered then u=v=2 tmp=mt_adddiff(ft,difffq,y=3,u=2,v=2)#but this remove the filtering on current frame too return tmp Last edited by librarian; 24th June 2012 at 02:58. |
20th March 2013, 07:19 | #823 | Link |
Warm and fuzzy
Join Date: Apr 2010
Location: Moscow, Russia
Posts: 201
|
There are some questions to you.
. There is a function RemoveGrain(mode=17) . . Could I use function FFT3dFilter(...) instead of function RemoveGrain(mode=17) to achive equal result of function RemoveGrain(mode=17) (result FF3dFilter(...) = result RemoveGrain(mode=17)) ? Which parameters and values of those parameters could I use in function FFT3dFilter(...) to achive this result ? . . There are another similar questions. . There is a function RemoveGrain(mode=1) . There is a function RemoveGrain(mode=2) . There is a function RemoveGrain(mode=3) . There is a function RemoveGrain(mode=5) . . result FF3dFilter( ??? ) = result RemoveGrain(mode=1) ? Parameters and values of those parameters to function FFT3dFiler() in this case ? . result FF3dFilter( ??? ) = result RemoveGrain(mode=2) ? Parameters and values of those parameters to function FFT3dFiler() in this case ? . result FF3dFilter( ??? ) = result RemoveGrain(mode=3) ? Parameters and values of those parameters to function FFT3dFiler() in this case ? . result FF3dFilter( ??? ) = result RemoveGrain(mode=5) ? Parameters and values of those parameters to function FFT3dFiler() in this case ? . FFT3dFilter( ??? ) similar to and another "mode=" of RemoveGrain() function ? mode=7 mode=9 mode=11 mode=19 . Thanks. .
__________________
Warm and fuzzy (white and fluffy) Last edited by Jenyok; 20th March 2013 at 08:37. |
21st January 2017, 20:58 | #825 | Link |
Registered User
Join Date: Apr 2009
Location: Rijeka, Croatia
Posts: 10
|
Sorry for necrobumping like this but plugin documentation points to this thread and I wanted to share some insight that might be helpful to new users (if there are any) in setting it up.
This is an excellent denoiser and my no. 1 choice for a long time now. It used to be painfully slow if you wanted to squeeze the most out of it but on today's powerful CPUs it performs ok. I mainly wanted to comment on default/recommended values vs what I use. - Documentation suggests sigma=1.5-2.5 for digital sources and 3 or more for analog. If detail retention is a priority, my recommendation is not to go above 2, unless you're encoding at low bitrate in which case fine detail is gone anyhow and stronger denoising will help compressibility. I normally use 1.5; it removes a substantial amount of noise without compromising on quality. - Chroma planes tolerate much stronger denoising than luma so it's a good idea to process them separately. sigma=1.5, plane=0 (luma) + sigma=3, plane=3 (chroma) will be visually indistinguishable from sigma=1.5, plane=4 (all) but it will compress better. If you're afraid it doubles the time required because you need to apply FFT3DFilter twice, don't worry, it takes the same. - Suggested optimal block size/overlap is bw,bh=32, ow,oh=16. This was written years ago with tolerable speed in mind, I presume. With a modern CPU, use bw,bh=16, ow,oh=8. It produces superior results. - For 3D Wiener, bt=5 is suggested as best. This is actually the main thing that made me write this post, because I've always been using bt=5 and only today did I do some proper experimenting with this value. After quite a bit of testing, one thing I can objectively say is that bt=5, compared to default bt=3, consistently produces frames that are slightly less compressible. This means it washes out less data, but what is the nature of it in terms of noise/detail? Visual inspection of frames revealed no difference in most cases, and where there was a visible difference, quality seemed to be on the side of bt=3, surprisingly. So my conlusion is that bt=5 actually has slightly worse noise/detail removal ratio. Even if I'm wrong on this, perceptible difference really is insignificant, and considering that bt=5 comes with a pretty massive speed penalty, I say stick with the default. - On multicore, be sure to set the ncpu= param, you'll get a decent speed boost. tl;dr - my "best" settings: FFT3DFilter(sigma=1.5, plane=0, bw=16, bh=16, ow=8, oh=8, ncpu=x) FFT3DFilter(sigma=3, plane=3, bw=16, bh=16, ow=8, oh=8, ncpu=x) Finally, use the ICL build by Groucho2004 - it's faster and there's also a 64-bit build for AviSynth+. To use both versions on Win64 (I use 32-bit for scripting/preview in VirtualDub and 64-bit for final encoding) you also need both libfftw3f-3.dll versions from fftw.org. Renamed to fftw3.dll, 64-bit dll goes to Windows\System32 and 32-bit dll goes to Windows\SysWOW64. |
21st January 2017, 23:33 | #827 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 22nd January 2017 at 15:04. |
|
22nd January 2017, 09:59 | #828 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
Some better options: Motion Compensation (MDeGrain) NLMeans (KNLMeansCL, TNLMeans) BM3D (available in vaporsynth) |
|
22nd January 2017, 18:48 | #829 | Link |
Registered User
Join Date: Apr 2009
Location: Rijeka, Croatia
Posts: 10
|
DFTTest is marginally better but much slower. TNLMeans is better but much, much, much slower. When you enable temporal (it's not nearly as good without it) it goes from unacceptably slow to 48hrs./encode slow. KNLMeansCL should be faster but I'm without a discrete GPU at the moment and apparently it lacks temporal mode. I wanted to give MDeGrain a go but it seems I'd have to do some digging through forum just to piece together the right plugin and dependencies that have different versions and mods of their own. I also don't feel like getting into VaporSynth because there's nothing I really need but don't get from AviSynth(+), which I'm accustomed to, so no BM3D for me. I will test KNLMeansCL and if turns out to be a spectacular performance improvement over TNLMeans while offering same quality, I'll gladly go with that. Right now I don't see anything offering me the kind of quality vs speed balance that FFT3D does.
|
22nd January 2017, 19:08 | #830 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
KNLMeansCL is a 3D NLMeans filter, the "d" parameter is the temporal radius for NLMeans. Last edited by feisty2; 22nd January 2017 at 19:15. |
|
23rd January 2017, 00:23 | #832 | Link | |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,691
|
Yeah, the FFT3DFilter bashing seems to be totally out of place, not only because this is the main support thread for the plugin, but also because there are still situations where it is quite useful (e.g., as a pre-filter to create an estimation clip).
As for this quote: Quote:
Last edited by johnmeyer; 23rd January 2017 at 00:24. Reason: Hit Save instead of Preview and still had more editing to do |
|
23rd January 2017, 03:23 | #834 | Link |
Registered User
Join Date: Apr 2009
Location: Rijeka, Croatia
Posts: 10
|
@johnmeyer Thanks, if you have a convenient MDeGrain setup package I'll try it out, but to be honest you probably shouldn't bother because somehow I think I'll be sticking with FFT3DFilter for the time being.
I feel I should explain my rationale and why I'm satisfied with FFT3DFilter. If I denoise, I do so to help compressibility and my usual goal is not to remove all noise but only up to the point where perceptible quality trade-off begins (and by quality I specifically mean detail retention). With FFT3DFilter that point is around sigma=1.5 for my eyes. At near-zero impact on quality, good amount of noise is removed and relatively fast. A more advanced filter will remove more noise but at the cost of speed. On the clip I tested on, FFT3DFilter with params stated above is ~4x faster than DFTTest default and ~15x faster than TNLMeans default. Whatever noise I'm left with I'll just pay for in bitrate, so FFT3DFilter will save me some less bitrate than a more efficient filter would, but it still saved a lot and for a much smaller speed penalty. As feisty2 pointed out, it's 2017. I don't have to target 700MB. Storage/bandwidth is not a problem and I'll gladly have a little bigger output if it means reasonable encoding times. |
23rd January 2017, 03:57 | #835 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I have been a big fan of (Spatial) VagueDenoiser, and (S/T) FFT3DFilter for some long time.
FFT3D, usually Sigma between about 1.5 and 1.75 (occasionally a little higher), for what it does, is really pretty fast compared to others. I also like MCDegrainSharp(frames=1), and sometimes use it before a weak FFT3dFilter (sigma= ~ 1.5), usually if some other processing between the degraining and output. MCDegrainSharp requires only mvtools2 so not too difficult to set up:- http://forum.doom9.org/showthread.ph...38#post1508638 EDIT: Also see plain MCDegrain() a few posts before above linked.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 23rd January 2017 at 04:01. |
23rd January 2017, 06:04 | #836 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
I never used fft3d cuz this kind of filters are generally extremely toxic to high frequency components which leads to edge distortion and ringing and crap like that. with DFTTest you can simply avoid filtering on high frequency components with the "sstring" parameter, not sure if such policy exists in fft3d, if it does not, you can always do it manually. Code:
src = last fft = fft3dfilter(xxx) hif = mt_makediff(src, src.removegrain(11).removegrain(11)) fft.removegrain(11).removegrain(11).mt_adddiff(hif) Last edited by feisty2; 23rd January 2017 at 06:08. |
|
23rd January 2017, 13:38 | #837 | Link | |||
Registered User
Join Date: Apr 2009
Location: Rijeka, Croatia
Posts: 10
|
Quote:
Quote:
Quote:
I may not understand the math behind filters but I'm the world's leading expert in determining what looks good to me. I spent a lot of time switching betwen different filter outputs and staring at frames like a twonk. If your opinion is based on math and/or calendar instead of actual experience with the filter, you really should refrain from telling people it's a bad choice. It's a good denoiser that sits in quality vs performance sweet spot. NLMeans takes a lot more processing for moderate gains and whatever comes next will be even worse, because we're deep in the zone of diminishing returns here. |
|||
23rd January 2017, 14:29 | #838 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
and I couldn't agree with you on this, I'm also a quality freak, and 10 times slower is okay to me longs as there's 1% of quality improvement. Last edited by feisty2; 23rd January 2017 at 14:35. |
|
16th February 2017, 21:21 | #840 | Link |
Registered User
Join Date: Mar 2007
Posts: 407
|
New thread for plugin version update
Just made a new thread for an update of the plugin, so it doesn't get buried in this long thread
|
Thread Tools | Search this Thread |
Display Modes | |
|
|