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

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 1st August 2016, 14:05   #2241  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by MysteryX View Post
In my own software, I also have a AVS version check and I implemented it the same way as AVStoDVD: check the DLL version. Why? Because it's much simpler than referencing the DLL and calling its API, and it gives me what I want.

As for what value it returns, it's doing what it should: returning its version number. It may have the AviSynth 2.6 interface, but it's AviSynth+, and that's what I wanted to know.

...

I personally wouldn't use this because AviSynth.dll can work as a stand-alone DLL.
All that won't tell you if all dependencies are present. Not just the VC runtimes, the "official" Avisynth depends on devil.dll being present in the same directory.

So, I certainly wouldn't call avisynth.dll a "standalone" DLL (whatever that means).

Don't forget the first axiom for developers:
"Assumption is the mother of all f*ck-ups"
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 1st August 2016 at 14:10.
Groucho2004 is offline  
Old 1st August 2016, 14:39   #2242  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Quote:
Originally Posted by Groucho2004 View Post
So, I certainly wouldn't call avisynth.dll a "standalone" DLL (whatever that means).

Don't forget the first axiom for developers:
"Assumption is the mother of all f*ck-ups"
Still, I assume ... that he may mean: The avisynth.dll does not necessarily need to be installed and hooked into the VfW API; an application may as well load it dynamically and use it via native interface.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 1st August 2016, 14:51   #2243  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LigH View Post
Still, I assume ... that he may mean: The avisynth.dll does not necessarily need to be installed and hooked into the VfW API; an application may as well load it dynamically and use it via native interface.
I can't bring myself to call a DLL stand-alone even if it is statically linked and has no dependencies (apart from system DLLs like kernel.dll). The DLL can't do anything on its own, it has to be loaded by an application.
Semantics - perhaps.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 1st August 2016, 14:57   #2244  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,753
Well, yes ... maybe rather call it "indirect use" (using a system-wide registered DLL via VfW API) versus "direct use" (using a local DLL via native AviSynth interface, regardless of its system-wide installation into the VfW API).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 2nd August 2016, 01:38   #2245  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Yeah, just copy AviSynth.dll and Devil.dll into either the system folder or the app folder and you're good to go.

Or more common, AviSynth 2.6 (or perhaps even 2.5.8) was installed and the DLL got replaced by AviSynth+ (before the new installer got released). In that case I wouldn't rely on the way the installer sets things up.
MysteryX is offline  
Old 3rd August 2016, 21:33   #2246  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,100
Quote:
Originally Posted by MysteryX View Post
In my own software, I also have a AVS version check and I implemented it the same way as AVStoDVD: check the DLL version. Why? Because it's much simpler than referencing the DLL and calling its API, and it gives me what I want.
That's retarded. It doesn't give you what you or the user wants at all. What you want is to know if you can load and successfully use the DLL. Checking metadata does not tell you anything at all about that and will lead to both false positives and false negatives (like in this AVS2DVD case).

The robust way to do feature detection is to try it and see if it works. Doing it this way also gives you graceful error handling unless you're being actively terrible about it.

Last edited by TheFluff; 4th August 2016 at 00:05.
TheFluff is offline  
Old 4th August 2016, 03:41   #2247  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by TheFluff View Post
That's retarded. It doesn't give you what you or the user wants at all. What you want is to know if you can load and successfully use the DLL. Checking metadata does not tell you anything at all about that and will lead to both false positives and false negatives (like in this AVS2DVD case).

The robust way to do feature detection is to try it and see if it works. Doing it this way also gives you graceful error handling unless you're being actively terrible about it.
No, what I want to know is whether to generate scripts using the 2.6 MT syntax or the AVS+ MT syntax. There are small script differences.

"Try and see" won't tell me this.

Plus in .NET, I cannot instantiate the DLL to call its API unless there is a DLL wrapper to expose its interface, and I don't use it directly in my code. I generate the script, then call avs2yuv or x264 or ffmpeg
MysteryX is offline  
Old 12th August 2016, 22:37   #2248  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
As we are with internal mode creations (like uint16 and float), i would like to make a suggestion : An RGB planar mode.
This could be interesting for people who work with RGB video, don't want to convert them in YUV, but want good speed processing, because RGB32/RGB24 mode are not the easier data storage mode to process. The work will be minimal, because an RGB planar mode is somehow exactly the same thing than YV24. Your picture has 3 planes of the same size. You call for YV24 and RGBplanar exactly the same functions with the exact same parameters. Except, of course, format convertion functions.
What do you think ?
jpsdr is offline  
Old 12th August 2016, 23:44   #2249  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by jpsdr View Post
As we are with internal mode creations (like uint16 and float), i would like to make a suggestion : An RGB planar mode.
This could be interesting for people who work with RGB video, don't want to convert them in YUV, but want good speed processing, because RGB32/RGB24 mode are not the easier data storage mode to process. The work will be minimal, because an RGB planar mode is somehow exactly the same thing than YV24. Your picture has 3 planes of the same size. You call for YV24 and RGBplanar exactly the same functions with the exact same parameters. Except, of course, format convertion functions.
What do you think ?
https://github.com/AviSynth/AviSynthPlus/pull/84

