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 16th May 2020, 17:02   #121  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by ChaosKing View Post
Could you then upload your in msys2 compiled dll?
there you go.
I take no responsibility for instant crash (some extended instruction sets like AVX2 or FMA might be missing on your machine), possible missing mingw64 dlls or any other binary related problem.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 16th May 2020, 17:22   #122  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by Are_ View Post
Also could you consider using the normal include paths for vapoursynth and fftw3? The way things are now break packaging.
what do you mean by "normal include paths"?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 16th May 2020, 18:38   #123  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 308
Instead of:

Code:
#include "Include/fftw3.h"
#include "Include/VapourSynth.h"
#include "Include/VSHelper.h"
Do:
Code:
#include "fftw3.h"
#include "VapourSynth.h"
#include "VSHelper.h"
Else I have to patch them (source based distro).
Are_ is offline   Reply With Quote
Old 16th May 2020, 18:53   #124  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,194
Quote:
Originally Posted by feisty2 View Post
there you go.
I take no responsibility for instant crash (some extended instruction sets like AVX2 or FMA might be missing on your machine), possible missing mingw64 dlls or any other binary related problem.
Thx. Just checked my example script and the problem is still there.

Generate a very noisy clip and denoise it with mvtools. compare it inside and outside of FrameEval

Code:
def mvtoolsDenoise():
  ....


def abc(n, c):
	return mvtoolsDenoise(c)
	
clip1 = clip.std.FrameEval(functools.partial(abc, c=clip))
clip2 = mvtoolsDenoise(clip)
Edit: Bad example, I will post a script later
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository

Last edited by ChaosKing; 16th May 2020 at 19:06.
ChaosKing is online now   Reply With Quote
Old 16th May 2020, 19:32   #125  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
trivial update:
- the "limit" parameter of mvsf.Degrain now defaults to infinity. it still follows the [0.0, 1.0] range, however out-of-range samples are allowed for floating point clips, which makes infinity the only true "unlimited" bound.
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 16th May 2020, 19:57   #126  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by ChaosKing View Post
Thx. Just checked my example script and the problem is still there.

Generate a very noisy clip and denoise it with mvtools. compare it inside and outside of FrameEval

Code:
def mvtoolsDenoise():
  ....


def abc(n, c):
	return mvtoolsDenoise(c)
	
clip1 = clip.std.FrameEval(functools.partial(abc, c=clip))
clip2 = mvtoolsDenoise(clip)
Edit: Bad example, I will post a script later
there was some major refactoring between v11 and v12 of jackoneill's branch, I started my branch from pre-v11 code base.

you can check if you are able to reproduce the problem with v11 of jackoneill's branch and if the problem disappears with v12
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 16th May 2020, 20:07   #127  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,194
I just found out that it happens with other filters as well. It was just easier to spot with mvtools-sf because I could use a very large temporal radius with strong denoising. Will post the problem in VS thread again.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database || https://github.com/avisynth-repository
ChaosKing is online now   Reply With Quote
Old 17th May 2020, 09:47   #128  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by Are_ View Post
Instead of:

Code:
#include "Include/fftw3.h"
#include "Include/VapourSynth.h"
#include "Include/VSHelper.h"
Do:
Code:
#include "fftw3.h"
#include "VapourSynth.h"
#include "VSHelper.h"
Else I have to patch them (source based distro).
mvtools relies on vsFilterScript headers rely on VapourSynth.h -> VapourSynth.h must be placed in the "Include" folder

mvtools relies on VSHelper.h relies on VapourSynth.h -> VapourSynth.h must be placed in the mvtools folder

you will need 2 copies of VapourSynth.h, one in the "Include" folder and one in the mvtools folder, that doesn't look nice
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated

Last edited by feisty2; 17th May 2020 at 09:50.
feisty2 is offline   Reply With Quote
Old 17th May 2020, 20:33   #129  |  Link
amichaelt
Registered User
 
Join Date: Apr 2018
Posts: 95
Quote:
Originally Posted by feisty2 View Post
mvtools relies on vsFilterScript headers rely on VapourSynth.h -> VapourSynth.h must be placed in the "Include" folder

mvtools relies on VSHelper.h relies on VapourSynth.h -> VapourSynth.h must be placed in the mvtools folder

