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 > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 13th January 2025, 10:15   #2921  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by FranceBB View Post
+1
I would also like to know when 3.7.4 is gonna be released as I really look forward to it.
By the way, I was wrong in my prediction here:



We're currently 61 days after the date I predicted by looking at the time it passed between the other releases.
Avisynth 3.7.3 is 546 days old.
Yep. Unfortunately, the builds are not restricted to the classic x86/x64 architectures. I cannot provide a release date as it's definitely not a quick process due to the extensive checking required. I don't know how to build the Mac or Arm versions, and all such work is usually done by our build master, qyot27, who is a very thorough person. (And there are still conversations about the build process with ClangCl for example). So it will be released when it's done
pinterf is offline   Reply With Quote
Old 13th January 2025, 10:25   #2922  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
PluginManager::AutoloadPlugins calls LoadPlugin, which calls TryAsAvs26, which calls AvisynthPluginInit3, which calls AddFunction, which (because of the badly-formatted string) throws an exception back up to TryAsAvs26, which only stores the exception in a string and returns to LoadPlugin, which then ignores the error because it was called with onErrorThrow = false.

I don't know what's ultimately causing the later Access Violation, but changing line 695 of PluginManager.cpp from

Code:
        LoadPlugin(p, false, &dummy);
to

Code:
        LoadPlugin(p, true, &dummy);
results in the proper plugin loading exception being thrown and being displayed to the user. I'm not sure why it defaults to being silent but it's been that way for years.
When LoadPlugin is called from a .avs script then the error message (exception text) is shown.

Otherwise (called from AutoLoadPlugins) the exception is not shown because there can be other - non Avisynth - helper DLLs in the *.dll list which could prematurely finish the autoloading procedure. I think this is why it is silent in this case.
pinterf is offline   Reply With Quote
Old 13th January 2025, 18:35   #2923  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,387
Quote:
Originally Posted by pinterf View Post
This is a bit more complicated than just "build solution"...
ARGGH !!!!!!

I think i'll just keep the previous versions of the DLL for now...
__________________
My github.
jpsdr is offline   Reply With Quote
Old 14th January 2025, 13:39   #2924  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,871
Quote:
Originally Posted by jpsdr View Post
I think i'll just keep the previous versions of the DLL for now...
I am using the gitlab build since a couple of weeks and it seems ok.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 14th January 2025, 15:06   #2925  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
Quote:
Originally Posted by pinterf View Post
Otherwise (called from AutoLoadPlugins) the exception is not shown because there can be other - non Avisynth - helper DLLs in the *.dll list which could prematurely finish the autoloading procedure. I think this is why it is silent in this case.
Ah yes, that makes complete sense. Still, it would be nice to see the exception if the parameter string is wrong, otherwise us developers are left scratching our heads over an Access Violation (still not sure why that happens, since the plugin shouldn't be pushed to the plugins structure; at one point debugging took me to code for a completely different plugin of mine that I wasn't even compiling at the time), or, if that Access Violation is solved, our plugin silently failing to load.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 14th January 2025, 15:50   #2926  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
Ah yes, that makes complete sense. Still, it would be nice to see the exception if the parameter string is wrong, otherwise us developers are left scratching our heads over an Access Violation (still not sure why that happens, since the plugin shouldn't be pushed to the plugins structure; at one point debugging took me to code for a completely different plugin of mine that I wasn't even compiling at the time), or, if that Access Violation is solved, our plugin silently failing to load.
I have tried to mess up the parameter string with an extra "!" after the last type.

I was using Avsmeter64 which reports the exception text properly, since it works on the console.

1.) Direct use of LoadPlugin:

LoadPlugin("c:\Github\RemoveDirt\x64\Debug\RemoveDirt.dll")

The console message:

'c:/Github/RemoveDirt/x64/Debug/RemoveDirt.dll' plugin loading error:
RestoreMotionBlocks has an invalid parameter string (bug in filter)
(d:\Tape13\myfolder\s1.avs, line 1)

2.) Then I put the bad DLL to Avisynth's plugins64 folder for autoloading.
Obviously the function with the wrong parameter string did not load at all, so any referencing gave an error on the console output:

Script error: There is no function named 'RestoreMotionBlocks'.
(d:\Tape13\myfolder\s1.avs, line 39)
(d:\Tape13\myfolder\s1.avs, line 13)
pinterf is offline   Reply With Quote
Old 14th January 2025, 16:45   #2927  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
Hmm, so no Access Violation. I'll see if I can narrow it down on my computer.

