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 2nd March 2018, 01:58   #3981  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
BugRep.

Was playing with S_Exlogo() v1.1, Script:- https://forum.doom9.org/showthread.p...light=S_Exlogo

and was getting some kind of crash, isolated to this producing error in new avs+ (ok in avs standard).

Code:
BlankClip(Width=4,height=100,Pixel_type="YUY2",color=$808080)
Blur(1.0,0.0)   # Oh no, the humanity, Error
# EDIT ADDED Alternatives
Blur(1.0)   # Error
Blur(0.5)   # Error
Dont know how long it has been a prob.

EDIT: Seems to be Access Violation in VDFM.
EDIT: YV12, no prob.

EDIT: This S_Exlogo() line produced error (when pat_v string is evaluated).
Code:
    pat_v= ( \
        Select(ok_v, \
            ("NoneDummy" ) , \
            ( (HBlur==0.0) ? "Crop(PX-4,PY,4,PH).BilinearResize(PW*4,PH).Crop(PW*3,0,PW,PH)" \
                           : "Crop(PX-4,PY,4,PH).Blur(HBlur,0.0).BilinearResize(PW*4,PH).Crop(PW*3,0,PW,PH)" ) , \
            ( (HBlur==0.0) ? "Crop(PX2, PY,4,PH).BilinearResize(PW*4,PH).Crop(0,0,PW,PH)" \
                           : "Crop(PX2, PY,4,PH).Blur(HBlur,0.0).BilinearResize(PW*4,PH).Crop(0,0,PW,PH)" ) , \
            ( (HBlur==0.0) ? "StackHorizontal(Crop(PX-2,PY,2,PH),Crop(PX2,PY,2,PH)).BilinearResize(PW*3,PH).Crop(PW,0,PW,PH)" \
                           : "StackHorizontal(Crop(PX-2,PY,2,PH),Crop(PX2,PY,2,PH)).Blur(HBlur,0.0)" + \
                             ".BilinearResize(PW*3,PH).Crop(PW,0,PW,PH)" ) \
        ) \
    )
__________________
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 March 2018 at 02:30.
StainlessS is offline  
Old 2nd March 2018, 06:30   #3982  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Thanks. Will look at it soon.
EDIT: This YUY2 bug probably exists since forever (quicky tested with r2266), occurs when width is less than 8.
EDIT2: Crash happens when RGB32 has width<4, and RGB64 width<2

Last edited by pinterf; 2nd March 2018 at 09:31.
pinterf is offline  
Old 2nd March 2018, 10:52   #3983  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
New build r2636, original post edited. Thanks StainlessS for the report.
https://forum.doom9.org/showthread.p...48#post1835248
pinterf is offline  
Old 4th March 2018, 14:14   #3984  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 90
Nondescript error message in AviSynth+ 32 bit

Hello guys, new here.

I've been using AviSynth 32bit, now upgraded to AviSynth+ with that "use my old plugins" option.

Now my problem is, any time an error occurs, it seems I only get "Avisynth open failure: System exception - Access Violation". (Opening with VirtualDub or VirtualDub FilterMod)

64 Bit seems to output proper messages, for example when using with ffmpeg, but I am dependent on many 32 bit plugins from the old AviSynth.

Somewhere I read that the older release r1858-pfmod might work. I tried it (by replacing the dlls) and indeed now I got reasonable error messages like "function does not exist". I was even able to use loadPlugin to load ffms2 and load a clip with FFmpegsource2. The sad thing is, that version does not yet support deep color apparently, as it says it can't find the function ConvertBits.

Deep color is important to me and is the main reason I upgraded.

I am not sure what I'm doing wrong. I also tried running VirtualDub Filtermod as an administrator, no difference.

Interestingly, the error message does show the correct line in the script. When I move the loadPlugin for ffms2.dll down 2 lines, the error is shown as line 3 instead of 1.

But no matter what error it is, it's always just that System Exception. I can write "blahblurp" in there and still get a System Exception. This is not very helpful for debugging or finding errors.

I have a Windows 7 Ultimate 64 bit pc with an i7-3930k, 32GB RAM and a GTX 1070 on a Sabertooth X79, if it's any use.