you will need 2 copies of VapourSynth.h, one in the "Include" folder and one in the mvtools folder, that doesn't look nice
The whole point of doing it how _Are states is that it means one does't have to copy a bunch of headers around and simply can rely on GCC, etc. to find it in the includes/headers search paths (for example under /usr/include). Unless you have some need of a specific version of those headers, you really shouldn't be including them the way you are. Plenty of other plugins don't.

For example in jackoneill's mvtools you'll see the headers are done this way:

Code:
#include <limits.h>
#include <stdexcept>
#include <string>
#include <unordered_map>

#include <VapourSynth.h>
#include <VSHelper.h>

#include "Bullshit.h"
#include "CPU.h"
#include "Fakery.h"
#include "MVAnalysisData.h"
#include "MVDegrains.h"
#include "MVFrame.h"
#include "Overlap.h"
https://github.com/dubhater/vapoursy...MVDegrains.cpp

This is the proper way you should be including the headers.

Last edited by amichaelt; 17th May 2020 at 20:45.
amichaelt is offline   Reply With Quote
Old 17th May 2020, 23:32   #130  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 308
Yeah, exactly that.

You make your vsFilterScript install all the headers system wide somewhere like "/usr/include/vsFilterScript" and create pkg-config file for them.

Then you just retrieve the path for gcc with pkg-config and you don't need to worry about them.

This is good because it's easy to package and it's easy to use for everybody on their own projects.

I can send you PR on both projects with build system and edit project files for this (remove the "Include/" bits from them).
Are_ is offline   Reply With Quote
Old 18th May 2020, 11:17   #131  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by Are_ View Post
Yeah, exactly that.

You make your vsFilterScript install all the headers system wide somewhere like "/usr/include/vsFilterScript" and create pkg-config file for them.

Then you just retrieve the path for gcc with pkg-config and you don't need to worry about them.

This is good because it's easy to package and it's easy to use for everybody on their own projects.

I can send you PR on both projects with build system and edit project files for this (remove the "Include/" bits from them).
done, I changed the extension of vsFilterScript headers to ".vxx" to avoid possible filename conflicts tho
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 20th May 2020, 12:47   #132  |  Link
106062316
アズールレーン
 
Join Date: May 2020
Location: Taiwan
Posts: 2
I compiled mvsf using GCC 10.1 and mingw-w64

mvsf
mvsf-avx
mvsf-avx2
106062316 is offline   Reply With Quote
Old 22nd May 2020, 23:33   #133  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 447
How did you compile it ?
I used the included Meson file and got :
Code:
  Starting 64bit compilation of global tools
22:05:22   Running git update for vapoursynth-mvtools-sf...
22:05:24 + vapoursynth-mvtools-sf git  ................................... [Recently updated]
The Meson build system
Version: 0.54.1
Source dir: H:/Mingw645/build/vapoursynth-mvtools-sf-git
Build dir: H:/Mingw645/build/vapoursynth-mvtools-sf-git/build
Build type: native build
Using 'PKG_CONFIG_PATH' from environment with value: 'H:\\Mingw645\\local64\\lib\\pkgconfig;H:\\Mingw645\\msys64\\mingw64\\lib\\pkgconfig'
Using 'PKG_CONFIG_PATH' from environment with value: 'H:\\Mingw645\\local64\\lib\\pkgconfig;H:\\Mingw645\\msys64\\mingw64\\lib\\pkgconfig'
Project name: vapoursynth-mvtools-sf
Project version: 10
Using 'CXX' from environment with value: 'ccache g++'
Using 'CXXFLAGS' from environment with value: '-mthreads -mtune=native -O2 -pipe'
Using 'LDFLAGS' from environment with value: '-pipe -static-libgcc -static-libstdc++'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=0 -D__USE_MINGW_ANSI_STDIO=1'
Using 'CXX' from environment with value: 'ccache g++'
Using 'CXXFLAGS' from environment with value: '-mthreads -mtune=native -O2 -pipe'
Using 'LDFLAGS' from environment with value: '-pipe -static-libgcc -static-libstdc++'
Using 'CPPFLAGS' from environment with value: '-D_FORTIFY_SOURCE=0 -D__USE_MINGW_ANSI_STDIO=1'
C++ compiler for the host machine: ccache g++ (gcc 10.1.0 "g++ (Rev2, Built by MSYS2 project) 10.1.0")
C++ linker for the host machine: g++ ld.bfd 2.34
Host machine cpu family: x86_64
Host machine cpu: x86_64
Using 'PKG_CONFIG' from environment with value: 'H:/Mingw645/msys64/mingw64/bin/pkg-config --static'
Found pkg-config: --static (0.29.2)
Using 'PKG_CONFIG_PATH' from environment with value: 'H:\\Mingw645\\local64\\lib\\pkgconfig;H:\\Mingw645\\msys64\\mingw64\\lib\\pkgconfig'
Run-time dependency vapoursynth found: YES 50
Using 'PKG_CONFIG_PATH' from environment with value: 'H:\\Mingw645\\local64\\lib\\pkgconfig;H:\\Mingw645\\msys64\\mingw64\\lib\\pkgconfig'
Run-time dependency vsfilterscript found: YES 50
Using 'PKG_CONFIG_PATH' from environment with value: 'H:\\Mingw645\\local64\\lib\\pkgconfig;H:\\Mingw645\\msys64\\mingw64\\lib\\pkgconfig'
Run-time dependency fftw3 found: YES 3.3.8
Build targets in project: 1