The big pixel type pull request, opened on July 26th. Not everything in there is working yet, but Planar RGB was there from the start.
qyot27 is offline  
Old 12th August 2016, 23:53   #2250  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,309
Ah... Ok...
jpsdr is offline  
Old 14th August 2016, 12:31   #2251  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
r2150 integrates work from chikuzen, pinterf, and qyot27. The colorspaces are further extended with initial support for planar RGB and alpha channel, new SSE2 and other optimizations are available, support for building with VS2013 is improved, there are some small fixes here and there, and of course a bunch of cleanups. API support for negative ("forced") alignment of video frames is deprecated and disabled, we think this is safe and have seen no regressions during testing, but just in case, there is a new diagnostic warning in the recently added logging system if a plugin is found relying on it.

Code for the new colorspaces added in the past weeks is still in a flux, so keep in mind this is a work in progress. Still, large and usable parts are already done, like support in the API, in various conversion functions, and in many-many internal filters. As always, please write to this thread if you see any regressions or have any other feedback.
__________________
AviSynth+

Last edited by ultim; 14th August 2016 at 13:11. Reason: added missing info to list of changes
ultim is offline  
Old 14th August 2016, 13:41   #2252  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Perhaps the one thing missing to make the new 16-bit code actually usable is dithering back to 8-bit. Until then, it's academic work that can't be used for production.

P.S. Slightly off-topic but... Ultim, I find it a strange coincidence that our avatar is the same circle with the same border width. Yours is empty though.
MysteryX is offline  
Old 14th August 2016, 13:47   #2253  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by MysteryX View Post
P.S. Slightly off-topic but... Ultim, I find it a strange coincidence that our avatar is the same circle with the same border width. Yours is empty though.
You should write about it in your blog.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 14th August 2016 at 14:08.
Groucho2004 is offline  
Old 14th August 2016, 14:49   #2254  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
I updated RawSourcePlus and avs2pipemod to support r2150 new features.

RawSourcePlus

avs2pipemod

These are also experimental because the new features are still experimental.
When input and output aren't supported, it isn't possible to be a victim.
Therefore I announce to only the people watching this thread.
__________________
my repositories

Last edited by Chikuzen; 14th August 2016 at 16:38.
Chikuzen is offline  
Old 14th August 2016, 16:02   #2255  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by MysteryX View Post
Perhaps the one thing missing to make the new 16-bit code actually usable is dithering back to 8-bit. Until then, it's academic work that can't be used for production.
There's already these:

Quote:
Originally Posted by pinterf View Post
Bit-depth conversions (no dithering, no range conversion, etc...)
  • ConvertTo8bit()
  • ConvertTo16bit()
  • ConvertToFloat()
No dithering but for that you can always use Dither:
Code:
16-bit source
ConvertToStacked()
DitherPost()
or f3kdb:
Code:
16-bit source
ConvertToStacked()
f3kdb(input_mode=1, input_depth=16, output_depth=8)
----

MysteryX, did you ever fix this?

Quote:
Originally Posted by MysteryX View Post
Quote:
Originally Posted by ultim View Post
MysteryX, I took a quick look at your source of AviSynthShader to verify something. Whenever you call GetFrame() to get your input frames, pull those calls out of your mutex lock! The way your filter operates right now is forcing the other filters it calls into mode 3! Not nice.

The occurance I linked to might not be the only one, it was just the first I've found.
Oh! That is one is very easy to fix: move the unique_lock down a few lines.

Good catch, I never thought about that.
Reel.Deel is offline  
Old 14th August 2016, 16:11   #2256  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
Quote:
Originally Posted by Reel.Deel View Post
or f3kdb:
Code:
16-bit source
ConvertToStacked()
f3kdb(input_mode=1, input_depth=16, output_depth=8)
Code:
16-bit source
ConvertToDoubleWidth()
f3kdb(input_mode=2, input_depth=16, output_depth=8)
ConvertToDoubleWidth() is zero cost.
You shoudn't use Stack16 if filter support DoubleWidth(Interleaved) formats.
__________________
my repositories
Chikuzen is offline  
Old 14th August 2016, 17:38   #2257  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
It seems that CreateScriptEnvironment() is not exported for 64 bit.

Edit: I see it's fixed in r2151, thanks.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 14th August 2016 at 17:43.
Groucho2004 is offline  
Old 14th August 2016, 18:00   #2258  |  Link
ultim
AVS+ Dev
 
ultim's Avatar
 
Join Date: Aug 2013
Posts: 359
ConvertToStacked()/ConvertToDoubleWidth() provide a hack to be able to interface existing dither functions. I'd like to kill these two (and their counterparts) ASAP, so if any of you can find the time, please consider adding proper high bit-depth support to dithertools and f3kdb, at least to the functions for dithering down.

edit: give a note if you decide to help out with these, so that others won't start on it too.
__________________
AviSynth+

Last edited by ultim; 14th August 2016 at 18:04.
ultim is offline  
Old 14th August 2016, 18:46   #2259  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by Reel.Deel View Post
MysteryX, did you ever fix this?
Fixed? Yes. Released? No.

There were are few other things that still need to be fixed.

Thanks for the reminder, I forgot about that one.
MysteryX is offline  
Old 15th August 2016, 00:56   #2260  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by Chikuzen View Post
Code:
16-bit source
ConvertToDoubleWidth()
f3kdb(input_mode=2, input_depth=16, output_depth=8)
ConvertToDoubleWidth() is zero cost.
You shoudn't use Stack16 if filter support DoubleWidth(Interleaved) formats.
and he can use

Code:
f3kdb_dither(mode=1, stacked=false, input_depth=16)
for only dithering without debanding
__________________
See My Avisynth Stuff
real.finder is offline  
Closed Thread

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 16:00.


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