Edit: AVSMeter64.exe aborts in the same manner as GUI programs do. Visual Studio debugging told me "Unhandled exception at 0x00007FFD4C0D36F8 (SubtitleEx_x64.dll) in VirtualDub64.exe: 0xC000001D: Illegal Instruction."



I moved SubtitleEx_x64.dll out and this time it showed an access violation in one of my own filters, but also debugging took me to line 25 of FilterConstructor.cpp:

Code:
  AVSValue retval = Func->apply(funcArgs, Func->user_data, 
    Func->isAvs25 ? (IScriptEnvironment *)Env25 : Env);
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 14th January 2025 at 18:45.
wonkey_monkey is offline   Reply With Quote
Old 16th January 2025, 19:50   #2928  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
Edit: never mind. Issue is that SuperEq should throw an error if the input audio isn't float, but it doesn't.
__________________
My AviSynth filters / I'm the Doctor

Last edited by wonkey_monkey; 16th January 2025 at 21:09.
wonkey_monkey is offline   Reply With Quote
Old 17th January 2025, 10:25   #2929  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
Edit: never mind. Issue is that SuperEq should throw an error if the input audio isn't float, but it doesn't.
Fixed by qyot27. Was it you who created an issue on this on git?
https://github.com/AviSynth/AviSynthPlus/issues/421
pinterf is offline   Reply With Quote
Old 17th January 2025, 10:28   #2930  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
Hmm, so no Access Violation. I'll see if I can narrow it down on my computer.

Edit: AVSMeter64.exe aborts in the same manner as GUI programs do. Visual Studio debugging told me "Unhandled exception at 0x00007FFD4C0D36F8 (SubtitleEx_x64.dll) in VirtualDub64.exe: 0xC000001D: Illegal Instruction."



I moved SubtitleEx_x64.dll out and this time it showed an access violation in one of my own filters, but also debugging took me to line 25 of FilterConstructor.cpp:

Code:
  AVSValue retval = Func->apply(funcArgs, Func->user_data, 
    Func->isAvs25 ? (IScriptEnvironment *)Env25 : Env);
Make sure that this 64 bit dll was created for Avisynth+. 2.5 interface is not compatible.
pinterf is offline   Reply With Quote
Old 17th January 2025, 11:58   #2931  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,060
Quote:
Originally Posted by pinterf View Post
Fixed by qyot27. Was it you who created an issue on this on git?
https://github.com/AviSynth/AviSynthPlus/issues/421
Issue poster "dartheditous", is Wonkey_Donkey alias on YouTube, so I assume so.

dartheditous@YouTube:- https://www.youtube.com/@DarthEditous/videos

EDIT: A dartheditous favourite:- https://www.youtube.com/watch?v=ZkkUNFXaYyk
EDIT: And source clip transformed by dartheditous to above clip:- https://www.youtube.com/watch?v=dPPjUtiAGYs

EDIT: And conversion script on D9:- https://forum.doom9.org/showthread.p...66#post1792366

