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. |
2nd August 2020, 22:43 | #621 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Has something changed with animate? I just dug out an old script which used animate without specifying a clip (i.e. using implicit last) but that no longer seems to work. Now I have to specify "last" or tack it directly on the end:
Code:
# this works: colorbars.animate(0,100,"blur",0.1,1.5) # this works: colorbars animate(last, 0,100,"blur",0.1,1.5) # this DOESN'T work: colorbars animate(0,100,"blur",0.1,1.5) Last edited by wonkey_monkey; 11th August 2020 at 10:30. |
4th August 2020, 22:53 | #622 | Link |
Registered User
Join Date: Aug 2006
Location: Stockholm/Helsinki
Posts: 805
|
Code:
colorbars.converttoyv12 trim(0,0) writefileif(last, "test.txt", "ydifferencefromprevious==0", "current_frame") Comment out the trim, and it works. Also works with "trim(last,0,0)", but "last.trim(0,0)" fails. Last edited by ajp_anton; 4th August 2020 at 22:56. |
5th August 2020, 10:54 | #624 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
6th August 2020, 04:15 | #625 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
__________________
Groucho's Avisynth Stuff |
|
11th August 2020, 17:43 | #626 | Link |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Avisynth+ 3.5 on XP.
The following results in an access violation error message. ConvertToRGB64().ConvertBits(8, dither=1) As does this. ConvertToRGB48().ConvertBits(8, dither=1) Without dithering, or with dither=0, they're fine. While I'm here, is there any dithering applied for this sort of down-conversion? ConvertToRGB64().ConvertToRGB32() Thanks. Last edited by hello_hello; 11th August 2020 at 17:48. |
11th August 2020, 18:29 | #627 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
You should use planar RGB for any processing ConvertToPlanarRGB() But maybe a better error message could be added Quote:
|
||
11th August 2020, 19:59 | #628 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
ConvertBits(8, dither=1) I should have made the clear. If a source is interlaced RGB, the script I'm working on converts the colorimatry with HDRTools the following way. It's probably not something there'd be a need for often, but the option is included. ConvertToRGB64().ConvertRGBtoXYZ(Color=2).ConvertXYZtoRGB(Color=3) This way for planer: ConvertBits(32).ConvertRGBtoXYZ(Color=2).ConvertXYZtoRGB(Color=3) It makes it a little easier to convert back to the original bitdepth afterwards, but do you know if there's an advantage to always using a planar input? It needs to be RGB32, RGB64 or 32 bit planer, but RGB32 causes color banding. But why can I down-convert with dither=0 or dither=-1? Is there a reason dither=1 can't be used when down converting RGB64 or RGB48? Does that mean for converting an RGB64 source to RGB32, there's no difference between these two methods? ConvertBits(8, dither=-1) ConvertToRGB32() I assumed it'd be better to dither when down-converting. Is that correct? Thanks. |
|
11th August 2020, 20:23 | #629 | Link | ||
Registered User
Join Date: Sep 2007
Posts: 5,377
|
Quote:
It's analogous to YV16 vs. YUY2 . Planar vs. Packed eg. "RGB64" would be "RGBAP16" . Both are 16bit per channel RGB with alpha http://avisynth.nl/index.php/Avisynthplus_color_formats Planar processing is faster; most modern filters work with planar. Packed support is only for legacy purposes When something doesn't work in avisynth for RGB processing , chances are you need planar RGB. That's where some better error message could be helpful Quote:
"Better or not" depends on the situation Last edited by poisondeathray; 11th August 2020 at 20:28. |
||
18th August 2020, 12:46 | #631 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Code:
# this DOESN'T work: colorbars Animate(0,100,"blur",0.1,1.5) Passing the parameters with the syntax above will find the "clipless" version. Animate is created O.K. When its internal expression parameter "blur" is evaluated later, it turnes out that it requires a clip. But it's too late, function with the matching (clipless) function signature was already chosen and Invoking "Animate" as a whole will fail and giving a function arguments error. When such function parameter error exception is thrown, Avisynth will try to give a second changce and find the appropriate function with a forced clip ("last") variable. |
|
18th August 2020, 12:51 | #632 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Fixed on git, result should be the same as with planar RGB formats. Indeed, in this case 16 bit packed formats are treated internally (losslessly converted to and from) as planar RGB. |
|
18th August 2020, 12:55 | #634 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
AVX2 issue which occurs with non mod32 width. |
|
18th August 2020, 14:07 | #635 | Link |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Code:
Function SCDetect(clip c, string "scFile", int "thSCD1", int "thSCD2", float "mDiff", int "pel", int "search", int "searchparam", bool "preblur", bool "info"){ scFile = Default(scFile, "scFile.log") thSCD1 = Default(thSCD1, 360) thSCD2 = Default(thSCD2, 120) mDiff = Default(mDiff, 2.5) pel = Default(pel, 1) search = Default(search, 4) searchparam = Default(searchparam, 2) preblur = Default(preblur, true) info = Default(info, false) last = preblur ? c.RemoveGrain(20, 0) : c Assert( IsYV12 , "SCDetect needs YV12 input!" ) super = MSuper(pel=pel, chroma=false) vector = super.MAnalyse(pelsearch=pel, search=search, searchparam=searchparam, chroma=false) global scMask = MSCDetection(vector, thSCD1=thSCD1, thSCD2=thSCD2).Crop(0,0,16,16) global SC_mD = mDiff global mean = Histogram(mode="Color").Crop(width+64, 64, 128, 128) SCTrue = c.Subtitle("Scene change: true" ) SCFalse = c.Subtitle("Scene change: false") info ? ConditionalFilter( last, SCTrue, SCFalse, "boolSC", "==", "true" ) \ : nop FrameEvaluate( """global boolSC = \ ( \ ( scMask.YPlaneMax == 255 ) && \ ( \ (mean.YDifferenceFromPrevious > SC_mD*3) || \ ( \ (mean.YDifferenceFromPrevious > SC_mD) && \ (mean.YDifferenceFromPrevious > (mean.YDifferenceToNext+mean.loop(0, 0, -1).YDifferenceToNext+mean.loop(0, 0, 1).YDifferenceToNext)/1.2) \ ) \ ) \ )""" ) ( scFile != "nul" ) ? WriteFileStart( scFile, """ "# Scene change frame list" """ ).WriteFileIf( scFile, "boolSC==true", "current_frame" ) : nop return last } ColorBars Converttoyv12 SCDetect
__________________
See My Avisynth Stuff |
20th August 2020, 00:10 | #636 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
4th September 2020, 16:42 | #637 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Suspect BUG.
Prefetch(), seem to interfere with scriptclip evaluated runtime functions, optional named args, following an array of data args. Here, and the following post:- https://forum.doom9.org/showthread.p...11#post1922711
__________________
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 ??? |
4th September 2020, 16:59 | #638 | Link | |
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
|
Quote:
__________________
See My Avisynth Stuff |
|
4th September 2020, 17:02 | #639 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanks RF, no I did not yet, I always have problems downloadng Pinterf google drive stuff, I'll boot to linux and re-try download.
EDIT: Got it under linux. It actually downloads under Windows 7 with Opera (I forgot this time about Opera, but downloads usually only after some wait), I have big-ish hosts file on windows blocking all kinds of ads/telemetry and stuff, Also Adblock origin, flash block and other stuff under both linux and windows versions of firefox, so its probably my system hosts and firefox addons that cause me problems.
__________________
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 September 2020 at 17:12. |
4th September 2020, 17:26 | #640 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yep, 3.6.2 test 2, removes the problem OK, thanks RF, sorry for the bother P & Q.
EDIT: I dont usually download files only test version of Avs+, until/unless there is an XP version included.
__________________
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 September 2020 at 17:33. |
|
|