View Full Version : Avisynth+
LigH
28th March 2020, 10:33
Fortunately, DosBox emulates GUS (Gravis Ultrasound) devices nicely.
Stereodude
29th March 2020, 14:35
Quick question: is the horizontally shifting chroma bug from <=2.61 fixed in Avisynth+?
http://avisynth.nl/index.php/Known_Issues#Resizers:_Chroma_Positioning_Bugs
No, it's not (or at least something is still wrong with the chroma handling)
You can quickly test for it by doing an integer point resample modification to the chroma and back. It should be lossless, but using the built in avisynth+ functions it's not. Using avsresize (z.lib) it is lossless.
Lossless:
z_ConvertFormat(pixel_type="YUV422P10", resample_filter="point", colorspace_op="170m:601:170m:f=>170m:601:170m:f")
z_ConvertFormat(pixel_type="YV12", resample_filter="point", colorspace_op="170m:601:170m:f=>170m:601:170m:f")
not lossless
ConvertToYUV422(matrix="PC.601", chromaresample="point")
ConvertToYUV420(matrix="PC.601", chromaresample="point")
real.finder
30th March 2020, 06:37
can someone add HBD to http://avisynth.nl/index.php/MedianBlur2 and http://avisynth.nl/index.php/AddGrainC ?
they are very basic functions that needed in many scripts
DJATOM
30th March 2020, 07:34
AddGrain already have vapoursynth version, probably not that difficult to port back.
real.finder
30th March 2020, 08:45
AddGrain already have vapoursynth version, probably not that difficult to port back.
so you will do it? :)
I kinda shy to ask pinterf since he already did many ports and work for avs
if not you then maybe jpsdr or MeteorRain
for MedianBlur2 there are also https://forum.doom9.org/showthread.php?p=1810220#post1810220
StvG
30th March 2020, 09:08
can someone add HBD to http://avisynth.nl/index.php/MedianBlur2 and http://avisynth.nl/index.php/AddGrainC ?
they are very basic functions that needed in many scripts
AddGrain (https://cloud.owncube.com/s/WdARWHb9epfGRwM) port of the vs version.
real.finder
30th March 2020, 09:39
AddGrain (https://cloud.owncube.com/s/WdARWHb9epfGRwM) port of the vs version.
thanks, it work but even in 8 bit it darker (1/255) than the original input or old AddGrain
real.finder
31st March 2020, 00:13
so, anyone will pickup MedianBlur2?
pinterf
31st March 2020, 07:40
I'll check how difficult it is. If project can be done in a day then probably ok.
mcjordan
31st March 2020, 14:04
Pinterf, i have a try to compile your last build of AviSynthPlus (VC2019),
but several times I encounter the following messages:
Error C3447 third operand to the conditional operator ?: is of type 'void', but the second operand is neither a throw-expression nor of type 'void'
and also
C2440 'return': cannot convert from 'AVSMapValue' to 'AVSMapValue &'
It is critical? I read some things in the following forum:
https://cboard.cprogramming.com/c-programming/168424-conditional-operator-second-operand-neither-throw-expression-nor-type-void.html
Thank you in advance and sorry for disturbance. I'm not deep familiar with C/C++ programming.
pinterf
31st March 2020, 14:16
Check it again please, work in progress.
mcjordan
31st March 2020, 14:19
Thank you. I'll try again later.
mcjordan
31st March 2020, 14:51
Also in strings.cpp ->
Warning C4996 'std::codecvt_utf8_utf16<wchar_t,1114111,(std::codecvt_mode)0>': warning STL4017: std::wbuffer_convert, std::wstring_convert, and the <codecvt> header (containing std::codecvt_mode, std::codecvt_utf8, std::codecvt_utf16, and std::codecvt_utf8_utf16) are deprecated in C++17. (The std::codecvt class template is NOT deprecated.) The C++ Standard doesn't provide equivalent non-deprecated functionality; consider using MultiByteToWideChar() and WideCharToMultiByte() from <Windows.h> instead. You can define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to acknowledge that you have received this warning.
and
error C2039: 'unique_ptr': is not a member of 'std'
message : see declaration of 'std'
syntax error: missing ';' before '<'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Sorry for double post.
pinterf
31st March 2020, 15:55
Put an
#include <memory>
in strings.h
rare case when gcc and clang was o.k., but msvc not.
feisty2
31st March 2020, 17:56
Put an
#include <memory>
in strings.h
rare case when gcc and clang was o.k., but msvc not.
you could probably write a very high level script-like API wrapper, like I recently did, if you wanna make the coding process painless for people that wish to write their own plugins but with little knowledge of C or C++
mcjordan
31st March 2020, 18:31
#include <memory>
in strings.h
works like a charm.
Thank you, Pinterf.
pinterf
1st April 2020, 07:33
you could probably write a very high level script-like API wrapper, like I recently did, if you wanna make the coding process painless for people that wish to write their own plugins but with little knowledge of C or C++
:) I enjoy your coding experiments despite the fact that sometimes I feel myself dummy and too old for those abstractions that are allowed by modern C++ syntax. I have the similar feelings when I'm looking into secrit-twc's repos who solves problems in two elegant lines which I'm doing with a half page of code. Probably my son will do it better than me (he's studying informatics), they had already C++ basics, C++11, 14 and 17 are covered by second half-year course, so he cannot help me right now in interpreting those magics you are doing.
MeteorRain
1st April 2020, 10:06
I'd really hope someone's gonna write a wrapper like what I did to make a plugin dual interface, but in a more elegant and clean way.
MeteorRain
2nd April 2020, 09:48
I actually took some time to read F2's code. I'm impressed by how elegant it's done. In my dual interface framework I put wrapper as template parameter, while he put the filter engine as template parameter. Very interesting design.
Lots of features are not supported yet -- lots of C++20 things. So no MSVC at this point == no chance for AviSynth+ for Windows.
feisty2
2nd April 2020, 10:37
Lots of features are not supported yet -- lots of C++20 things. So no MSVC at this point == no chance for AviSynth+ for Windows.
I actually successfully compiled GCC 10 (trunk ver) from the scratch in Cygwin for windows a few days ago. I'll admit that it was not a pleasant experience...
pinterf
2nd April 2020, 10:54
for MedianBlur2 there are also https://forum.doom9.org/showthread.php?p=1810220#post1810220
Give it a try, pls.
https://github.com/pinterf/MedianBlur2/releases/tag/1.0
pinterf
2nd April 2020, 12:55
And another Avisynth+ test build, please test it thorougly, I need more testers than myself :)
EDIT: link removed until I check real.finder's bug report
EDIT: test build 2nd edition:
https://drive.google.com/open?id=1iZMtqMsHSQNSehAZdyx1C5FZ7PTd-4qw
- New function:
SetMaxCPU(string feature)
string "feature"
"" or "C" for zero SIMD support, no processor flags are reported
"mmx", "sse", "sse2", "sse3", "ssse3", "sse4" or "sse4.1", "sse4.2", "avx, "avx2"
parameter is case insensitive.
Note: "avx2" triggers FMA3 flag as well.
Processor options w/o any modifier will limit the CPU flag report to at most the processor level.
When "feature" is ended by '+', relevant processor feature flag will be switched on
When "feature" is ended by '-', relevant processor feature flag will be removed
Multiple options can be put in a comma separated list. They will evaluated in that order.
Examples:
SetMaxCPU("SSE2") reports at most SSE2 processor (even if AVX2 is available)
SetMaxCPU("avx,sse4.1-") limits to avx2 but explicitely removes reporting sse4.1 support
SetMaxCPU("C,avx2+") limits to plain C, then switches on AVX2-only support
- Fix: Mix/Max Runtime function 32bit float chroma: return -0.5..0.5 range (was: 0..1 range)
- Other MT fixes from Neo
real.finder
2nd April 2020, 13:38
Give it a try, pls.
https://github.com/pinterf/MedianBlur2/releases/tag/1.0
it's seems work fine with HBD :thanks:
but Avisynth+ test, even without using mt
ColorBars(width=640, height=480, pixel_type="yv12")
admfilter()
#Prefetch(4)
https://i.postimg.cc/4nV1CBmW/Untitled.png (https://postimg.cc/4nV1CBmW)
Zs_RF_Shared (https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi) and AdvancedDenoising (https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/AdvancedDenoising.avsi)
real.finder
2nd April 2020, 13:42
AddGrain (https://cloud.owncube.com/s/WdARWHb9epfGRwM) port of the vs version.
thanks, it work but even in 8 bit it darker (1/255) than the original input or old AddGrain
anyone know why? is the VS version has the same output?
pinterf
2nd April 2020, 13:44
it's seems work fine with HBD :thanks:
but Avisynth+ test, even without using mt
ColorBars(width=640, height=480, pixel_type="yv12")
admfilter()
#Prefetch(4)
https://i.postimg.cc/4nV1CBmW/Untitled.png (https://postimg.cc/4nV1CBmW)
Zs_RF_Shared (https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/Zs_RF_Shared.avsi) and AdvancedDenoising (https://github.com/realfinder/AVS-Stuff/raw/master/avs%202.5%20and%20up/AdvancedDenoising.avsi)
Thanks, then I remove the link temporarily.
EDIT: new link posted (silly bug)
pinterf
2nd April 2020, 14:42
anyone know why? is the VS version has the same output?
Missing rounding at a right shift.
real.finder
2nd April 2020, 14:57
And another Avisynth+ test build, please test it thorougly, I need more testers than myself :)
EDIT: link removed until I check real.finder's bug report
EDIT: test build 2nd edition:
https://drive.google.com/open?id=1iZMtqMsHSQNSehAZdyx1C5FZ7PTd-4qw
Thanks, then I remove the link temporarily.
EDIT: new link posted (silly bug)
quick test and WOW :eek:
it's seems fix even this (https://forum.doom9.org/showthread.php?p=1904931#post1904931)!
you are a hero for avs+ users :)
pinterf
2nd April 2020, 15:22
quick test and WOW :eek:
it's seems fix even this (https://forum.doom9.org/showthread.php?p=1904931#post1904931)!
you are a hero for avs+ users :)
Not me, Neo branch fixed it, but he went too far, and I reverted back a bit, though the changes were so huge that I spent a week on the topic. Go on testing with this build then.
real.finder
2nd April 2020, 15:27
Not me, Neo branch fixed it, but he went too far, and I reverted back a bit, though the changes were so huge that I spent a week on the topic.
yes, I almost forget that from happiness, also a big thanks to him! Although I wished he was chosen opencl than cuda :)
Go on testing with this build then.
indeed, I even make it the main one for now just for MT fix
MeteorRain
2nd April 2020, 16:15
I actually successfully compiled GCC 10 (trunk ver) from the scratch in Cygwin for windows a few days ago. I'll admit that it was not a pleasant experience...
Doesn't sound fun at all. But then because avs uses C++ either msvc or clang cl can be used. Either way is far to go.
FranceBB
2nd April 2020, 16:40
it's seems work fine with HBD :thanks:
Confirmed. It works flawlessly on Windows XP with planar high bit depths. :)
And another Avisynth+ test build, please test it thorougly, I need more testers than myself :)
EDIT: link removed until I check real.finder's bug report
EDIT: test build 2nd edition:
https://drive.google.com/open?id=1iZMtqMsHSQNSehAZdyx1C5FZ7PTd-4qw
Something weird is happening with the new version.
I replaced the plugins, the Avisynth.dll in Windows, System32 and also DevIL.dll in System32.
Once I've done that, I tried to open up AVSPmod and it fails to start saying to check and make sure that I don't have any broken plugins or corrupted Avisynth installation. If I try to run AVSMeter to get the info, it prompts me to an access violation:
Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\WINDOWS\system32\avisynth.dll
Address: 0x100863AA
Same goes if I try to open a script with AVSMeter.
If I try to use avs4x264mod on the same script, it crashes with an unknown error, same goes for ffmpeg...
However if I try to load the very same script in VirtualDub, it works fine.
Why...?
According to Dependency Walker, nothing is missing in Avisynth.dll and it's perfectly fine, so... there must be something weird going on under the hood...
pinterf
2nd April 2020, 16:44
Thanks for the report, it seems to crash with programs using the C interface. It should be easy to reproduce.
EDIT: wasn't easy = couldn't reproduce
feisty2
2nd April 2020, 16:50
Doesn't sound fun at all. But then because avs uses C++ either msvc or clang cl can be used. Either way is far to go.
I believe clang10 should have supported all the required c++ 20 core language features to compile vsFilterScript
real.finder
2nd April 2020, 16:59
Thanks for the report, it seems to crash with programs using the C interface. It should be easy to reproduce.
I did encode with x264 and used avspmod with no problem, both are C interface (but they not uptodate though)
edit: even open it with mpc work
pinterf
2nd April 2020, 17:00
Something weird is happening with the new version.
I replaced the plugins, the Avisynth.dll in Windows, System32 and also DevIL.dll in System32.
Once I've done that, I tried to open up AVSPmod and it fails to start saying to check and make sure that I don't have any broken plugins or corrupted Avisynth installation. If I try to run AVSMeter to get the info, it prompts me to an access violation:
Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\WINDOWS\system32\avisynth.dll
Address: 0x100863AA
Same goes if I try to open a script with AVSMeter.
If I try to use avs4x264mod on the same script, it crashes with an unknown error, same goes for ffmpeg...
However if I try to load the very same script in VirtualDub, it works fine.
Why...?
According to Dependency Walker, nothing is missing in Avisynth.dll and it's perfectly fine, so... there must be something weird going on under the hood...
No problem on my side. avspmod 32 bit, x264 64 bit, avsmeters all working well. Latest redistributables (https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)?
FranceBB
2nd April 2020, 18:20
No problem on my side. avspmod 32 bit, x264 64 bit, avsmeters all working well. Latest redistributables (https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)?
Yep, I have C++ from 2005 to 2019 and .NET Framework from 1.0 to 4.0.
It's really weird...
https://i.imgur.com/dAUHX85.png
Oops. I just noticed that I have the 2019 as 14.24.28127 and the very latest is 14.25.28508.
I'm updating right now.
Nope. Going from 2019 version 14.24.28127 to 14.25.28508 did not solve the problem.
https://i.imgur.com/vR1xMXe.png
https://i.imgur.com/s0Uz0PF.png
https://i.imgur.com/9YL2HSL.png
Yet, if I try something stupid like:
clip=ColorBars(width=848, height=479)
my_initial_width=clip.Width()
my_initial_heigth=clip.Height()
i_width = my_initial_width / 2 * 2
i_height = my_initial_heigth / 2 * 2
Spline64Resize(clip, i_width, i_height)
VirtualDub works:
https://i.imgur.com/wstNFPR.png
And even if I try something more complex which involves external filters and dependencies, it works fine on VirtualDub
video=DGDecode_MPEG2Source("I:\Production\RAW\424-430\opening_ending_textless.d2v")
audio=FFAudioSource("I:\Production\RAW\424-430\opening_ending_textless T80 2_0ch 224Kbps DELAY 0ms.ac3")
Audiook=MergeChannels(audio, audio, audio, audio)
AudioDub(video, audiook)
tfm(mode=1,pp=5,slow=2,micmatching=2,clip2=tdeint(mode=2,type=3))
tdecimate()
f3kdb(range=15, Y=70, Cb=40, Cr=40, grainY=0, grainC=0, sample_mode=2, blur_first=true, dynamic_grain=false, opt=3, mt=true, keep_tv_range=true, input_depth=8, output_mode=1, output_depth=16)
nnedi3_resize16(target_width=720, target_height=576, mixed=true, thr=1.0, elast=1.5, nns=4, qual=2, etype=0, pscrn=4, threads=0, tv_range=true, kernel_d="Spline", kernel_u="Spline", taps=6, f_d=1.0, f_u=2.0, sharp=0, lsb_in=true, lsb=false)
Limiter(min_luma=16, max_luma=235, min_chroma=16, max_chroma=240)
ResampleAudio(48000)
AssumeFPS(25, 1, true)
SSRC(48000)
assumeTFF()
separatefields()
selectevery(4,0,3)
weave()
https://i.imgur.com/TattzJk.png
and it fails on avs4x264 as well as in AVSPmod and AVSMeter...
https://i.imgur.com/DBdUXum.png
Even something as simple as this doesn't work with AVSPmod, avs4x264 and ffmpeg:
ColorBars(width=704, height=396)
with the same error...
Even AVSEditPlus crashes as soon as I compile the script (click preview button):
https://i.imgur.com/oDYGys4.png
And yet, VirtualDub works...
https://i.imgur.com/VWwAb4L.png
I don't get it...
p.s if I can provide you any debug symbols or anything, just let me know how to do that and I'll give you everything.
p.p.s if you don't have an XP VM where you wanna test, I can let you log into mine via Anydesk (no RDP as I'm not a big fan of it for non-intranet connections).
Groucho2004
2nd April 2020, 18:49
Oops. I just noticed that I have the 2019 as 14.24.28127 and the very latest is 14.25.28508.
I'm updating right now.The latest seems to be 14.26.28720.3 (https://github.com/abbodi1406/vcredist/releases).
FranceBB
2nd April 2020, 19:05
The latest seems to be 14.26.28720.3 (https://github.com/abbodi1406/vcredist/releases).
Updated again, but it doesn't solve the issue... :(
stax76
2nd April 2020, 19:12
Software is complex and unofficial and alternative ways have always the potential to cause issues, so I recommend using the official source:
https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads
pinterf
2nd April 2020, 19:19
I have 15.25.28508.
Groucho2004
2nd April 2020, 19:22
@FranceBB
Are you testing this on vanilla XP or the one with modified kernel?
FranceBB
2nd April 2020, 21:49
@FranceBB
Are you testing this on vanilla XP or the one with modified kernel?
Modified kernel, but it didn't really break any programs so far. I can also boot with the normal kernel (since I can select it at boot time) just to be absolutely sure, but I don't think it's One Core API that broke something...
Anyway, I'll reboot with the normal kernel and I'll let you know.
EDIT: Nope, same behavior with the normal kernel...
I also tried with:
SetMaxCPU("C")
ColorBars(width=848, height=480)
just to make sure that it wasn't because of assembly optimizations, but no...
Even specifying C only doesn't make the other programs work... Only VirtualDub works and I have no idea why...
gispos
2nd April 2020, 22:15
Updated again, but it doesn't solve the issue... :(
You have copied the 32bit dll's into the system 64bit directory (system32)?
I am reading System32 directory and see AvsMeter x86:confused:
Edit: My Error, your on WinXP 32bit correct?
FranceBB
2nd April 2020, 22:18
You have copied the 32bit dll's into the system 64bit directory (system32)?
I am reading Sytem32 directory and see AvsMeter x86:confused:
No no, 32bit on a 32bit system.
There's "System" which is the old 16bit and System32 which is the 32bit System.
Windows XP x86 with 32 GB of RAM DDR4.
https://tarma.com/support/im9/using/pages/typicalpaths.htm
MeteorRain
2nd April 2020, 22:19
I believe clang10 should have supported all the required c++ 20 core language features to compile vsFilterScript
Still a long way to go on Windows. (https://github.com/microsoft/STL/pull/475)
Groucho2004
2nd April 2020, 22:22
Only VirtualDub works and I have no idea why...The only difference I can think of is that VDub uses the VfW interface whereas the others you tried use the native API, either C or C++.
Groucho2004
2nd April 2020, 22:34
The only difference I can think of is that VDub uses the VfW interface whereas the others you tried use the native API, either C or C++.FranceBB: Here (http://www.mediafire.com/file/8fl4qxzidgs4bgk/AVSMeter.7z/file) is an old AVSMeter test version that uses VfW. Try it.
StainlessS
2nd April 2020, 23:33
FranceBB, You are using VirtualDub Filtermod, thats an old one. [Been VirtualDub2 for quite some time]
qyot27
3rd April 2020, 00:23
AviSynth+ version 3.5.1 has been released. (https://github.com/AviSynth/AviSynthPlus/releases)
Mostly just bugfixes and tidying up POSIX stuff. Seeing the recent discussion, might want to check against 3.5.1 to see if the issue with C api programs exists.
More compiler coverage on POSIX
Native Clang on FreeBSD 12.1
Native AppleClang on Catalina
general code correctness fixes (-fpermissive is no longer required)
AddAutoloadDir now works on macOS and BSD
FreeBSD requires mounting procfs first in order for autoload to function
Automatic plugin autoloading now enabled on POSIX
ConvertStacked now is built and installed on POSIX by default
SONAME and SOVERSION defined for POSIX libavisynth.so
Fix: BuildPixelType: chroma subsampling of sample clip was ignored.
POSIX: better behaviour under non-Windows because of having multiple sized fixed fonts, not only a single size=20 one.
e.g. MessageClip(), Info(), Version(), ColorYUV "show", internal ApplyMessage
Text filter:
font types with
"Terminus" fixed fonts added (12-14-16-18-20-22-24-28-32, regular + bold)
"Info_h" good old 10x20 fixed font kept under this name
much more international unicode characters (1354), use utf8=true under Windows
use fontname parameter (default "Terminus", other choice is "info_h")
use font_filename parameter (accepts BDF fonts at the moment import is probably not too smart but worked for Terminus)
use size parameter (12 to 32, if no size is available, a smaller one is chosen but at least the smallest one)
new parameter: bold (default false)
Info() filter: when parameter "size" < 0, font is automatically enlarged over 640x480
(POSIX limit: minimum size is 12, maximum size is 32 limited by available fixed fonts)")
SIL OPEN FONT LICENSE added because of usage of Terminus fonts)
able to build w/o GDI and font rendering engine under Windows, so that text-overlay filters
work like in POSIX version of AviSynth+ (mainly for my development test)
Use with NO_WIN_GDI define.
Fix: ReplaceStr when the pattern string to be replaced is empty
New:
Exist() to have bool utf8 parameter
This is another function to have utf8 option:
Usage: b = Exist("Здравствуй.mkv",utf8=true). Avs file is saved as utf8 w/o BOM
Fix: broken Exist for directories (regression appeared in 3.5.0)
Fix: ColorYUV: really disable variable search when parameter "conditional" is false
Development:
ScriptEnvironment::VSprintf: parameter (void *) is changed back to va_list.
May affect C interface (avs_vsprintf) and CPP interface (ScriptEnvironment::VSprintf)
Enhanced: Planar RGB to YUV 444 10-14 bits: more precision (32 bit float internally)
Enhanced: Planar RGB to YUV 444 10-16 bits: AVX2 (speed improvement)
FranceBB
3rd April 2020, 00:40
FranceBB: Here (http://www.mediafire.com/file/8fl4qxzidgs4bgk/AVSMeter.7z/file) is an old AVSMeter test version that uses VfW. Try it.
I tried to use it, but it failed to analyze the script...
https://i.imgur.com/EPrABiS.png
FranceBB, You are using VirtualDub Filtermod, thats an old one. [Been VirtualDub2 for quite some time]
Oh, I didn't know that. I just updated it and it works like a charm. I noticed that it now also has some added features like the device capture, the VP8 and VP9 encoding through ffmpeg and so on. Anyway, even with the new version of VirtualDub, the new Avisynth works, however nothing else does...
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.