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 30th April 2017, 23:16   #3361  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thank you master (slap, slap).
__________________
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 1st May 2017, 13:14   #3362  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by gaak View Post
Quote:
SetFilterMTMode("DGDecodeNV", 3)
LoadPlugin("\MKVideo Encoder NV\DGDec\DGDecodeNV.dll")
DGSource("\MKVideo Files\Input_Video_File.dgi")
...
As the value is increased the script completion percentage goes up but never past 85% when it crashes.
Maybe?
SetFilterMTMode("DGSource", 3)
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 1st May 2017 at 13:16.
tebasuna51 is online now  
Old 1st May 2017, 14:42   #3363  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by tebasuna51 View Post
Maybe?
SetFilterMTMode("DGSource", 3)
I don't think that's the problem, even thought SetFilterMTMode("DGDecodeNV", 3) is incorrect, as you've already pointed out. AviSynth+ automatically recognizes source filters. If it sees a source filter which has no MT-mode specified, it will automatically use mode 3 instead of the default MT mode. This has been the behavior since r2069.

Quote:
Originally Posted by gaak View Post
Hi,

Cannot get this script to run to completion w/ i386 r2455:

Code:
SetFilterMTMode("DEFAULT_MT_MODE", 2)
SetFilterMTMode("DGDecodeNV",      3)
Import("\MKVideo Encoder NV\AVS Scripts MT\LoadPlugins.avs")
LoadPlugin("\MKVideo Encoder NV\DGDec\DGDecodeNV.dll")
DGSource("\MKVideo Files\Input_Video_File.dgi")
Spline64Resize(1280, 720)
RoboCrop(Laced=False, Align=True)
LSFmod(defaults="slow", preblur="DeGrainMedian(limitY=4, limitUV=6, mode=1, interlaced=false)", strength=200, smode=5, secure=true)
Prefetch(6)
Have tried Prefetch values from 3 to 7. As the value is increased the script completion percentage goes up but never past 85% when it crashes. Any other settings I can try?

Thanks.
Try running the script in AVSMeter with SetLogParams("stdout", 4) at the very beginning of your script. The logging facility in AVS+ will automatically log errors, and will issue warnings and notes about potential problems, buggy plugins, suboptimal settings, etc. If that does not show anything useful then try testing RoboCrop and DegrainMedian separately to see if they crash or not. Also make sure you're using the latest MaskTools2 and RgTools.

Last edited by Reel.Deel; 1st May 2017 at 14:46.
Reel.Deel is offline  
Old 2nd May 2017, 02:23   #3364  |  Link
gaak
Registered User
 
