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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th January 2018, 19:06   #1  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
FFT3DFilter - The Portening

Some people asked for fft3dfilter builds so I improved the existing port a bit. Now supports 8-16 bit integer and float formats. Also cleaned up the code quite a bit (something started by VFR-maniac in the initial port). The only difference in arguments is that plane was changed to planes and now works like the plane selection usually does in VS filters.

Fixed/improved stuff (relative to original VS version):
8-16 bit and float support
Piles of memory leaks fixed if there's an error on creation, for example invalid arguments would cause this a lot
Fixed beyond array bounds memory access
Improved internal cache to better handle not completely linear access

Known issues:
In really rare conditions the default for the bw and bh arguments that depend on whether one or many planes are processed can get confused
pshow and pfactor related things are completely untested

Test3
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet

Last edited by Myrsloik; 17th January 2018 at 20:16.
Myrsloik is offline   Reply With Quote
Old 14th January 2018, 19:57   #2  |  Link
Sparktank
47.952fps@71.928Hz
 
Sparktank's Avatar
 
Join Date: Mar 2011
Posts: 903
Mmmmm, float.
__________________
Win10 (x64) build 18362| GPU Caps Viewer 1.42.4.0
NVIDIA GeForce GTX 1060 3GB (GP106) 3071MB/GDDR5 | (r435_95-4)
NTSC | DVD: R1 | BD: A
Intel Xeon X5660 @2.80GHz
Sparktank is offline   Reply With Quote
Old 15th January 2018, 18:23   #3  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
I made some visual inspection of results of the filter using vsedit. I tested different bit-depths: 8,10,16 bits and chroma sub-samplings: 444, 422, 420

I got the expected results for different values supplied to the parameters (separately and combined): sigma, sigma2, sigma3, sigma4, dehalo and sharpen

several instances of the filter in the same script - no problem!: I remember avisynth-MT (SEt's avisynth mod) crashing because of this.

Didn't test for speed yet, but tried ncpu=2, without problems. I remember this crashed avisynth-MT (SEt's avisynth mod). Is ncpu still relevant?

Usage Suggestions:
  • sigma2=sigma/n, sigma3=sigma2/n, sigma4=sigma3/n (n=2 or 4). Higher values for sigma3, sigma4 (lower frequencies) will considerably destroy details and increase halos
  • bw=bh=18; ow=oh=9 (half the block size). This is attending the recommendation from Fizick: "can be factored into small primes 2, 3, 5, and 7". Also, it will help reduce blocking artifacts.
problems found:
  • It's always processing all planes, no matter what value you use for the 'plane' parameter
  • sigma values don't scale with bit-depth: e.g.: sigma=2.0 will eliminate much less noise as you process at a higher bit-depth
VS_Fan is offline   Reply With Quote
Old 15th January 2018, 18:49   #4  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
Quote:
Originally Posted by VS_Fan View Post
I made some visual inspection of results of the filter using vsedit. I tested different bit-depths: 8,10,16 bits and chroma sub-samplings: 444, 422, 420

I got the expected results for different values supplied to the parameters (separately and combined): sigma, sigma2, sigma3, sigma4, dehalo and sharpen

several instances of the filter in the same script - no problem!: I remember avisynth-MT (SEt's avisynth mod) crashing because of this.

Didn't test for speed yet, but tried ncpu=2, without problems. I remember this crashed avisynth-MT (SEt's avisynth mod). Is ncpu still relevant?

Usage Suggestions:
  • sigma2=sigma/n, sigma3=sigma2/n, sigma4=sigma3/n (n=2 or 4). Higher values for sigma3, sigma4 (lower frequencies) will considerably destroy details and increase halos
  • bw=bh=18; ow=oh=9 (half the block size). This is attending the recommendation from Fizick: "can be factored into small primes 2, 3, 5, and 7". Also, it will help reduce blocking artifacts.
problems found:
  • It's always processing all planes, no matter what value you use for the 'plane' parameter
  • sigma values don't scale with bit-depth: e.g.: sigma=2.0 will eliminate much less noise as you process at a higher bit-depth
I found the planes bug. How does sigma scale? same as the max value?

You can still use ncpu but you probably shouldn't. At least not unless fft3dfilter is the single thing bottlenecking your whole script...

The default argument changes I have no idea about, I'll do them if more people agree.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 15th January 2018, 19:40   #5  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
Quote:
Originally Posted by Myrsloik View Post
How does sigma scale? same as the max value?
Yes, scaling sigmas in the script, proportionally with max pixel value, gives me very similar results with different bith-depths
Quote:
Originally Posted by Myrsloik View Post
The default argument changes I have no idea about, I'll do them if more people agree.
I have no problem keeping the old default values. Beides, it will be backward compatible
VS_Fan is offline   Reply With Quote
Old 16th January 2018, 15:20   #6  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
I actually thought about scaling of arguments but doing so would actually be counter-intuitive for anyone who understands the underlying concepts. So I don't like that idea.

