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. |
28th January 2020, 15:17 | #5081 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanx P & Q. (No not Uma & Quentin).
This bug persists. https://forum.doom9.org/showthread.p...29#post1893529 Code:
BITS=16 BlankClip.ConvertToYV12.ConvertBits(BITS) X = 16 Y = 16 W = 128 H = 128 #COL=$00FFFFFF # No Alpha COL=$FFFFFFFF # Full Alpha WHT=BlankClip(Width=W,Height=H,Color=COL) # Prob if RGB32 or YV12, but not YUV420P16 WHT=WHT.ConvertToYV12 #WHT=WHT.ConvertBits(BITS) Overlay(WHT,x=X,y=Y) crop(0,0,W+2*X,H+2*Y) # Crop Overlayed with 16 pixels border PointResize(512,512) # for view
__________________
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 ??? |
28th January 2020, 15:24 | #5082 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
28th January 2020, 16:21 | #5083 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Version Strings [3.4]
3.4 x86 3.4 x64 Version Strings [3.4.1] (well, as current) 3.4.1_x86 3.4.1_x64 Its a bit linuxy [but is 2020, nice]
__________________
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 ??? |
28th January 2020, 16:46 | #5084 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
The script is using a 8 bit mask over a 16 bit base clip. Since no automatic bit-depth conversion happens, the result is undefined. Unfortunately there is no error message for this case. I'll put one there later. |
|
28th January 2020, 16:54 | #5085 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yeh well, I need lots of sanity checks. [and maybe a few sobriety checks too]
Quote:
__________________
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; 28th January 2020 at 17:01. |
|
28th January 2020, 17:15 | #5087 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Maybe I also add, "AvsPlusBugfixVersionNumber()", for the 3rd '.' separated part.
Then you can do mods when and where you like. EDIT: I hate them there daft multiple dot version numbers, they are insane.
__________________
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 ??? |
28th January 2020, 18:04 | #5088 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
28th January 2020, 18:49 | #5089 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Kudos that it worked at all and did not go BANG! # ... Something like this (I've used PlusBuildNumber, maybe version number should return the 3.4 bit, dont know) Code:
Function IsAvs26() { VersionNumber>=2.6} Function IsAvsNeo() { FindStr(VersionString," Neo")!=0} Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!=0||IsAvsNeo} Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?0:FindStr(V,"(r") return (Off==0)?0:V.MidStr(Off+2).Value.Int } # OK Avs+ & Neo, up to build about 16Million Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Stub for PlusBuildNumber(), suggest AvsPlusVersionNumber is deprecated. EDIT: Eval("2983,") would fail due to trailing comma, "2983,".Value.Int, Value ignores comma but produces float, Int converts to integer. [supports more than 4 digits, max 24 bit, ~16M] EDIT: Version Strings Code:
# AviSynth v2.58 AviSynth 2.58, build:Dec 22 2008 [08:46:51] # AviSynth v2.60 AviSynth 2.60, build:Mar 31 2015 [16:38:54] # AviSynth v2.61 Alpha AviSynth 2.61, build:May 17 2016 [16:06:18] VC2008Exp # Avisynth v2.60 ICL AviSynth 2.60 (ICL10) # Avisynth V2.60 MT AviSynth 2.60, build:Feb 20 2015 [03:16:45] # Avisynth NEO AviSynth Neo 0.1 (r2822, Neo, i386) AviSynth Neo 0.1 (r2822, Neo, x86_64) # Avisynth NEO Forerunner Avisynth+ CUDA AviSynth+ 0.1 (r2533, CUDA, i386) AviSynth+ 0.1 (r2533, CUDA, x86_64) # Avisynth+ v2.60 (older) AviSynth+ 0.1 (r2772, MT, i386) AviSynth+ 0.1 (r2772, MT, x86_64) # Avisynth+ v3.4 (Prev) AviSynth+ 3.4 (r2923, 3.4, i386) AviSynth+ 3.4 (r2923, 3.4, x86_64) # Avisynth+ v3.4.1 (NOW) AviSynth+ 3.4 (r2983, linux3, i386) AviSynth+ 3.4 (r2983, linux3, x86_64) [ Something_MAJOR, Something_MINOR, something_BUGFIX ??? ]
__________________
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; 29th January 2020 at 02:15. |
|
28th January 2020, 20:40 | #5090 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
Quote:
The test build's huge revision jump is due to the Linux support commits, shielding the Windows-only parts behind ifdefs and [amongst other changes to get it to build] switching the vast majority of the MSVC-specific types to stdint in places that aren't specific to one OS or the other. I just wasn't sure if any of those sorts of changes might end up impacting operations in any way, is all. Oh, and I added the VersionEx() function, which - eventually - would be intended to provide a verbose list of different internal versioning or values thatan end user may want to check. It's still nearly identical to Version(), save for also including the compiler info (currently only tested with MSVC and GCC, not Clang, and definitely not ICL). |
|
28th January 2020, 20:43 | #5091 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,420
|
VersionNumber returning 2.60 is pretty much just for legacy applications that expect to find 2.6 (and I'm not really sure how prevalent that ever was, vs. checking the AVISYNTH_INTERFACE_VERSION or some such). Honestly, if there's not a real threat of breaking anything if we actually bump it up to what the version number currently is, I wouldn't be opposed to it.
|
28th January 2020, 21:10 | #5092 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I use versionNumber only like so, [below originally posted here:- https://forum.doom9.org/showthread.p...99#post1894699 ]
Code:
Function IsAvs26() { VersionNumber>=2.6 } Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!= 0||FindStr(VersionString," Neo")!=0 } # Function AvsPlusVersionNumber() { IsAvsNeo?Eval(MidStr(VersionString,20,4)):IsAvsPlus?Eval(MidStr(VersionString,17,4)):0} Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?0:FindStr(V,"(r") return (Off==0)?0:V.MidStr(Off+2).Value.Int } # Avs+ & Neo Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Stub for PlusBuildNumber(), suggest AvsPlusVersionNumber is deprecated. # Function X_PixelType(clip c) { c IsAvs26 ? PixelType : IsYV12?"YV12":IsYUY2?"YUY2":IsRGB32?"RGB32":"RGB24" } # Eg "RGB32" or "YUV420P10" Function X_IsYV411(clip c) { c IsAvs26 ? IsYV411 : False } Function X_IsY(clip c) { c IsAvsPlus ? IsY : IsAvs26 ? IsY8 : False } # True=Single Plane : (!IsRGB)=True = Any type with Y, YUY2/YUVA/Y8 etc. Function X_Is420(clip c) { c IsAvsPlus ? Is420 : IsYV12 } Function X_Is422(clip c) { c IsAvsPlus ? Is422 : False } # YUY2_Clip.Is422=False [ie not Planar] Function X_Is444(clip c) { c IsAvsPlus ? Is444 : IsAvs26 ? IsYV24 : False } Function X_IsRGB48(clip c) { c IsAvsPlus ? IsRGB48 : False } Function X_IsRGB64(clip c) { c IsAvsPlus ? IsRGB64 : False } Function X_HasAlpha(clip c) { c IsAvsPlus ? HasAlpha : IsRGB32 } Function X_NumComponents(clip c) { c IsAvsPlus ? NumComponents : IsAvs26&&IsY8 ? 1 : IsRGB32 ?4 : 3 } # Num of channels Function X_Bpc(clip c) { c IsAvsPlus ? BitsPerComponent : 8 } # Bits per channel, 32 = Float Function X_YMod(clip c) { c IsAvsPlus ? (NumComponents==1||IsRGB?1:Height/ExtractU.Height):(IsYV12 ?2:1) } # Y Min crop multiple for Progressive Function X_XMod(clip c) { c IsAvsPlus ? (NumComponents==1||IsRGB?1:Width/ExtractU.Width):IsAvs26?(IsYV411?4:IsY8||IsRGB?1:2):(IsRGB?1:2)} # X Min crop multiple
__________________
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; 29th January 2020 at 02:12. |
28th January 2020, 21:24 | #5093 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
what about adding PlusVersionNumber?
and PlusBuildNumber or PlusReleaseNumber
__________________
See My Avisynth Stuff |
28th January 2020, 21:39 | #5094 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
28th January 2020, 21:59 | #5095 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
EDIT: I'll change to PlusBuildNumber() [its shorter]
__________________
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; 28th January 2020 at 22:11. |
|
28th January 2020, 22:05 | #5096 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
edit: Regarding PlusVersionNumber and (PlusBuildNumber or PlusReleaseNumber) both can be merge in one function like PlusVersion(string "type") PlusVersion("ReleaseNumber") and PlusVersion("VersionNumber")
__________________
See My Avisynth Stuff Last edited by real.finder; 28th January 2020 at 22:31. |
|
29th January 2020, 00:18 | #5097 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Code:
Function IsAvs26() { VersionNumber>=2.6} Function IsAvsNeo() { FindStr(VersionString," Neo")!=0} Function IsAvsPlus() { FindStr(VersionString,"AviSynth+")!=0||IsAvsNeo} Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?0:FindStr(V,"(r") return (Off==0)?0:V.MidStr(Off+2).Value.Int } # Avs+ & Neo, (Max 24 bit, ~16M) Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Stub for AvsPlusBuildNumber(), suggest AvsPlusVersionNumber is deprecated. # Return extent of string s that matches any chr in pat. Enter with n=0 Function StrMatchExtent(String s,String Pat,int n) { c=s.MidStr(n+1,1) Return (((c=="")?0:Pat.FindStr(c))==0) ? n : s.StrMatchExtent(Pat,n+1) } Function AvsVersionNumberString() { v=VersionString off=(FindStr(V,"AviSynth+ ")!=0)?FindStr(V,"AviSynth+ ")+10:(FindStr(V," Neo ")!=0)?FindStr(V," Neo ")+5:10 v=v.MidStr(Off) return v.LeftStr(StrMatchExtent(v,"0123456789.",0)) } Code:
s=AvsVersionNumberString() # Returns string eg "3.4.1" from "AviSynth+ 3.4.1 (r2983, linux3, x86_64)", works with ALL previous/current versions, can extract numbers from the string BlankClip subtitle(String(s)) # "3.4" for current, "3.4.1" if was implemented as such, "2.58" if old v2.58 AVS, "2.60" for AvsStd 2.6, "2.61" Latest avs std, "0.1" if NEO or avs+ build r2772.
__________________
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; 29th January 2020 at 02:00. |
29th January 2020, 00:45 | #5098 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
These string parsing acrobatics are making me dizzy.
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 29th January 2020 at 10:07. |
29th January 2020, 08:56 | #5099 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Some more acrobatics [might need a bit of testing, I'm gonna get some shut eye]
EDIT: Moved to new thread in Usage, here- https://forum.doom9.org/showthread.php?t=178243 See Post #5103 for Versioning ONLY routines:- https://forum.doom9.org/showthread.p...80#post1897680
__________________
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; 4th February 2020 at 16:47. |
29th January 2020, 10:34 | #5100 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Our aim should be just using a plain 2 or three digits version number such as 3.4, 3.4.1, 3.5.0. |
|
|
|