Join Date: Apr 2016
Posts: 27
Quote:
Originally Posted by
Try running the script in AVSMeter with [FONT="Courier New"
SetLogParams("stdout", 4)[/FONT] at the very beginning of your script. The logging facility in AVS+ will automatically log errors, and will issue warnings and notes about potential problems, buggy plugins, suboptimal settings, etc. If that does not show anything useful then try testing RoboCrop and DegrainMedian separately to see if they crash or not. Also make sure you're using the latest MaskTools2 and RgTools.
Thanks for the tip. I did what you advised and got this:

Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\WINDOWS\SysWOW64\KERNELBASE.dll
Address: 0x75EAB782

I guess that falls under the "not show anything useful" heading. I'll try running the other filters separately to narrow the field.
gaak is offline  
Old 2nd May 2017, 02:39   #3365  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by gaak View Post
Thanks for the tip. I did what you advised and got this:

Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\WINDOWS\SysWOW64\KERNELBASE.dll
Address: 0x75EAB782

I guess that falls under the "not show anything useful" heading. I'll try running the other filters separately to narrow the field.
It may be useful to see which filter versions you're using. Run AVSMeter with the switches "-avsinfo -log". This will generate a log file (avsinfo.log). Post the content of that log file.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 2nd May 2017, 11:12   #3366  |  Link
gaak
Registered User
 
Join Date: Apr 2016
Posts: 27
Quote:
Originally Posted by Groucho2004 View Post
It may be useful to see which filter versions you're using. Run AVSMeter with the switches "-avsinfo -log". This will generate a log file (avsinfo.log). Post the content of that log file.
Found the problem. It was an old plugin (SplineResize.dll). Run with it, crash. With out it, no crash. Found a replacement: ResizersPack4.5.avsi. Slower but better quality and it works. Thanks to Reel.Deel and Groucho2004 for your guidance and software.
gaak is offline  
Old 2nd May 2017, 13:54   #3367  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
If the resamplers in the AviSynth kernel are not versatile enough for you, you might also be interested in ResampleHQ. The features in the Resizers Functions Pack 4.5 by Dogway are rather special, though, and I would not be sure which of them are portable to new color spaces/configurations of AviSynth 2.6 and AviSynth+ without quirks, may require general updates...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 2nd May 2017, 19:39   #3368  |  Link
gaak
Registered User
 
Join Date: Apr 2016
Posts: 27
Quote:
Originally Posted by LigH View Post
If the resamplers in the AviSynth kernel are not versatile enough for you, you might also be interested in ResampleHQ.
Thank you for the suggestion. Will give it a try. Right now looking into nnedi3_resize16.avsi. Seems to give good results up sizing, now seeing how well it does down sizing.
gaak is offline  
Old 2nd May 2017, 21:23   #3369  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Probably not remarkably great. You should learn how the parts of each algorithm work, to understand which purpose they serve. "EDI" (Edge Directed Interpolation) functions are especially made to aid upsampling. I see no reason to believe that downsampling would be improved by it, the way it works.

And it is not even specifically related to AviSynth+. Another thread derailing... it's getting common in the last time. Well, this time I am involved...
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 2nd May 2017, 21:39   #3370  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
NNEDI / EEDI can't downscale. What they do is double the image height. So, this code will double both image width and height:
Code:
nnedi3(dh = true).turnleft().nnedi3(dh = true).turnright()
For downscaling, nnedi3_resize16 uses Dither_resize16, nnedi3 isn't involved at all.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 3rd May 2017 at 08:37.
Groucho2004 is offline  
Old 3rd May 2017, 09:08   #3371  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Imagine I want to avoid autoloading for some plugins, prefer explicit loading for specific reasons; and I have such plugins in both 32-bit and 64-bit flavour.

Does AviSynth+ provide a core {function|constant} to check whether my script runs in a 32 or 64 bit environment, to calculate a base plugin directory accordingly? Something like:

Code:
MyPluginBase = "D:\AviSynthPlugins\special\" + (Is64bit() ? "x64" : "x86")
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 3rd May 2017, 09:29   #3372  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by LigH View Post
Imagine I want to avoid autoloading for some plugins, prefer explicit loading for specific reasons; and I have such plugins in both 32-bit and 64-bit flavour.

Does AviSynth+ provide a core {function|constant} to check whether my script runs in a 32 or 64 bit environment, to calculate a base plugin directory accordingly? Something like:

Code:
MyPluginBase = "D:\AviSynthPlugins\special\" + (Is64bit() ? "x64" : "x86")
I don't think Avisynth+ has an option to report its bitness. However, this could very easily be added as a function or constant:

Code:
if (sizeof(void*) == 8)
 //64 bit module on Win64

With a bit more code this could be extended to report a WoW64 process (32 bit process on 64 bit Windows) and consequently a plain 32 bit process (error handling mostly omitted in the example):
Code:
#define PROCESS_32_ON_32 0
#define PROCESS_32_ON_64 1
#define PROCESS_64_ON_64 2

...

int ProcessType()
{
 if (sizeof(void*) == 8)
  return PROCESS_64_ON_64; //64 on 64

 BOOL bWoW64Process = FALSE;
 typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS) (HANDLE, PBOOL);
 LPFN_ISWOW64PROCESS fnIsWow64Process;
 HMODULE hKernel32 = GetModuleHandle("kernel32.dll");
 if (hKernel32 == NULL)
  return -1;

 fnIsWow64Process = (LPFN_ISWOW64PROCESS)GetProcAddress(hKernel32, "IsWow64Process");
 if (fnIsWow64Process != NULL)
  fnIsWow64Process(GetCurrentProcess(), &bWoW64Process);
 else
  return -1;

 if (bWoW64Process)
  return PROCESS_32_ON_64; //WoW64

 return PROCESS_32_ON_32;
}
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 3rd May 2017 at 10:34.
Groucho2004 is offline  
Old 3rd May 2017, 12:54   #3373  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
I seem to have hit a bug in Overlay, namely the "lighten"-mode:
Code:
Maske=BlankClip(1,156,42,pixel_type="YV24",fps=25,color=$000000,channels=0)
Mard=BlankClip(1,56,42,pixel_type="YV24",fps=25,color=$000000,channels=0)
Mard2= Maske.Overlay(Mard,mode="Lighten")
Return Mard2
I expect to get a 156x42 YV24 clip with Y constantly being 16 and U and V 128; instead there is a 56x25 rectangle with top left corner (0,17) in which Y=128 and the chroma values are random garbage (changes every time I open the script, so maybe it is using memory that it shouldn't use).
Info() reported the following CPU instruction sets: SSE4.2, SSE3, AVX, AVX2, FMA3, F16C.
[Edit]: I am using 64bit r2455. It works with standard Avisynth 2.6.

Last edited by mkver; 3rd May 2017 at 13:11.
mkver is offline  
Old 3rd May 2017, 14:14   #3374  |  Link
raffriff42
Retried Guesser
 
raffriff42's Avatar
 
Join Date: Jun 2012
Posts: 1,373
re: mkver's issue: if either clip is at least 620px wide (more or less), the problem goes away.

Last edited by raffriff42; 3rd May 2017 at 14:17. Reason: ±
raffriff42 is offline  
Old 3rd May 2017, 18:05   #3375  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Thanks for the report. Lighten had this problem since r2290, as a victim of hbd transition. Fixed on git. The problem occured when base and overlay clip had different widths (pitches)
pinterf is offline  
Old 3rd May 2017, 19:15   #3376  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by raffriff42 View Post
RGBAdjust - gain arguments autoscale, but bias does not. Levels - no arguments autoscale. Just noting it in passing.
RgbAdjust gain is not related to high-bit-depth scaling. It is simple multiplier, so no action or fix needed here on avs+ side (Slowly I'm processing recent posts)
pinterf is offline  
Old 3rd May 2017, 19:25   #3377  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
I'm still not able to solve the stability of the multithread-ScriptClip-with-nested-ConditionalFunctions problem (deadlock).

But there had been a couple of fixes and small additions since r2455, what's your opinion about a maintenance release soon?

Code:
  - Fix: Overlay Lighten: artifacts when base clip and overlay clip have different widths (regression since r2290)
  - Fix: YUY2 HorizontalReduceBy2 did nothing if target width was not mod4
  - ImageReader: 16 bit support; "pixel_type" parameter new formats "RGB48", "RGB64" and "Y16"
  - ImageWriter: 16 bit support; save RGB48, RGB64, Y16, planar RGB(A) 8 and 16 bit formats
    (note: greyscale through devIL can be corrupt with some formats, use png)
  - ImageWriter: flip greyscale images vertically (except "raw" format)
  - SubTitle: new parameter "font_filename" allows using non-installed fonts
  - (project can be compiled using gcc)
  - Allows opening unicode filenames through VfW interface (virtualdub, MPC-HC)
  - Script function Import: new parameter bool "utf8" to treat the filenames as UTF8 encoded
    (not the script text!)
  - SubTitle: new parameter bool "utf8" for drawing strings encoded in UTF8.
      Title="Cherry blossom "+CHR($E6)+CHR($A1)+CHR($9C)+CHR($E3)+CHR($81)+CHR($AE)+CHR($E8)+CHR($8A)+CHR($B1)
      SubTitle(Title,utf8=true)
  - New script functions: ScriptNameUtf8(), ScriptFileUtf8(), ScriptDirUtf8(), 
    they return variables $ScriptNameUtf8$, $ScriptFileUtf8$ and $ScriptDirUtf8$ respectively
What other (small) issues or feature requests do you know?
pinterf is offline  
Old 3rd May 2017, 19:52   #3378  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Implement a core function / variable reporting whether the current process uses 32 or 64 bit code (maybe even WoW64)... not urgent, only if you get immediately a good idea how to realize it sensibly.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline  
Old 5th May 2017, 23:19   #3379  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
And I ran into another issue with weird chroma: The blur filter doesn't seem to like input that is 32 pixel wide:
Code:
Return BlankClip(1,32,62,pixel_type="YV12",fps=25,color=$000000,channels=0).Blur(1.4)
As before: Info() reported the following CPU instruction sets: SSE4.2, SSE3, AVX, AVX2, FMA3, F16C; 64bit r2455.
mkver is offline  
Old 5th May 2017, 23:35   #3380  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,752
Are you sure the reason is not the height of 62 pixels, which is not a multiple of 4, so the chroma planes in YV12 would have an odd height?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
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 10:39.


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