Hope this can be resolved, as I have already tested the deep color functionality with the internal AVISource and it was pretty good! I hope to now be able to also use all my old plugins and get proper error messages.

Edit: I was able to avoid the error message altogether by calling ClearAutoloadDirs() in the beginning. Probably because I was using LoadPlugin anyway? Still, would be nice to resolve it.

Last edited by TomArrow; 4th March 2018 at 14:38.
TomArrow is offline  
Old 4th March 2018, 14:24   #3985  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
As usual in case of problems: Use
Code:
AVSMeter.exe -avsinfo -log
to check for the availability of and possible issues with plugins.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 4th March 2018, 14:28   #3986  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
TomArrow, At a guess, I might think plugin problem. Try Groucho2004 (on current avs+, forget older one)
Code:
AvsMeter -avsinfo -log
Post results.

EDIT: Arh, that pest LigH, is just too fast

EDIT: 64 bit provides error messages because it is not having a 32 bit plugin autoload problem.
Might also want to put ffms2 dll in autoload plugins directory, just to view the AvsMeter results relating to it. (can later remove)

EDIT: Some avs v2.6 plugins compiled with old avisynth header (prior to avisynth 2.6 Alpha 4) will crash if used on Avisynth v2.6 Alpha 4
and later, guessin that this may be the problem (because the older avs+ works ok, probably from pre alpha 4 era).

EDIT: Was your previous Avisynth version, before Avs 2.6 Alpha 4 ?
__________________
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 March 2018 at 15:03.
StainlessS is offline  
Old 4th March 2018, 14:47   #3987  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 90
Damn you guys are fast. Thanks for the answers!

I tried what you said and entered that commandline, but all I get is a "Query Avisynth info..." stuck for minutes with CPU at 17% or so (probably one core).

Edit: Interesting point. So your theory is basically that there are incompatible plugins in my folder and they trigger the error, even if the one I'm actually requesting is not responsible for the error? (since I was able to load it with loadPlugin after disabling autoload)

Last edited by TomArrow; 4th March 2018 at 14:54.
TomArrow is offline  
Old 4th March 2018, 15:00   #3988  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
v2.6 Alpha 4 and later sets some linkage stuff (below in blue), which is not done in plugins compiled before alpha 4.
When plugin accesses avisynth v2.6 Alpha 4 (and later) internal routines then below blue stuff not properly prepared and bang !!!