EDIT: A frame from 2nd link clip, converted from 3rd link clip by 4th link script:
__________________
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; 17th January 2025 at 12:25.
StainlessS is offline   Reply With Quote
Old 17th January 2025, 13:28   #2932  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
What I was most surprised about with that video was how you get realistic shading without even trying, just because of how averaged/anti-aliased pixels stack up around the edges.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 17th January 2025, 13:53   #2933  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,835
Just a quick test if r4096 x64 would finally be able to feed frames to Topaz 2.6.4:
Not. First frame #0, last frame #-1.
All uvz builds I have tested fail in that regard.
3973; 4073 LLVM, 4073 Clang stalls anyway here; 4096 LLVM, Clang both work in AvsPmod)
Last good for me is pinterf's r4066.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."
Emulgator is offline   Reply With Quote
Old 17th January 2025, 22:16   #2934  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
Quote:
Originally Posted by StainlessS View Post
I think that has been the case for a long time, any screwup in AddFunction can cause weird probs.
I think I figured this one out. If there are multiple AddFunctions in a plugin's init function, some of them can get added to the AviSynth environment before a faulty one is reached. The faulty one stops the plugin from being properly loaded, but the earlier functions are still created, and calling one of them results in the Access Violation.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 18th January 2025, 07:30   #2935  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
I think I figured this one out. If there are multiple AddFunctions in a plugin's init function, some of them can get added to the AviSynth environment before a faulty one is reached. The faulty one stops the plugin from being properly loaded, but the earlier functions are still created, and calling one of them results in the Access Violation.
Good catch, now I hope I can reproduce it, so far I tried messing up my first function in the plugin. (And an internal avs function as well, but it didn't give error.)
pinterf is offline   Reply With Quote
Old 22nd January 2025, 12:32   #2936  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
This is a vague idea I've had for a while and I'm wondering how practical/useful it might be...

Could GenericVideoFilter be extended, without breaking old filters, to allow communication between filters? I'm thinking of something dead simple like

Code:
AVSValue GenericVideoFilter::GetAVSValue(AVSValue input)
which the next filter down could call:

Code:
AVSValue result = child->GetAVSValue(val); // val is whatever the "child" (really should be called "parent"...) clip is expecting - array, string, integers representing different instructions
which authors could use to transfer data between filters. The default could be to return false or throw an exception or pass the request up the chain (not really sure how it would work with existing filters). Filters could also pass pointers (either in an array of 32-bit integers, bit clunky, or as a 64-bit integer once Avisynth supports it) so data could then go both down and up the filter chain.

Too esoteric? I rolled my own version with GetAudio and magic numbers before frame properties were implemented and it's been surprisingly useful, but the disadvantage is that clips have to have audio and you can't use certain audio filters. But maybe it's just me who writes such ridiculously complicated filters.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 22nd January 2025, 12:36   #2937  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,175
Reminds me of TDecimate using hints from TFM, just with an explicit API.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 23rd January 2025, 14:49   #2938  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,608
That's the idea. Something like MVtools wouldn't need separate "super" clips any more; Manalyse could return the original video while also providing access to its motion data through the same clip. A simple helper filter could "dub" clips with other clips' data, and with magic numbers to differentiate (maybe required by the function to help developers avoid clashing with each other), a clip could have multiple sets of data/pointers associated with it.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 23rd January 2025, 16:07   #2939  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,407
Quote:
Originally Posted by wonkey_monkey View Post
That's the idea. Something like MVtools wouldn't need separate "super" clips any more; Manalyse could return the original video while also providing access to its motion data through the same clip. A simple helper filter could "dub" clips with other clips' data, and with magic numbers to differentiate (maybe required by the function to help developers avoid clashing with each other), a clip could have multiple sets of data/pointers associated with it.
Why not frame properties?

When mvtools was ported to Vapoursynth it was one of their first step to replace the inter-filter datapointer-in-sound-vi-data hack to frame property usage. I did not yet backported this feature.

Also, in the VapourSynth TIVTC pack the magic-number related things were eliminated as well, I have backported them, if they exists they are used, otherwise the good old magic 32 bits are used for marking the specific properties.
pinterf is offline   Reply With Quote
Old 23rd January 2025, 21:27   #2940  |  Link
DTL
Registered User
 
Join Date: Jul 2018
Posts: 1,242
Quote:
Originally Posted by wonkey_monkey View Post
That's the idea. Something like MVtools wouldn't need separate "super" clips any more; Manalyse could return the original video while also providing access to its motion data through the same clip. A simple helper filter could "dub" clips with other clips' data, and with magic numbers to differentiate (maybe required by the function to help developers avoid clashing with each other), a clip could have multiple sets of data/pointers associated with it.
Super clip in mvtools is designed for at least 3 needs:

1. Provide padded original frames so that MVs can run slightly out of the frame borders.

2. Provide multi-levels downsized hierarchy of frame copies for hierarchical search algorithm (at least in MAnalyse onCPU but any other filter can use this data).

3. Provide sub-sample shifted copies of frame (sort of upscaled-separated) for sub-sample precision processing (pel > 1). It takes lots of RAM but still faster in comparison with runtime sub-shifting at time of MAnalyse at least.

So you can not simply use pointers to original frames (in most use cases). Only with MAnalyse with DX12-ME feature - it sends full unpadded frames to ME engine and without downsized versions.

Only if you somewhere use MSuper(levels=1, hpad=vpad=0, pel=1) you can make pointers.

Last edited by DTL; 24th January 2025 at 04:14.
DTL 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 15:33.


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