I updated the download link so now the planes argument works like it should.

The part I'm not sure about working now is pshow and pfactor. It just seems odd to me but not sure what the original does. I'll leave it for you to investigate... Note that text printing only looks correct in 8 bit, mangled in 16bit and derp in float. It's a known issue.

I'm also curious about speed comparisons with pinterf's version. Does all that asm really help?
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 16th January 2018, 15:40   #7  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,240
Quote:
Originally Posted by Myrsloik View Post
I'm also curious about speed comparisons with pinterf's version. Does all that asm really help?
When ported, I have made some comparisons, there is gain but I think the real bottleneck is not in these functions.
Code:
// bt=0
// x64 C -> simd: 10.24 -> 11.41 fps
// x86 C -> simd:  8.38 ->  9.86 fps
ApplyKalman_SSE2_simd

// bt=2, degrid=0, pfactor=0
// SSE2 x64 C -> simd: 11.37 -> 13.26 fps
ApplyWiener3D2_SSE_simd
pinterf is offline   Reply With Quote
Old 17th January 2018, 20:18   #8  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
Test3 (link in first post)

Now the info printing works properly and did a bit more code cleanup. 4re updated the build system too. I really need some pshow and pfactor testing and then this thing is done. I guess...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th January 2018, 18:39   #9  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
Quote:
Originally Posted by Myrsloik View Post
Test3 (link in first post) ... I really need some pshow and pfactor testing
Findings:
  • pshow is printing 3 different [floating point] values. I assume the "sigma" is the first one to the left, because it is similar to the one you get in the old avisynth version (v2.1.1, which shows an integer value) and the newer pinterf's v2.4, which shows only one floating point value
  • The number of values shown for sigma is the same number of planes processed.
  • EDIT: Are these values the corresponding sigmas for each plane?
  • Please scratch this: If I assume these values are the corresponding sigmas for each plane, I could not be sure that the pframe parameter is taken into account. the proportion (luma:chroma) between the values, changes considerably as the selected block of the pattern contains different features in different frames. For the frame I selected with pframe, the noise (sigmas detected) are 1:2 approx. (much more chroma noise - luma:chroma) for the rest of frames, it changes dramatically up to to 3:1 (more luma noise), as the pattern block contains different objects and features in different frames. Unfortunately there's no way to check this in any version of the fft3dfilter for avisynth

Other than that, pshow and pfactor seem to work as intended (very similar to the old avisynth version 2.1.1, and newer v2.4)
  • shown value(s) for sigma(s) is(are) scaled according to bit-depth
  • px and py [block position of the selected pattern] depend on blocksize and overlap
  • pfactor < 0.5 will reduce too little noise
  • pfactor > 0.9 will destroy details and generate multiple artifacts
I haven't tested for speed, yet

Last edited by VS_Fan; 18th January 2018 at 21:17.
VS_Fan is offline   Reply With Quote
Old 18th January 2018, 20:22   #10  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
I can process every plane individually using different sigmas with a new instance of the filter for every plane.

So I tested both avisynth versions: 2.1.1 and 2.4. This led me to understand a problem present in every version of the fft3dfilter, v2.1.1 and 2.4 for avisynth and your test #3 for vapoursynth: Chroma subsampling affects size and position of the pattern block on chroma planes. Px and py parameters need to be different. The only way you get the same size and position for the pattern block on all the planes is when there’s no chroma subsampling: 4:4:4

So, if your video uses chroma subsampling, to use fft3dfilter with the “noise pattern method” (pshow, pfactor et al) working correctly in any version of the filter, you need to process every plane individually, taking care of the different px and py values. Additionally, by processing the planes individually, you can use different sigma(s) values for each plane!
VS_Fan is offline   Reply With Quote
Old 18th January 2018, 20:28   #11  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
Quote:
Originally Posted by VS_Fan View Post
I can process every plane individually using different sigmas with a new instance of the filter for every plane.

So I tested both avisynth versions: 2.1.1 and 2.4. This led me to understand a problem present in every version of the fft3dfilter, v2.1.1 and 2.4 for avisynth and your test #3 for vapoursynth: Chroma subsampling affects size and position of the pattern block on chroma planes. Px and py parameters need to be different. The only way you get the same size and position for the pattern block on all the planes is when there’s no chroma subsampling: 4:4:4