Code:
#ifdef AVISYNTH_PLUGIN_25
	extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) {
#else
	const AVS_Linkage *AVS_linkage = 0;
	extern "C" __declspec(dllexport) const char* __stdcall
			AvisynthPluginInit3(IScriptEnvironment* env, const AVS_Linkage* const vectors) {
	AVS_linkage = vectors;
#endif
    env->AddFunction("DeCrack", "c[[Fade]f",Create_DeCrack, 0);
    return "`DeCrack' DeCrack plugin";
	// A freeform name of the plugin.
}
EDIT: AvsMeter will probably not be able to tell you anything about bad plugin that is not compiled with later avisynth header,
Avsmeter might well crash for same reason as avisynth with old plugin in plugins directory. [EDIT: dont know if it checks AVS_linkage for NULL]
You may have to manually pinpoint bad plugins by trial and error (clear plugins, then add in batches of maybe 10 and test, then remove and try next batch, until problem batch located, then narrow down to bad plug [there may be more than 1 bad plug])

EDIT:
Quote:
Edit: Interesting point. So your theory is basically that there are incompatible plugins in my folder and they trigger the error, even if the one I'm actually requesting is not responsible for the error? (since I was able to load it with loadPlugin after disabling autoload)
Yes.

EDIT: Not sure, perhaps AVS_linkage=NULL, only produces a problem on last autoloaded bad plugin,
EDIT: Maybe not, I guess that AVS_linkage is private copy for each individual plugin.

EDIT: Found the problem thing here:- https://forum.doom9.org/showthread.p...27#post1703427
Quote:
Originally Posted by StainlessS View Post
@Jenyok,
Are you using an old version of Avisynth v2.6, If so, you need to update as ClipClop uses new AvisynthPluginInit3() only available in Alpha 4+ ?
(Or alternatively use the v2.58 dll).
There will (I think) be a reciprocal problem if plugin compiled with pre-Alpha 4 header, and not using AvisynthPluginInit3().
[So as previously posted in this thread, I was on the 'right track', but a bit back-to-front ]
__________________
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 March 2018 at 19:58.
StainlessS is offline  
Old 4th March 2018, 15:27   #3989  |  Link
TomArrow
Registered User
 
Join Date: Dec 2017
Posts: 90
Okay that makes sense, I will do that try-and-error for the batch of plugins when I find some time to do that. Meanwhile I'll just load manually. Thanks a lot!
TomArrow is offline  
Old 5th March 2018, 15:55   #3990  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
@raffriff42: Big thanks for the documentation update, I was just about to do that for recent r2636 changes and saw that you have already done that.
I have added one or two things (e.g. ColorYUV supports float, levels "TV", gamma handling, Histogram "bits") and clarified AddAlphaPlane that it can use a single Y clip or a number as the source for Alpha plane.
I hope I kept the standard formatting.
pinterf is offline  
Old 6th March 2018, 00:21   #3991  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
Yes, good work! You also caught an omission I made re: classic AviSynth - ColorYUV(levels="TV.Y")
raffriff42 is offline  
Old 13th March 2018, 12:49   #3992  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
EDIT: Oops, moved to Mvtools, then moved to here.
EDIT: Moved here from thread in Avisynth Usage

EDIT: Does NOT occur in AVS v2.61 standard.

Weird Colors in YUY2.

If using MPeg2source with UpConv=1 (YUY2) then wierd colors after MCDegrainSharp, OK if UpConv=0(YV12).

What is causing the problem (easy to solve, just dont use UpConv=1).

test.demuxed.log
Code:
Stream Type: Elementary
Profile: main@main
Frame Size: 720x576
Display Size: [not specified]
Aspect Ratio: 16:9 [3]
Frame Rate: 25.000000 fps
Video Type: PAL
Frame Type: Progressive
Coding Type: B
Colorimetry: BT.470-2 B,G*
Frame Structure: Frame
Field Order: 
Coded Number: 252
Playback Number: 2
Frame Repeats: 0
Field Repeats: 0
VOB ID: 
Cell ID: 
Bitrate: 
Bitrate (Avg): 
Bitrate (Max): 
Timestamp: 
Elapsed: 0:00:00
Remain: FINISH
FPS: 
Info:
test.demuxed.d2v (I modified path to .\test.demuxed.m2v so that it works from any path)
Code:
DGIndexProjectFile16
1
.\test.demuxed.m2v

Stream_Type=0
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,0,c65

900 5 0 0 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 340612 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 661168 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 985564 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 1305512 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 1621368 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 1937628 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 2253180 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 2569228 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 2883316 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 3193184 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 3499688 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 3807236 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 4115012 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 4424460 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 4726408 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 5023844 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 5317740 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 5616652 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 5912792 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 5 0 6198648 0 0 0 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2 ff

FINISHED  100.00% VIDEO
test.demuxed.avs
Code:
VideoFileName = ".\test.demuxed.d2v"

# YV12 OK, YUY2 produces weird output
UPCONV=1    # 0=YV12, 1 = YUY2

MPEG2Source(VideoFileName,UpConv=UPCONV)

MCDegrainSharp_MOD()       # simplified version 1 frame radius only, blocksize 8

return last

Function MCDegrainSharp_MOD(clip c) {
    BS=8
    OS=4
    c2         = c.blur(0.6)
    super      = c2.MSuper(pel=2, sharp=1)
    super_rend = c.sharpen(0.6).MSuper(pel=2, sharp=1,levels=1)
    bvec       = MAnalyse(super, isb = true,  delta = 1, blksize=BS, overlap=OS)
    fvec       = MAnalyse(super, isb = false, delta = 1, blksize=BS, overlap=OS)
    Return c2.MDegrain1(super_rend, bvec,fvec,thSAD=400)
}
Upconv=0 (YV12, OK)


Upconv=1 (YUY2, BAD)


Anybody any ideas as to the cause (just curious). [EDIT: Ignore this line, looks like avs+ prob]

Thanx in advance for any answers. [EDIT: Also ignore]

7z (~5.6MB) with about 10 secs m2v + d2v + log + avs)
http://www.mediafire.com/file/pjc49y...0/WeirdText.7z

