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 1st February 2018, 21:14   #261  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,293
Quote:
Originally Posted by pinterf View Post
That stupid crash took me weeks to catch until it turned out that a mysterious access violation is happening right in masktools2.

The original report was: ffdshow x64 crashed with a script using maa2. I have almost completely un-mmx'd ffdshow, and moved it to avs 2.6 interface from v2.5, changed things that existed in boost many years ago but now C++14/17 adopted them, so it finally could be compiled and debugged with VS2017 (with some features disabled). But the crash was still there, pointing to avisynth or one of its filters. Then I succeeded to reproduce the crash w/o ffdshow with a simple script:
Code:
c=BlankClip(width=620,height=600,length=1000,pixel_type="YV12")
mt_merge(c,c,c,y=-2,u=-2,v=-2,luma=true)
#Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
#Module:   C:\Windows\System32\KernelBase.dll
#Address:  0x00007FF9A5313FB8
Prefetch(2)
It was the side effect of the /Zthreadsafeinit- switch. This option is used for keeping stupid XP compatibility and caused a static class to be initialized later in one thread than it was used from another thread. Specifically in MT environment GetFrame(0) started the initializing some variables but GetFrame(1) from another thread kicked in too early and couldn't yet see the changes that the first thread was doing.

Of course all this happened only in Release mode because it needed strict timing conditions, maybe sub-milliseconds so it could not be debugged. When will XP die????
so it was bug in masktools after all, about 1 or 2 month ryrynz told me that there crash happen with maa2 in avs+ 64 if using mt

if only x64 has this bug then you can let xp compatibility die for x86_64 and keep it only x86 in 32bit

people that use x64 pc should not use xp anyway since their pc can run another more modern os
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 1st February 2018, 21:20   #262  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,644
For the market share stats it really depends where you look...
According to netmarketshare the numbers are a little different:
https://www.netmarketshare.com/opera...%22-1000%22%7D

But whatever, who cares if XP has a market share of 3% or 7%? Fact is that it still is #3 (maybe #4) of all desktop OSs.


I would like to make a different point. As someone who always has 2 machines running in parallel, one ancient desktop on XP and a newer Thinkpad T530 on Win7-64, I do know the differences. And I do know why I prefer XP...

Having read all the stuff here at Doom9 about AVS+ and all the plugin modernization efforts, I can only say that most of this stuff is work in progress, it is far from stable. Mostly this refers to Pnterf's stuff (AVS+, MVTools2, MaskTools2 and more). I commend him for doing all the work he did, but the results often look like he updated stuff when he really did not understand the original code.

After playing a lot with the "modernized" plugins on my Win7 machine, I finally reverted to the old and stable tools (which also work under XP). Sure they are slower and do not offer "modern" features like high bit depth and advanced color spaces. But THEY JUST WORK. And I use these tools for "real" conversions, I do not have the time to chase down bugs.


Cheers
manolito
manolito is offline   Reply With Quote
Old 2nd February 2018, 01:31   #263  |  Link
VS_Fan
Registered User
 
Join Date: Jan 2016
Posts: 91
Quote:
Originally Posted by manolito View Post
After playing a lot with the "modernized" plugins on my Win7 machine, I finally reverted to the old and stable tools (which also work under XP). Sure they are slower and do not offer "modern" features like high bit depth and advanced color spaces. But THEY JUST WORK. And I use these tools for "real" conversions, I do not have the time to chase down bugs.
That statement makes one think you don't even use MT and, more importantly, you didn’t understand pinterf’s question:
Quote:
Originally Posted by pinterf View Post
New build ...
- Fix: rare crash in multithreading environment at the very first frames
(keeping XP compatibility with /Z:threadsafeinit- caused troubles!)...
That stupid crash took me weeks to catch until it turned out that a mysterious access violation is happening right in masktools2.
... When will XP die????
VS_Fan is offline   Reply With Quote
Old 2nd February 2018, 03:19   #264  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,644
Quote:
Originally Posted by VS_Fan View Post
That statement makes one think you don't even use MT
You are absolutely correct:
I use plain vanilla AviSynth 2.60 which is 32bit and single threaded. And I plan to stick with it for the time being. My encoding bottle neck is not AVS filters, it is the encoder.


Cheers
manolito
manolito is offline   Reply With Quote
Old 2nd February 2018, 09:01   #265  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
Can I just confirm the behaviour of mt_lut with different bit depths? I'll give some example screenshots of what is happening (including with 2.2.13). It's a random video frame.

Source, 8 bit:


mt_lut with 8 bit:


mt_lut 10 bit by:
convertbits(10)
mt_lut ( "x "+string(32)+" < 0 x "+string(45)+" > "+string(255)+" 0 x "+string(35)+" - "+string(255)+" "+string(32)+" "+string(65)+" - / * - ? ?" )
convertbits(8)