So, if your video uses chroma subsampling, to use fft3dfilter with the “noise pattern method” (pshow, pfactor et al) working correctly in any version of the filter, you need to process every plane individually, taking care of the different px and py values. Additionally, by processing the planes individually, you can use different sigma(s) values for each plane!
Hmm... will have to ponder how to best solve that. Internally the filter more or less creates one instance per plane and processes things in series so simply one instance/plane doesn't make things worse, just a bit awkward. I'll experiment with subsampling adjustment I guess. Btw, does anyone know why it shits all over the image data instead of just drawing a simple box around the block being used? Just looks ugly...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 18th January 2018, 21:13   #12  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
Questions remaining:
  • Are these values, printed by pshow=True, the corresponding sigmas for each plane?
  • Is the pattern analyzed and constructed only for the frame selected with pframe parameter?

Last edited by VS_Fan; 18th January 2018 at 21:16.
VS_Fan is offline   Reply With Quote
Old 18th January 2018, 21:32   #13  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
Quote:
Originally Posted by VS_Fan View Post
Questions remaining:
  • Are these values, printed by pshow=True, the corresponding sigmas for each plane?
  • Is the pattern analyzed and constructed only for the frame selected with pframe parameter?
Yes, the sigmas printed should be for each plane that's processed.

Yes, it only uses the block in pframe. I guess pshow shows the current frame block's sigma to make determining the pframe argument faster.

It almost feels lile the sigma and pframe stuff would do better split out as a separate function. Somehow. Not sure.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th January 2018, 12:12   #14  |  Link
Q3CPMA
Registered User
 
Q3CPMA's Avatar
 
Join Date: Jun 2015
Posts: 25
Hello, I'm having troubles compiling this one, any idea about the reason? Here's the original issue https://github.com/4re/vapoursynth-portage/issues/71, by the way.