EDIT: Maybe Avs+ YUY2 blur still has problems (Still occurs with mvtools v2.5).
EDIT: I dont really notice any problem on live video, only came to light on subtitles[EDIT: credits].

EDIT: Replacing MCDegrainSharp_MOD with blur(0.6) removes problem, maybe its the Sharpen inside MCDegrainSharp that is the problem.
__________________
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; 7th December 2019 at 13:16.
StainlessS is offline  
Old 13th March 2018, 13:20   #3993  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by StainlessS View Post
EDIT: Maybe Avs+ YUY2 blur still has problems[EDIT: credits].
Thanks.
sharpen(0.6) does it.
pinterf is offline  
Old 13th March 2018, 13:23   #3994  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Yep, thanx I just figured that out too.
__________________
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  
Old 13th March 2018, 13:27   #3995  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Found an old comment
// sse2/mmx versions are not identical to C. Sharpen(1.0, 1.0) has ugly artifacts
I removed the sse/mmx code to run it in plain C and it became O.K. Now let's find the bug in the SIMD code.
EDIT: YUY2 sharpen overflow fixed on Github

Last edited by pinterf; 13th March 2018 at 15:31. Reason: Fix
pinterf is offline  
Old 15th March 2018, 03:08   #3996  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
The old bug is back, but now it's dither_lut16 is the culprit.
It seems that under Win10 (?) configuration it understands only the decimal separator of the current input local.

Just replace the decimal point to commas in yexpr parameter and it will work fine. (the used ReplaceStr is built-in in AVS+)

Code:
function Dither_Luma_Rebuild (clip src, float "s0", float "c",int "uv", bool "lsb", bool "lsb_in", bool "lsb_out", int "mode", float "ampn", bool "slice"){
[...]
src
lsb ? (lsb_in ? Dither_lut16  (yexpr=ReplaceStr(e,".",","),expr="x 32768 - 32768 * 28672 / 32768 +",y=3, u=uv, v=uv)                 : \
                Dither_lut8   (yexpr=ReplaceStr(e,".",","),expr="x 128 - 32768 * 112 / 32768 +"    ,y=3, u=uv, v=uv))                : \
                avs26 ? mt_lut(yexpr=e,expr="x range_half - range_half * 112 scaleb / range_half +",y=3, u=uv, v=uv) : \
                        mt_lut(yexpr=e,expr="x 128 - 128 * 112 / 128 +"        ,y=3, u=uv, v=uv)

[...]
}
btw, will this make the systems that use dot has wrong outputs?
__________________
See My Avisynth Stuff
real.finder is offline  
Old 15th March 2018, 08:58   #3997  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Of course.

Systems with a locale using a decimal dot need a decimal dot. If there are locale-independent functions to process numbers, they should default to this syntax.
Systems with a locale using a decimal comma need a decimal comma if numbers are processed depending on the locale.

It would be pretty strange if there were no more locale-independent number functions available under Windows 10, that would interrupt international data exchange in text form.

Implementing a locale-aware conversion in the script would be quite annoying, but possibly not impossible?! But finding a locale-independent implementation that works in Windows 10 as well should be preferable.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 15th March 2018 at 09:04.
LigH is offline  
Old 15th March 2018, 15:30   #3998  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,537
Quote:
Originally Posted by LigH View Post
Implementing a locale-aware conversion in the script would be quite annoying, but possibly not impossible?! But finding a locale-independent implementation that works in Windows 10 as well should be preferable.
It should be AVS+ to work accordingly to windows local settings, not the script itself.
__________________
@turment on Telegram
tormento is offline  
Old 15th March 2018, 21:17   #3999  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
I do no agree, it should indipendent from windows locale

also 666 posts on post #3999
__________________
powered by Google Translator

Last edited by Motenai Yoda; 15th March 2018 at 21:27.
Motenai Yoda is offline  
Old 15th March 2018, 22:04   #4000  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,746
Resist the dark side you must.

And an international portability of scripts can only work when the syntax (here: of numbers) is locale-independent.

Locale-dependent handling of numbers is fine in user interfaces, where an immediate relation between the widget a user fills with a value and the layout of the keyboard the user utilizes can be assumed.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 15th March 2018 at 22:08.
LigH 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 05:17.


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