Log in

View Full Version : FFT3DFilter update (Avisynth 2.6 pixel types)


martin53
16th February 2017, 21:19
I am posting this here in a new thread so I could keep the attachment up to date in the 1st post if neccessary.

Two years ago, I updated the FFT3Dfilter source to work with Y8, YV24 and the other then existing AviSynth 2.6 pixel types. I had forgotten that in the meantime, but was remembered of it now.

So if anyone else besides me likes to use this plugin with the recent pixel types, here it is. Of course I checked permission with Fizick.

Full source included, and recompiled minutes ago with the recent Avisynth+ header and Visual Studio 2015.

Please note that the filename is fft3dfilter2.dll, to allow parallel existence of both dlls. The filter names are same.
Only when both dlls are present, use FFT3DFilter2_FFT3dFilter() to make sure you call the new one.
This version is not ICL10 compiled - I was said it has comparable performance to v2.1.1, however

Original thread is here (http://forum.doom9.org/showthread.php?t=85790).

EDIT Please note that pinterf largely improved fft3dfilter more, to version 2.3 which is here on github (https://github.com/pinterf/fft3dfilter/releases). So previously attached V2.2 removed here. :thanks: pinterf!
Also, he started a new V2.3 thread (http://forum.doom9.org/showthread.php?t=174347) in the development area

StainlessS
16th February 2017, 21:31
Very useful M53, we loves FFT3DFilter (with light settings usually).

You might want to add link to original FFT3DFilter thread, just for completeness.

real.finder
16th February 2017, 22:10
nice thing :)

it will more nice if there are 9-16 and 32 bits too

Reel.Deel
18th February 2017, 23:12
Thanks for the update martin53. ;)


@Groucho2004

Can you please provide an ICL compiled binary (32/64 bit) just like you did for the original version?

Groucho2004
19th February 2017, 00:46
@Groucho2004

Can you please provide an ICL compiled binary (32/64 bit) just like you did for the original version?Will do, I have to make some code changes.

pinterf
19th February 2017, 10:46
I would be nice that the project appear on github, and it would integrate Groucho2004's ICL compatibility changes, poor him has to apply it after each new version :)

Groucho2004
19th February 2017, 12:22
I would be nice that the project appear on github, and it would integrate Groucho2004's ICL compatibility changes, poor him has to apply it after each new version :)Since martin53 is using a modern MS compiler, the ICL builds barely show better performance, even for 64 bit which runs without the inline assembly functions.

A few IFDEFs in the code that disable the inline asm would make this 64 bit compatible and it could be built with the 64 bit VC2015 compiler. While at it, the ancient 3DNow stuff should be removed.

I'll make a 64 bit build later but for future iterations I'd suggest the above (or someone re-writes the SSE code for 64 bit :D).

@martin53, a couple of suggestions:
Change the code for delayed loading of the fftw DLL to this:
hinstLib = LoadLibrary("libfftw3f-3.dll");
if (hinstLib == NULL)
hinstLib = LoadLibrary("fftw3.dll");
...
...
if (istat==0 || hinstLib==NULL || fftwf_free==NULL || fftwf_malloc==NULL || fftwf_plan_many_dft_r2c==NULL ||
fftwf_plan_many_dft_c2r==NULL || fftwf_destroy_plan==NULL || fftwf_execute_dft_r2c==NULL || fftwf_execute_dft_c2r==NULL)
env->ThrowError("FFT3DFilter: Cannot load FFTW3.DLL (LIBFFTW3F-3.DLL)!");
Also, since you changed the version number to 2.2 this should be reflected in the version resource (FFT3DFilter.rc).

Groucho2004
19th February 2017, 12:54
64 bit build is up. (https://forum.doom9.org/showthread.php?t=173259)

Reel.Deel
19th February 2017, 15:44
64 bit build is up. (https://forum.doom9.org/showthread.php?t=173259)

Thanks Groucho!


I'll make a 64 bit build later but for future iterations I'd suggest the above (or someone re-writes the SSE code for 64 bit :D).


In the VapourSynth port the inline code was simply removed: https://github.com/VFR-maniac/VapourSynth-FFT3DFilter

Groucho2004
19th February 2017, 15:54
In the VapourSynth port the inline code was simply removed: https://github.com/VFR-maniac/VapourSynth-FFT3DFilter
The SSE inline asm in the 32 bit version provides a considerable performance boost. I'd leave it for now.

martin53
19th February 2017, 19:53
It would be nice that the project appear on github
I'd be pleased to do that, just worried I'd do something a wrong way. What should I observe?

pinterf
19th February 2017, 23:53
I'd be pleased to do that, just worried I'd do something a wrong way. What should I observe?
Poor martin53, I'm seeing myself one year ago bothering with avs+ code :), so you have to learn using git. Either from VS2015 integration which is quite useful, or from commandline (which was my nightmare, always worrying if I was doing something wrong and delete all upstream Avisynth plus codes forever - I knew nothing about git). If it is not ok, you can always delete the whole project from git and start again from stratch.

martin53
24th February 2017, 22:44
Poor martin53
So thank you you not only took that grief from me, but also crafted the plugin into high bitdepth and x64 SSE era :D (readers see 1st post)