Here's the build log
Code:
meson --buildtype plain --libdir lib64 --localstatedir /var/lib --prefix /usr --sysconfdir /etc --wrap-mode nodownload /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118 /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118-build
The Meson build system
Version: 0.43.0
Source dir: /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118
Build dir: /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118-build
Build type: native build
Project name: FFT3DFilter
Native C++ compiler: x86_64-pc-linux-gnu-g++ (gcc 6.4.0)
Appending CXXFLAGS from environment: '-O3 -march=native -pipe'
Appending LDFLAGS from environment: '-Wl,-O1 -Wl,--as-needed'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/x86_64-pc-linux-gnu-pkg-config (0.29.2)
Native dependency vapoursynth found: YES 42
Native dependency fftw3f_threads found: YES 3.3.6-pl2
Build targets in project: 1
Found ninja-1.8.2 at /usr/bin/ninja
>>> Source configured.
>>> Compiling source in /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118 ...
ninja -v -j8 -l8 -C /tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118-build
ninja: Entering directory `/tmp/portage/media-plugins/vapoursynth-fft3dfilter-0.20180118/work/vapoursynth-fft3dfilter-0.20180118-build'
[1/4] x86_64-pc-linux-gnu-g++  -Ifft3dfilter@sha -I. -I../vapoursynth-fft3dfilter-0.20180118 -I/usr/include/vapoursynth -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++1z -O3 -march=native -fPIC -MMD -MQ 'fft3dfilter@sha/Plugin.cpp.o' -MF 'fft3dfilter@sha/Plugin.cpp.o.d' -o 'fft3dfilter@sha/Plugin.cpp.o' -c ../vapoursynth-fft3dfilter-0.20180118/Plugin.cpp
[2/4] x86_64-pc-linux-gnu-g++  -Ifft3dfilter@sha -I. -I../vapoursynth-fft3dfilter-0.20180118 -I/usr/include/vapoursynth -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++1z -O3 -march=native -fPIC -MMD -MQ 'fft3dfilter@sha/FFT3DFilter.cpp.o' -MF 'fft3dfilter@sha/FFT3DFilter.cpp.o.d' -o 'fft3dfilter@sha/FFT3DFilter.cpp.o' -c ../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp
FAILED: fft3dfilter@sha/FFT3DFilter.cpp.o 
x86_64-pc-linux-gnu-g++  -Ifft3dfilter@sha -I. -I../vapoursynth-fft3dfilter-0.20180118 -I/usr/include/vapoursynth -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++1z -O3 -march=native -fPIC -MMD -MQ 'fft3dfilter@sha/FFT3DFilter.cpp.o' -MF 'fft3dfilter@sha/FFT3DFilter.cpp.o.d' -o 'fft3dfilter@sha/FFT3DFilter.cpp.o' -c ../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp: In member function ‘void FFT3DFilter::DecodeOverlapPlane(const float*, float, T*, int, int, int)’:
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:880:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:882:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:891:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:893:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:900:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:902:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:910:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:912:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:933:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:935:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:944:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:947:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:955:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:957:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:965:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:967:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:981:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:983:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:992:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:994:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1001:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1003:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1011:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1013:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1030:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1032:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1041:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1043:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1050:24: error: expected ‘(’ before ‘constexpr’
                     if constexpr (std::is_integral<T>::value)
                        ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1052:21: error: ‘else’ without a previous ‘if’
                     else
                     ^~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1060:20: error: expected ‘(’ before ‘constexpr’
                 if constexpr (std::is_integral<T>::value)
                    ^~~~~~~~~
../vapoursynth-fft3dfilter-0.20180118/FFT3DFilter.cpp:1062:17: error: ‘else’ without a previous ‘if’
                 else
                 ^~~~
[3/4] x86_64-pc-linux-gnu-g++  -Ifft3dfilter@sha -I. -I../vapoursynth-fft3dfilter-0.20180118 -I/usr/include/vapoursynth -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c++1z -O3 -march=native -fPIC -MMD -MQ 'fft3dfilter@sha/fft3dfilter_c.cpp.o' -MF 'fft3dfilter@sha/fft3dfilter_c.cpp.o.d' -o 'fft3dfilter@sha/fft3dfilter_c.cpp.o' -c ../vapoursynth-fft3dfilter-0.20180118/fft3dfilter_c.cpp
ninja: build stopped: subcommand failed.
This is with GCC 6.4.0, so the lack of C++17 support might be the culprit.

Last edited by Q3CPMA; 19th January 2018 at 12:20. Reason: more info
Q3CPMA is offline   Reply With Quote
Old 19th January 2018, 12:14   #15  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
Your compiler only pretends to know c++17. It's too old gcc.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 19th January 2018, 12:21   #16  |  Link
Q3CPMA
Registered User
 
Q3CPMA's Avatar
 
Join Date: Jun 2015
Posts: 25
Well, thanks, the ebuild is bad then.
Q3CPMA is offline   Reply With Quote
Old 21st January 2018, 12:49   #17  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
I've added the only improvements I can think of and what I currently consider to be bugs. Would be nice if someone helped with updating the documentation too. I'll only do the enhancement marked items if there's demand for it.

https://github.com/myrsloik/VapourSy...DFilter/issues
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Old 17th February 2018, 23:00   #18  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,151
I'm trying to apply the filter on an png image, and it turned the image into large pixels.

Code:
img = core.imwrif.Read(r'001.png')
img = core.fft3dfilter.FFT3DFilter(img, sigma=1)

Last edited by lansing; 17th February 2018 at 23:09.
lansing is offline   Reply With Quote
Old 18th February 2018, 12:08   #19  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,867
@lansing: works fine here when loading an image sequence:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("G:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/vsfft3dfilter.dll")
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/Imagemagick/libimwri.dll")
# Loading H:\sequence\ED-360-png\%05d.png using vsImageReader
clip = core.imwri.Read("H:/sequence/ED-360-png/%05d.png", firstnum=1)
clip = core.std.Trim(clip=clip, length=15691)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Making sure input color range is set to PC (full) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0)
# denoising using FFT3DFilter
clip = core.fft3dfilter.FFT3DFilter(clip=clip, sigma=1.00)
# adjusting output color from: RGB24 to YUV420P10 for x265Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg")
# Output
clip.set_output()
and when loading a single image:
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("G:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# Loading Plugins
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/vsfft3dfilter.dll")
core.std.LoadPlugin(path="G:/Hybrid/64bit/vsfilters/SourceFilter/Imagemagick/libimwri.dll")
# Loading H:\sequence\ED-360-png\%05d.png using vsImageReader
clip = core.imwri.Read("H:/sequence/ED-360-png/00001.png", firstnum=1)
# denoising using FFT3DFilter
clip = core.fft3dfilter.FFT3DFilter(clip=clip, sigma=1.00)
# adjusting output color from: RGB24 to YUV420P10 for x265Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg")
# Output
clip.set_output()
Cu Selur

Ps.: I use the portable version which is why I need to load the libraries manually.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 18th February 2018, 14:28   #20  |  Link
Myrsloik
Professional Code Monkey
 
Myrsloik's Avatar
 
Join Date: Jun 2003
Location: Ikea Chair
Posts: 2,002
You don't need to load it manually. Just put it all in the plugins64 subdir.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet
Myrsloik is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.