Same as above regarding convertbits but with paramscale (slightly different frame of scame clip, but it's the same effect right through the video as expected:
mt_lut ( "x "+string(32)+" < 0 x "+string(45)+" > "+string(255)+" 0 x "+string(35)+" - "+string(255)+" "+string(32)+" "+string(65)+" - / * - ? ?", paramscale="i8")


Now, here's the same frame as the first images but using mt_binarize in 10 bit:
convertbits(10)
mt_binarize(64)
convertbits(8)



So, regardless of anything, mt_lut does not scale to the 8-bit values when not under 8 bit, so the mask wouldn't work. However, mt_binarize does automatically scale to the 8 bit values, so the 64 works.

Is that correct behaviour of mt_lut in comparison to mt_binarize?
burfadel is offline   Reply With Quote
Old 2nd February 2018, 09:25   #266  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,256
Quote:
Originally Posted by burfadel View Post
Can I just confirm the behaviour of mt_lut with different bit depths?
[...]
mt_lut ( "x "+string(32)+" < 0 x "+string(45)+" > "+string(255)+" 0 x "+string(35)+" - "+string(255)+" "+string(32)+" "+string(65)+" - / * - ? ?", paramscale="i8")

So, regardless of anything, mt_lut does not scale to the 8-bit values when not under 8 bit, so the mask wouldn't work. However, mt_binarize does automatically scale to the 8 bit values, so the 64 works.

Is that correct behaviour of mt_lut in comparison to mt_binarize?
Expression string is not an additional parameter which is affected by paramscale in any way. Unlike the threshold parameter in binarize. A filter can see nothing from your string contacenating, it will see only the assembled result. String(number) is not a parameter, just a part of a string expression which is resolved by Avisynth during script parsing.

Try this one:
Code:
mt_lut ( "x 32 scaleb < 0 x 45 scaleb > range_max 0 x 35 scaleb - range_max 32 scaleb 65 scaleb - / * - ? ?")

Last edited by pinterf; 2nd February 2018 at 09:27.
pinterf is offline   Reply With Quote
Old 2nd February 2018, 10:37   #267  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Germany
Posts: 687
@VS_Fan... multi-threading in Avisynth totally depends on how the coder wrote the filter, 'cause Avisynth itself is single thread.
In other words: whoever is writing a plugin should implement multi-threading, otherwise it's gonna be single-thread.
MT mode it's a way to speed things up by running multiple instances of single-thread filters, but it's not perfect, it doesn't work with every single filter and should not be used with multi-threading filters, 'cause it would lower performances or worse (make AVS crash).

Quote:
Originally Posted by pinterf
When will XP die?
I'm using Windows Server 2016 on my server and Linux on my home desktop, but I'm also running Windows XP Professional x86 on a VM and I'm planning to keep it 'till the end of extended support (April 2019).
Anyway, I understand that supporting XP might require some additional work, but I think it would be really useful to keep XP compatibility.
And, by the way, I really appreciate what you have done in these years; I really do. A big fat thank you ^_^

@manolito... I'm using standard Avisynth too and I admit that although it's not bullet proof, it's actually very reliable.

Last edited by FranceBB; 2nd February 2018 at 10:44.
FranceBB is offline   Reply With Quote
Old 2nd February 2018, 13:02   #268  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,267
Whether tis 3% or 7% or some other, that is one helluva lot of machines, and will likely be slanted due to many XP m/c's being used offline,
just because you cannot see/count them, dont mean that they dont exist.
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 2nd February 2018, 14:38   #269  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,136
I'm just curious, what's so special about windows xp? there're many windows operating systems predating windows xp, how come some people could upgrade from those even earlier operating systems to xp and then just stopped, why aren't they still using stuff like DOS, oh no, why are they using computers and electricity?
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated
feisty2 is offline   Reply With Quote
Old 2nd February 2018, 15:44   #270  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,644
Because Windows did indeed improve up to XP (with the exception of the Millennium version which came out after Win98SE). After WinXP everything went downhill. Win8 and Win8.1 was a joke (at least for users without touchscreens), and Win10 is an absolute nightmare for me. Leaves Win7 which is not too bad, but only after tweaking dozens of things to make it resemble XP. This includes turning off this stupid UAC, tame this whole permissions thing, disable Virtual Store (I want to know where my files REALLY are stored). Also getting rid of the built-in ZIP support, installing Classic Startup Menu, make Windows use the DS source filters which I have installed instead of the crappy MS filters, and some more...

After applying all these tweaks I can live with Win7. But MS is actively working to put Win7 into the position WinXP is in now. Just read that their upcoming Office 2019 will need Win10. Once they succeed in making Win7 unusable I will certainly say goodbye to MS. I hope that ReactOS will be ready by then...
manolito is offline   Reply With Quote
Old 2nd February 2018, 15:53   #271  |  Link
feisty2
I'm Siri
 
feisty2's Avatar
 
Join Date: Oct 2012
Location: Los Angeles, California
Posts: 2,136
It's ur personal preference, u personally can't let go of the older windows user interface and that doesn't mean the new windows user interface is any worse than the older one, a personal preference is not a valid point to judge the good and bad of an operating system, btw the default start menu in xp is also different from previous windows versions, and I bet user like u surely won't take that default start menu in xp, u have to make that 98 style
__________________
If I got new ideas, will post here: https://github.com/IFeelBloated

Last edited by feisty2; 2nd February 2018 at 15:58.
feisty2 is offline   Reply With Quote
Old 2nd February 2018, 16:30   #272  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 2,644
Quote:
Originally Posted by feisty2 View Post
and I bet user like u surely won't take that default start menu in xp, u have to make that 98 style
How in the world did you know that?

I even have Win98SE still installed on a separate partition because I can't live without the old Delrina Winfax (newer fax software cannot touch it, and at least in Germany the legal situation requires oftentimes to send a fax instead of email).


Cheers
manolito
manolito is offline   Reply With Quote
Old 2nd February 2018, 16:54   #273  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,073
Quote:
Originally Posted by FranceBB View Post
@VS_Fan... multi-threading in Avisynth totally depends on how the coder wrote the filter, 'cause Avisynth itself is single thread.
In other words: whoever is writing a plugin should implement multi-threading, otherwise it's gonna be single-thread.
MT mode it's a way to speed things up by running multiple instances of single-thread filters, but it's not perfect, it doesn't work with every single filter and should not be used with multi-threading filters, 'cause it would lower performances or worse (make AVS crash).
Explaining things you don't actually understand as if you were an authority on the subject to someone who does understand it is generally regarded as rather rude. Your understanding is roughly kinda sorta correct for how Avs-MT worked circa 2010, but not now.
TheFluff is offline   Reply With Quote
Old 2nd February 2018, 21:37   #274  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,267
Nuttin bettter than WXP with all of that crap turned off, ie in W95/98 mode,
None of them daft transluscent blue menus to appreciate, hit a menu, it apprears, we dont have to 'appreciate it.

Pinterf, if you choose to abandon, I can accept and understand that, so can all others that live in the past, if that is what you want, go for it,

Of course I would personally be disapointed, but, who cares, shit on me, and Well I dont blame you.

Do what you will, to us lowely scoudrels. [EDIT: I'm quite sure that we will get by.]

EDIT: My fav was w2K, now that was a blast.(I hated XP, my hate got bigger and shifted focus with appearance of Vista).
__________________
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; 3rd February 2018 at 09:35.
StainlessS is offline   Reply With Quote
Old 3rd February 2018, 17:21   #275  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 1,293
Quote:
Originally Posted by feisty2 View Post
I'm just curious, what's so special about windows xp? there're many windows operating systems predating windows xp, how come some people could upgrade from those even earlier operating systems to xp and then just stopped, why aren't they still using stuff like DOS, oh no, why are they using computers and electricity?
well, many people love xp, included me, in 2003 my dad Pentium 4 pc was have 2 os, 1st Windows ME and 2nd win xp, since back then some people still use win me for some reason, but I used to use xp, and still sometimes in VM nowadays, it's generally nice os

https://www.youtube.com/watch?v=UZas45Zn9zU
__________________
My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 4th February 2018, 21:01   #276  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,494
The wiki still says VC2015 but for the new release you need VC2017, correct? Can someone with access (and knowledge) update it?

http://avisynth.nl/index.php/MaskTools2#Download
sneaker_ger is offline   Reply With Quote
Old 5th February 2018, 14:21   #277  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,377
readme for version 2.2.12 says "Visual Studio 2015 Update 3"
Confirmed with Dependency Walker.

EDIT sorry, somehow I missed the new release 2.2.13

Last edited by raffriff42; 5th February 2018 at 22:39.
raffriff42 is offline   Reply With Quote
Old 5th February 2018, 15:07   #278  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,494
Quote:
Originally Posted by pinterf View Post
New build
[...]
so it finally could be compiled and debugged with VS2017 (with some features disabled).
sneaker_ger is offline   Reply With Quote
Old 5th February 2018, 16:54   #279  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 1,256
Visual Studio 2015 and 2017 redistributables are interchangeable, both versions are 14.xx.
For example when you install Visual Studio 2017 Redistributables, it will remove VS2015 version.
@raffriff42: I missed editing that section. At the top of the page I have modified the text to "Requires Visual Studio redistributables (14.xx family)"
https://docs.microsoft.com/en-us/cpp...mpat-2015-2017
pinterf is offline   Reply With Quote
Old 11th February 2018, 20:36   #280  |  Link
ajp_anton
Registered User
 
ajp_anton's Avatar
 
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 782
Code:
function testing(clip c,bool info)
{ ... }

sourcefilter
testing(info=true)
error: invalid arguments.
Works if I make the argument "info" optional, or skip the argument name when calling the function.
ajp_anton 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 12:57.


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