Found ninja.EXE-1.10.0 at H:\Mingw645\msys64\mingw64\bin/ninja.EXE
ninja: Entering directory `build'
[1/2] Compiling C++ object vapoursynth-mvtools-sf@sha/src_EntryPoint.cxx.obj
FAILED: vapoursynth-mvtools-sf@sha/src_EntryPoint.cxx.obj
ccache g++ @vapoursynth-mvtools-sf@sha/src_EntryPoint.cxx.obj.rsp
../src/EntryPoint.cxx:1:10: fatal error: Interface.vxx: No such file or directory
    1 | #include "Interface.vxx"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
22:05:27 + Running rustup_update...
It seems I'm missing some files... are these available from your other repo''s ?
What am I doing wrong ?

Last edited by Pat357; 22nd May 2020 at 23:42.
Pat357 is offline   Reply With Quote
Old 22nd May 2020, 23:44   #134  |  Link
Are_
Registered User
 
Join Date: Jun 2012
Location: Ibiza, Spain
Posts: 308
You need to install https://github.com/IFeelBloated/vsFilterScript too.

Your log says:
Code:
Run-time dependency vsfilterscript found: YES 50
But that has to be wrong, it should say:
Code:
Run-time dependency vsfilterscript found: YES 1
Are_ is offline   Reply With Quote
Old 23rd May 2020, 19:27   #135  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 447
Thanks for your input, so I got vsfilterscript from repo and installed it first.
Now I got :

https://github.com/IFeelBloated/vsFilterScript/issues/3

I reported it with the vsfilterScript because The breaking error seems to be:
include/vsFilterScript/Buffer.vxx:14:51: error: 'aligned_alloc' is not a member of 'std'; did you mean 'aligned_union'?

Any ideas ?

Edit : I think I found the issue on hand here : because Mingw64and even MSVC don't support aligned_alloc, it looks like is simply impossible to compile the current code with Mingw64 gcc / g++.
See also https://github.com/IFeelBloated/vapo...s-sf/issues/17.
The author stated he will not alter his code for this.

That's really a pity.
So atm there would be no compiler on a Windows system able to compile the current code.
This would be a major issue for a lot of people.

How 106062316 managed to get the code compiled on Mingw is beyond me.

Last edited by Pat357; 23rd May 2020 at 23:19.
Pat357 is offline   Reply With Quote
Old 23rd May 2020, 19:45   #136  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
there’re pre-built binaries at #132, and you can simply drop the std namespace (change std::aligned_alloc to aligned_alloc) to make it work for mingw
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 23rd May 2020, 19:57   #137  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Providence, RI
Posts: 2,272
Quote:
Originally Posted by Pat357 View Post
How 106062316 managed to get the code compiled on Mingw is beyond me.
???? Is removing 5 characters ( std:: ) that much of a challenge?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 23rd May 2020, 23:25   #138  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 447
Quote:
Originally Posted by feisty2 View Post
there’re pre-built binaries at #132, and you can simply drop the std namespace (change std::aligned_alloc to aligned_alloc) to make it work for mingw

I'm not a developer and I didn't know the workaround is so simple.
Thank you very much for this hint.

Got it all working now !
Pat357 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 21:46.


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