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. |
7th February 2017, 11:29 | #81 | Link |
Pajas Mentales...
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
|
because if only build Source.cpp
https://forum.doom9.org/showpost.php...9&postcount=70 and if build both source.cpp and Source_AVX_FMA3.cpp the plugin is loaded and seems work |
7th February 2017, 11:55 | #84 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
like I said a million times before, you MUST compile Source_AVX_FMA.cpp (even if AVX and FMA are not supported by your CPU, forcibly compile it with -march=haswell if that's the case) and it won't matter because the AVX/FMA functions will be rejected at RUNTIME if they are not supported by your CPU. |
|
22nd February 2017, 13:24 | #87 | Link |
Registered User
Join Date: Jan 2017
Posts: 146
|
Trying to build this on macOS and getting the following error. Any ideas ?
meson-log seems ok, here is a copy. [1/4] Compiling cpp object 'avxfma@sta/Source_AVX_FMA.cpp.o' FAILED: avxfma@sta/Source_AVX_FMA.cpp.o c++ '-Iavxfma@sta' '-I.' '-I..' '-I/usr/local/Cellar/vapoursynth/36/include/vapoursynth' '-I/usr/local/Cellar/zimg/2.4/include' '-Wall' '-Winvalid-pch' '-Wnon-virtual-dtor' '-std=c++14' '-O3' '-mavx' '-mfma' '-MMD' '-MQ' 'avxfma@sta/Source_AVX_FMA.cpp.o' '-MF' 'avxfma@sta/Source_AVX_FMA.cpp.o.d' -o 'avxfma@sta/Source_AVX_FMA.cpp.o' -c ../Source_AVX_FMA.cpp In file included from ../Source_AVX_FMA.cpp:1: ../Shared.hpp:8:10: fatal error: 'malloc.h' file not found #include <malloc.h> ^ 1 error generated. [2/4] Compiling cpp object 'fixtelecinedfades@sha/Source.cpp.o' FAILED: fixtelecinedfades@sha/Source.cpp.o c++ '-Ifixtelecinedfades@sha' '-I.' '-I..' '-I/usr/local/Cellar/vapoursynth/36/include/vapoursynth' '-I/usr/local/Cellar/zimg/2.4/include' '-Wall' '-Winvalid-pch' '-Wnon-virtual-dtor' '-std=c++14' '-O3' '-MMD' '-MQ' 'fixtelecinedfades@sha/Source.cpp.o' '-MF' 'fixtelecinedfades@sha/Source.cpp.o.d' -o 'fixtelecinedfades@sha/Source.cpp.o' -c ../Source.cpp In file included from ../Source.cpp:1: ../Shared.hpp:8:10: fatal error: 'malloc.h' file not found #include <malloc.h> ^ 1 error generated. ninja: build stopped: subcommand failed. |
22nd February 2017, 13:54 | #88 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
"malloc.h" should be provided by the compiler and it's also where the dynamic stack memory allocation function "alloca()" (unlike C99 and later versions of C, variable length array in stack frame (std::vector is a heap array, which means it's much slower than alloca()) is not allowed in C++, which leaves alloca() the only option to do such thing) should be defined.. "malloc.h" should be available in Visual Studio and GCC, maybe you should try one of these 2 compilers |
|
22nd February 2017, 14:03 | #89 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
Try to include alloca.h instead of malloc.h.
__________________
Buy me a "coffee" and/or hire me to write code! |
|
22nd February 2017, 14:24 | #90 | Link | |
Registered User
Join Date: Jan 2017
Posts: 146
|
Quote:
I did what jackoneill suggested and changed the line in Shared.hpp to alloca.h instead of malloc.h. It now build successfully with just one warning: ../Source.cpp:165:23: warning: 'VapourSynthPluginInit' has C-linkage specified, but returns user-defined type 'auto' which is incompatible with C [-Wreturn-type-c-linkage] VS_EXTERNAL_API(auto) VapourSynthPluginInit(VSConfigPlugin configFunc, VSRegisterFunction registerFunc, VSPlugin *plugin) { ^ 1 warning generated. Is this warning OK ? And are there any forseen impact (performance and etc) in using alloca instead of malloc ? Last edited by KingLir; 22nd February 2017 at 14:38. |
|
22nd February 2017, 14:29 | #91 | Link | ||
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
Quote:
|
||
22nd February 2017, 14:39 | #92 | Link | ||
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
Quote:
Code:
sub rsp, size Last edited by feisty2; 22nd February 2017 at 14:41. |
||
22nd February 2017, 14:47 | #93 | Link |
Registered User
Join Date: Jan 2017
Posts: 146
|
Thank you guys! You should go and do a commit with the change.
A newbie question, what does it means " vapoursynth.Error: FixFades: input clip must be single precision fp, with constant dimensions. " ? I am using a DVD (mpeg2) source. What conversation should I do ? |
22nd February 2017, 15:11 | #95 | Link |
Registered User
Join Date: Jan 2017
Posts: 146
|
Thanks. I am getting only "pipe:: Invalid data found when processing input" for the following script:
clip = core.ffms2.Source(source.mkv) clip = core.fmtc.bitdepth(clip=clip, bits=32, fulls=False, fulld=True) clip = core.ftf.FixFades(clip=clip, mode=0, threshold=0.002, color=[0.0, 0.0, 0.0], opt=True) clip.set_output() |
22nd February 2017, 15:19 | #97 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
Code:
srcp[i] = reinterpret_cast<const float *>(vsapi->getReadPtr(src, plane)) + i * src_stride; dstp[i] = reinterpret_cast<float *>(vsapi->getWritePtr(dst, plane)) + i * dst_stride;
__________________
Buy me a "coffee" and/or hire me to write code! |
|
22nd February 2017, 15:36 | #98 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
and if there's no alloca() doing the dirty work before you get the actual thing started, you will have to later write a lot of crap like Code:
srcp += src_stride; dstp += dst_stride; and say you're out of your mind for a sec and forget to write that crap in the loop, what's about to happen is: BOOM! crash! and when that happens, it's again, extremely hard to find where the program went wrong. and "alloca()" freed you from all these troubles |
|
22nd February 2017, 20:33 | #100 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
Or nag feisty2 to add support for integer clips, because there's no reason not to.
__________________
Buy me a "coffee" and/or hire me to write code! |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|