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. |
22nd November 2014, 12:53 | #1 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
vcfreq a plugin for vapoursynth
vcfreq is a plugin for vapoursynth. It operates in frequency domain to filter out certain types of regular noises. A large range of cascading filters can be specified.
The functions available in this plugin are Code:
1.F1Quiver 2.F2Quiver This plugin requires a fftw3f.3.dll to be present in path. Currently works in windows only. Comments, suggestions are welcome |
18th February 2016, 12:30 | #4 | Link |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Sorry for that. Is it that all functions in it have memory leak or did you try a particular one. If so can you give the script used?
Offhand I can see one possible problem. vcfreq assumes the number of cpus to be the number of threads active. This is communicated to the fftw3 dll. |
18th February 2016, 13:05 | #5 | Link |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
I've only used vcfreq.Sharp so far cuz I need to perform a deconvolution..
the script's just Code:
core.vcfreq.Sharp (clip, line=0, wn=0.99, x=1, y=1, fr=25, scale=0.0059) |
17th August 2016, 18:52 | #9 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
Here's my modified source and x64 dll that should be compilable on linux if you have a float fftw3 lying around. I didn't test it though. Report your findings and so on. Just done as a 30 min code stabbing session while eating dinner.
Changes: Removes the loadlibrary loading of fftw3 and instead uses the official fftw3.h Replaced all homegrown pi constants with the more accurate M_PI Removed all unused variables where it was obvious no use was ever intended Fixed an extreme number of type conversion warnings, some of them by making sure all calculations stay in float precision And can someone check this piece of code? Code:
void pointNotchFilter2D( float * freqFilter, int* spec, int ht, int wd) { // point centered notch filter float xf = spec[2] * wd / (NYQUIST); float yf = spec[3] * ht / (NYQUIST ); int degree = 2 * spec[4]; // calculate notch radial sqr float d0sq = sqrt (xf*xf + yf*yf); d0sq = (ht * ht + wd * wd)/ 4;
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet Last edited by Myrsloik; 9th April 2018 at 13:17. Reason: Updated link |
17th August 2016, 19:25 | #10 | Link |
Pajas Mentales...
Join Date: Dec 2004
Location: Spanishtán
Posts: 497
|
with GCC:
Code:
In file included from vcfreq.cpp:66:0: FQSharphelper.cpp: In function 'void getRealInput(float*, const finc*, int, int, int, int, int, int, bool)': FQSharphelper.cpp:251:30: error: too many arguments to function 'int getSign(int)' data1[ w] = getSign( h, w) * fptr1[w]; ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In function 'void getRealOutput(float*, finc*, int, int, int, int, int, bool, finc, finc)': FQSharphelper.cpp:319:39: error: too many arguments to function 'int getSign(int)' int val = data1[ w] * getSign(h, w); ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealInput(float*, const finc*, int, int, int, int, int, int, bool) [with finc = unsigned char]': FQBlur.cpp:254:78: required from here FQSharphelper.cpp:251:24: error: too many arguments to function 'int getSign(int)' data1[ w] = getSign( h, w) * fptr1[w]; ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealOutput(float*, finc*, int, int, int, int, int, bool, finc, finc) [with finc = unsigned char]': FQBlur.cpp:267:51: required from here FQSharphelper.cpp:319:34: error: too many arguments to function 'int getSign(int)' int val = data1[ w] * getSign(h, w); ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealInput(float*, const finc*, int, int, int, int, int, int, bool) [with finc = short unsigned int]': FQBlur.cpp:278:80: required from here FQSharphelper.cpp:251:24: error: too many arguments to function 'int getSign(int)' data1[ w] = getSign( h, w) * fptr1[w]; ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealOutput(float*, finc*, int, int, int, int, int, bool, finc, finc) [with finc = short unsigned int]': FQBlur.cpp:291:51: required from here FQSharphelper.cpp:319:34: error: too many arguments to function 'int getSign(int)' int val = data1[ w] * getSign(h, w); ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealInput(float*, const finc*, int, int, int, int, int, int, bool) [with finc = float]': FQBlur.cpp:302:80: required from here FQSharphelper.cpp:251:24: error: too many arguments to function 'int getSign(int)' data1[ w] = getSign( h, w) * fptr1[w]; ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ FQSharphelper.cpp: In instantiation of 'void getRealOutput(float*, finc*, int, int, int, int, int, bool, finc, finc) [with finc = float]': FQBlur.cpp:316:51: required from here FQSharphelper.cpp:319:34: error: too many arguments to function 'int getSign(int)' int val = data1[ w] * getSign(h, w); ^ FQSharphelper.cpp:217:5: note: declared here int getSign(int i) ^ make: *** [Makefile:2: all] Error 1 Code:
In file included from vcfreq.cpp:66: ./FQSharphelper.cpp:251:17: error: no matching function for call to 'getSign' data1[ w] = getSign( h, w) * fptr1[w]; ^~~~~~~ ./FQSharphelper.cpp:217:5: note: candidate function not viable: requires single argument 'i', but 2 arguments were provided int getSign(int i) ^ ./FQSharphelper.cpp:319:27: error: no matching function for call to 'getSign' int val = data1[ w] * getSign(h, w); ^~~~~~~ ./FQSharphelper.cpp:217:5: note: candidate function not viable: requires single argument 'i', but 2 arguments were provided int getSign(int i) ^ 2 errors generated. make: *** [Makefile:2: all] Error 1 |
17th August 2016, 19:38 | #11 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
I think I've fixed that now. Redownload and try again. I think the other overload was declared too late or something.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
19th August 2016, 12:50 | #13 | Link | |
Registered User
Join Date: Jul 2003
Location: India
Posts: 890
|
Quote:
the official fftw3 header can be used, but I found it to be so difficult to understand started using Fizik's lte version with suitable modifications. As regards numerous warnings, yes I am guilty and lazy. Thankful for correcting. |
|
19th August 2016, 15:17 | #14 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,990
|
Quote:
Sometimes we dont make mistakes, sometimes we do, but, every time we advance and take from what we have learnt, thank you VC Mohan, you really are pretty good, when not making mistakes, and that is what really counts EDIT: Big Kiss vc, XXX. EDIT: I picture myself as the one on the left, and you being the girly one on the right (with the blue hair, whats with that?) I think your character is way too aggressive, I feel maybe that I'm being abused, please control yourself.
__________________
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; 19th August 2016 at 15:46. |
|
7th March 2017, 11:51 | #15 | Link | |
Registered User
Join Date: Jan 2017
Posts: 146
|
Quote:
Code:
gcc -c -fPIC ${CFLAGS} ${CPPFLAGS} -I. $(pkg-config --cflags vapoursynth) -o main.o vcfreq.cpp g++ -dynamiclib -undefined suppress -flat_namespace *.o -o libvcfreq.dylib |
|
9th April 2018, 13:07 | #19 | Link |
Registered User
Join Date: Dec 2012
Posts: 6
|
Thank you Are_ .
Edit: A few notes for anyone else trying to compile: 1. Looking at the newer source on the official page, it looks likes vc's fix for the issue pointed out in post #9 is to comment out both lines. This seems fine, since the variable is unused anyway. 2. It looks like there's another bug. The for loop at the bottom of Factorize.cpp is missing its {}s. I *think* the closing brace should go on line 52 (???). 3. libfftw3f_threads is a dependency (at least for the fixed version). If you don't link it at compile time, core.vcfreq.Sharp() will crash with an undefined symbol error for fftwf_init_threads. 4. I was able to compile with Code:
g++ -Wall -shared -fPIC -I. -L/usr/local/lib/vsplugins/lib -lfftw3f_threads -o libvcfreq.so vcfreq.cpp (My libfftw3f_threads.so is in usr/local/lib/vsplugins/lib; adjust accordingly.) Last edited by Chthon; 9th April 2018 at 15:46. |
9th April 2018, 13:19 | #20 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,579
|
I updated my old and broken dropbox link. Not sure if I really want to fork the project since I'd have basically no time to maintain it anyway. Would be a shame if the changes were lost tough...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
Thread Tools | Search this Thread |
Display Modes | |
|
|