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. |
29th January 2020, 16:50 | #5102 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
AviSynth Neo 0.1 (r2822, Neo, i386) AviSynth+ 0.1 (r2772, MT, i386) Quote:
I added this edit some posts ago, maybe you missed it. EDIT: IIRC, I noticed that result was not full white (probably due to 8 bit overlay'ed clip), and investigating further found the rubbish at bottom of white.
__________________
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 17:31. |
||
30th January 2020, 00:56 | #5103 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Updated post #5099 with full set of string matching routines:-
EDIT: Moved full set of string matching routines to new thread in Usage here:- https://forum.doom9.org/showthread.php?t=178243 No requirements except Groucho2004 SysInfo where indicated, should work in v2.58 AvsVersion.avsi Code:
# AvsVersion.avsi # https://forum.doom9.org/showthread.php?p=1897680#post1897680 /* These 3 require Groucho2004 SysInfo v0.119+, otherwise no requirements. AvsVersionNumberString(Type=1) AvsVersionNumberPartNo(Type=1) IsAvsVerOrGreater(Type=1) */ # Handy stuff [No requirements] Function SystemInfoVersion() { try{v=SysInfoVersion}catch(msg){v=-1.0} v } # v = -1.0, Groucho SysInfo not installed Function RT_StatsVersion() { try{v=RT_Version}catch(msg){v=-1.0} v } # v = -1.0, RT_Stats not installed Function GScriptExists() { ret=false try{ GScript(123,42.0,false,"") } catch(msg){ret = FindStr(msg,"Invalid arguments")>=1 } Return ret } Function FuncNameExists(String Fn) { Try{Eval(Fn+"()")B=True}catch(e){Assert(e.FindStr("syntax")==0,"FuncNameExists: Error in Function Name '"+Fn+"'")B=(e.FindStr("no function named")==0)}Return B} ### Function IsAvs26() { Return VersionNumber>=2.6} Function IsAvsPlus() { Return FindStr(VersionString,"AviSynth+")!=0||FindStr(VersionString," Neo")!=0 } # Deprecated: Function PlusBuildNumber() { V=VersionString Off=(!IsAvsPlus)?0:FindStr(V,"(r") Return (Off==0)?0:V.MidStr(Off+2).Value.Int } # Avs+ & Neo, (More than 4 digits, Max 24 bit, ~16M) Function AvsPlusVersionNumber() { Return PlusBuildNumber } # Deprecated, Stub for AvsPlusBuildNumber() Function IsAvsNeo() { Return FindStr(VersionString," Neo")!=0 } # Deprecated ###### # Return length of string S that matches any character in Chars set of characters [Default case insignificant]. # StrMatchChrLen("1234.567abcd","0123456789.") = 8 Function StrMatchChrLen(String s,String Chars,Bool "Sig") { Function __StrMatchChrLen_LOW(String s,String Chars,int n) { c=s.MidStr(n+1,1) Return(c==""||Chars.FindStr(c)==0) ? n : s.__StrMatchChrLen_LOW(Chars,n+1) } Sig=Default(sig,False) # Default Case Insignificant s=(Sig)?s:s.UCASE Chars=(Sig)?Chars:Chars.UCASE Return __StrMatchChrLen_LOW(s,Chars,0) } # Return length of string s that DOES NOT match any character in Chars set of characters [Default case insignificant]. # StrBrkChrLen("1234.567,abcd",",.") = 4 # If 1st character of s matches any in Chars set, then returns 0. # StrBrkChrLen("1234.567,abcd","321") = 0 # If no characters in s match any character in Chars set, then returns length of string s. # StrBrkChrLen("1234.567,abcd","NOP") = 13 Function StrBrkChrLen(String s,String Chars,Bool "Sig") { Function __StrBrkChrLen_LOW(String s,String Chars,int n) {c=s.MidStr(n+1,1) Return(c==""||Chars.FindStr(c)!=0)?n:s.__StrBrkChrLen_LOW(Chars,n+1)} Sig=Default(sig,False) # Default Case Insignificant s=(Sig)?s:s.UCASE Chars=(Sig)?Chars:Chars.UCASE Return __StrBrkChrLen_LOW(s,Chars,0) } Function AvsVersionNumberString(Int "Type") { /* Type = Default 0. Get version string from VersionString [Type=0] OR SysInfo::AI_AvsProductVersion [Type=1] # Type=1, Requires Groucho SysInfo v0.119+ Return string guaranteed 4 dot separated digits, eg "1.23" becomes "1.23.0.0" */ myName="AvsVersionNumberString: " Type=Default(Type,0) # Default is version number from VersionString Assert(0 <= Type <= 1,myName+"0 <= Type <= 1 ("+String(Type,"%.f")+")") Assert(Type!=1 || SystemInfoVersion>=0.119,myName+"Groucho2004 SysInfo v0.119+ required") s = (Type==0) ? VersionString : AI_AvsProductVersion s = (Type==0) ? s.MidStr(s.StrBrkChrLen("0123456789.",True)+1) : s s = (Type==0) ? s.LeftStr(s.StrMatchChrLen("0123456789.",True)) : s d=s.FindStr(".") n1=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1) d=s.FindStr(".") n2=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1) d=s.FindStr(".") n3=(d==0)?s:s.LeftStr(d-1) s=(d==0)?"":s.MidStr(d+1) d=s.FindStr(".") n4=(d==0)?s:s.LeftStr(d-1) (n1==""?"0":n1)+"."+(n2==""?"0":n2)+"."+(n3==""?"0":n3)+"."+(n4==""?"0":n4) } Function AvsVersionNumberPartNo(int PartNo, Int "Type") { /* Type, Default 0 [0 -> 1]. Get dot separated Version Part number as Int from AvsVersionNumberString(type=Type). [eg "1.2.3.4"] Where PartNo=1->4. 1=MAJOR version: 2=MINOR version : 3=Part3 version : 4=Part4 version */ PartNo=Min(Max(PartNo,1),4) # Limit Range 1->4 s=AvsVersionNumberString(Type) # eg "1.2.3.4", guaranteed 4 dot separated digit strings. d=s.FindStr(".") n1=s.LeftStr(d-1) s=s.MidStr(d+1) d=s.FindStr(".") n2=s.LeftStr(d-1) s=s.MidStr(d+1) d=s.FindStr(".") n3=s.LeftStr(d-1) n4=s.MidStr(d+1) Return ((PartNo==1)?n1:(PartNo==2)?n2:(PartNo==3)?n3:n4).Eval } Function IsAvsVerOrGreater(int a,int "b",int "c",int "d", Int "Type") { /* Type, Default 0 [0 -> 1]. Compares with dot separated version number obtained from VersionString[Type=0] OR SysInfo::AI_AvsProductVersion[Type=1] */ b=Default(b,0) c=Default(c,0) d=Default(d,0) aa=AvsVersionNumberPartNo(1, Type) bb=AvsVersionNumberPartNo(2, Type) cc=AvsVersionNumberPartNo(3, Type) dd=AvsVersionNumberPartNo(4, Type) return (aa>a) || (aa==a && (bb>b || (bb==b && (cc>c || (cc==c && dd>=d))))) } Code:
# AvsVersion_Client.avs #Import(".\AvsVersion.avsi") ###################################### ### UnComment ONE of Below #### ###################################### ### #s=StrMatchChrLen("1234.567abcd","0123456789.") # = 8 #s=StrMatchChrLen("1234.567abcd","") # = 0 ## BUG CHK: Nul length Chars #s=StrMatchChrLen("","0123456789.") # = 0 ## BUG CHK: Nul length S #s=StrMatchChrLen("","") # = 0 ## BUG CHK: Nul length S & Chars # #s=StrBrkChrLen("1234.567,abcd",",.") # = 4 #s=StrBrkChrLen("1234.567,abcd","321") # = 0 #s=StrBrkChrLen("1234.567,abcd","NOP") # = 13 #s=StrBrkChrLen("1234.567,abcd","") # = 13 ## BUG CHK: Nul length Chars #s=StrBrkChrLen("","123") # = 0 ## BUG CHK: Nul length S #s=StrBrkChrLen("","") # = 0 ## BUG CHK: Nul length S & Chars ### EDIT: Above probably not of General Interest #s=PlusBuildNumber # = 2983 for Avs+ 3.4 s=AvsVersionNumberString # = 3.5.2.0 for current Avs+ 3.5.2 [From VersionString] #s=AvsVersionNumberString(Type=1) # = 3.5.2.0 for current Avs+ 3.5.2 [From SysInfo::AI_AvsProductVersion] #s=AvsVersionNumberPartNo(1) # = 3 for current Avs+ 3.5.2 [From VersionString] #s=AvsVersionNumberPartNo(2) # = 5 for current Avs+ 3.5.2 [From VersionString] #s=AvsVersionNumberPartNo(3) # = 2 for current Avs+ 3.5.2 [From VersionString] #s=AvsVersionNumberPartNo(4) # = 0 for current Avs+ 3.5.2 [From VersionString] #s=AvsVersionNumberPartNo(1,Type=1) # = 3 for current Avs+ 3.5.2 [From SysInfo::AI_AvsProductVersion] #s=AvsVersionNumberPartNo(2,Type=1) # = 5 for current Avs+ 3.5.2 [From SysInfo::AI_AvsProductVersion] #s=AvsVersionNumberPartNo(3,Type=1) # = 2 for current Avs+ 3.5.2 [From SysInfo::AI_AvsProductVersion] #s=AvsVersionNumberPartNo(4,Type=1) # = 0 for current Avs+ 3.5.2 [From SysInfo::AI_AvsProductVersion] #s=IsAvsVerOrGreater(3,5) # = True, for current Avs+ 3.5 [From VersionString] #s=IsAvsVerOrGreater(3,5,Type=1) # = True, for current Avs+ 3.5 [From SysInfo::AI_AvsProductVersion] #s=IsAvsVerOrGreater(10,0,0) # = False, for Avs+ 10.0.0, not yet implemented. [From VersionString] #s=IsAvsVerOrGreater(10,0,0,Type=1) # = False, for Avs+ 10.0.0, not yet implemented. [From SysInfo::AI_AvsProductVersion] Return BlankClip.subtitle("'"+String(s)+"'")
__________________
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; 2nd May 2020 at 13:12. Reason: Update |
30th January 2020, 03:18 | #5104 | Link |
Registered User
Join Date: Sep 2007
Posts: 5,374
|
inaccuracy in 10bit YUV conversion ?
This is a RGB24 => YUV444P10 => RGB24 conversion
Why is 10bit sufficient for avsresize(zimg/zlib) or vapoursynth for losslessness (at least for this image), but not avisynth internal conversion? But ConvertBits(12) instead of 10 makes it work for the internal https://www.mediafire.com/view/izsc2..._bird.png/file avs internal PSNR r:59.321403 g:87.953516 b:73.777761 average:63.933949 min:63.933949 max:63.933949 avsresize or vpy PSNR r:inf g:inf b:inf average:inf min:inf max:inf or you can visualize with subtract or overlay (difference mdoe) Code:
a=ImageSource("yuv_exprm_02_bird.png", pixel_type="RGB24") a ConvertToPlanarRGB() ConvertBits(10) #12bits work ConvertToYUV444(matrix="rec601") ConvertToPlanarRGB() ConvertToRGB24() b=last a ConvertToPlanarRGB() z_ConvertFormat(pixel_type="YUV444P10") z_ConvertFormat(pixel_type="RGBP10") ConvertToRGB24() z1=last #RGBP10 step before RGB24 works a ConvertToPlanarRGB() z_ConvertFormat(pixel_type="YUV444P10") z_ConvertFormat(pixel_type="RGBP") ConvertToRGB24() z2=last #RGBP8 step before RGB24 also works #comparing in RGB24 against original RGB24, amplify differences with levels Overlay(a,b , mode="Difference", pc_range=true) #or subtract(a,b) #Overlay(a,z1 , mode="Difference", pc_range=true) #or subtract(a,z1) #Overlay(a,z2 , mode="Difference", pc_range=true) #or subtract(a,z2) Levels(127, 1, 129, 0, 255, false) da=last return da This is RGB24<=>YUV444 ; so no chroma resampling and chroma location interpretation is not applicable either Last edited by poisondeathray; 30th January 2020 at 03:22. |
30th January 2020, 14:14 | #5105 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
There was a missing rounder in the V channel calculation at planar RGB -> YUV transform, 8 to 14 bits and SSE2 code. |
|
4th February 2020, 16:56 | #5106 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Bit more fiddle with VersionString stuff, Post #5103 updated:- https://forum.doom9.org/showthread.p...80#post1897680
Removed full string matching stuff script from Post #5099 to thread in Usage forum [ StrMatchDemo.avsi v1.00 ] :- https://forum.doom9.org/showthread.php?t=178243 EDIT: Added nul string BUG CHK's to Clients
__________________
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 19:45. |
5th February 2020, 02:35 | #5107 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Is me doin' summick rong agen
Code:
W=86 # Even non multiple of 8, BAD H=64 # Any Even OK (above some size) BlankClip(Length=1,Width=W,Height=H,Pixel_Type="RGBAP") # Planar RGBA 8 bit [ Same prob if "RGBP" ] #Return PointResize(512,512) # OK always ConvertToYV12 # Same prob if ConvertToYUY2 [ ConvertToRGB32/ConvertToRGB24 OK ] #ConvertToY8 Return PointResize(512,512) EDIT: Even Heights OK W Mulitples of 8, +0=GUD, +2=Bad, +4=Wurse, +6=Orful[as in image]. EDIT: With ConvertToY8 UnCommented [Problem not just in result ConvertToYV12 chroma channels] EDIT: Same problem with Pixel_Type="RGBP" [No Alpha channel] EDIT: Cant find any more bugs until this is fixed, I'm stuck at this. [Working on S_ExLogo2() script, target all avs versions(v2.58, v2.60/61, avs+), decent blurring, working in all colorspaces/depths (except YV411)].
__________________
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; 5th February 2020 at 06:05. |
5th February 2020, 08:51 | #5108 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
EDIT: Fixed Last edited by pinterf; 5th February 2020 at 09:42. |
5th February 2020, 09:49 | #5109 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
If no other problems found, mainly in Expr by real.finder or others, I'll prepare a release in some days (3.5)
Btw: is there anybody still using XP? (for those who are younger and haven't heard of this OS: XP wiki) (ha-ha ) edit: 3.5 test build, files only https://drive.google.com/open?id=10Q...QoUJIyX9jOAfD4 See readme.txt for changes Last edited by pinterf; 5th February 2020 at 10:12. |
5th February 2020, 14:33 | #5110 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I guess you're asking because you consider dropping XP support. That's a tough one. I know that there are still folks out there using XP and they'd be quite upset if XP support was dropped. I suppose it depends on things such as how many of those XP fossils are out there (I used to be one until just a few months ago) and will dropping XP support make things easier for you? Maybe the poll I started will shed a little light.
__________________
Groucho's Avisynth Stuff |
5th February 2020, 15:26 | #5111 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Of course I can make installers for all different flavours, but I'd prefer only one version, I don't have infinite time and to tell the truth it's quite inconveniant. |
|
5th February 2020, 16:29 | #5112 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Even though my main computer still runs WinXP, in the case of AVS+ I would not mind if XP support was dropped. For a very simple reason:
AVS+ 32 is way slower than classic AVS 2.61 Alpha on this machine. Probably because I have only 576 MB of RAM, and AVS+ needs a lot more RAM to become faster than classic AVS. |
5th February 2020, 17:26 | #5113 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Maybe lets get all bugs fixed first, yes
EDIT: And for those of you that do not sprechen die Hungarian:- https://en.wikipedia.org/wiki/Windows_XP EDIT: I gots it P, Ill give it a whirl, thanx
__________________
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; 5th February 2020 at 18:01. |
5th February 2020, 19:36 | #5114 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
5th February 2020, 19:45 | #5115 | Link | ||
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Quote:
Edit: QED: Script Code:
LoadCPlugin("E:\Apps\VideoTools\AVSPlugins\CPlugs\ffms2_32.dll") FFVideoSource("TestDenoise.mkv", threads = 1) MCD() function MCD(clip video, int "threshold") { last = video threshold = default(threshold, 200) bs = (width() > 960) ? 16 : 8 sc = MSuper(pel = 2, sharp = 1, hpad = 16, vpad = 16) backward_vector = MAnalyse(sc, isb = true, delta = 1, blksize = bs, overlap = bs / 2, sadx264 = 4) forward_vector = MAnalyse(sc, isb = false, delta = 1, blksize = bs, overlap = bs / 2, sadx264 = 4) backward_vector = MRecalculate(sc, backward_vector, blksize = bs / 2, overlap = bs / 4, thSAD = 100) forward_vector = MRecalculate(sc, forward_vector , blksize = bs / 2, overlap = bs / 4, thSAD = 100) MDegrain1(sc, backward_vector, forward_vector, thSAD = threshold) return last } Code:
Frames processed: 310 (0 - 309) FPS (min | max | average): 1.108 | 16.57 | 4.395 Process memory usage (max): 701 MiB Thread count: 1 CPU usage (average): 24.9% Code:
Frames processed: 310 (0 - 309) FPS (min | max | average): 0.763 | 16.65 | 4.414 Process memory usage (max): 281 MiB Thread count: 5 CPU usage (average): 24.9%
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 5th February 2020 at 20:10. |
||
5th February 2020, 20:15 | #5116 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Mobile:
__________________
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 ??? |
|
5th February 2020, 20:40 | #5117 | Link | ||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
Version 2.61 contains a newer and much better version of TimeStretch. Quote:
https://forum.doom9.org/showthread.p...68#post1863768 Of course I had to use a Non-SSE2 version of AVS+ for my machine. And AvsMeter clearly shows that there is no advantage whatsoever using AVS+ on this computer. All the new features of AVS+ are not for me, I have no interest in high bitdepth or hi colors, and UHD or even HD clips are not usable on this machine anyways. Last edited by manolito; 5th February 2020 at 20:44. |
||
5th February 2020, 21:22 | #5118 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Forgot about that. Excuse an old fart for not committing each of his Doom9 posts to memory.
__________________
Groucho's Avisynth Stuff |
5th February 2020, 22:10 | #5119 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Me only really uses 8 bit output, but high bitdepth maintains precision across many transitions/filters not such a bad thing really. [EDIT: I'm not quite there yet, but aiming for it ].
__________________
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; 5th February 2020 at 22:30. |
6th February 2020, 05:51 | #5120 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|