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 May 2017, 08:18 | #3401 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
29th May 2017, 09:11 | #3402 | Link |
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
ImageReadrer Y16 support
Hi pinterf!
for new release. I am waiting Y16 support in Imagereader. I am updating Avisynth, plugins64+ and Devil.dll. Script simple Code:
ImageSource("film7 1.png", start=1, end=1, use_DevIL=true, pixel_type ="Y16") Please advice. When I added string ConverttoRGB64() I see grayscale image. yup. Last edited by yup; 29th May 2017 at 09:32. |
29th May 2017, 10:14 | #3404 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Hotfix is out, thanks for the patience.
Avisynth Plus r2489-MT Code:
20170529 r2489 - fix: memory leak in CAVIStreamSynth (e.g. feeding vdub) - fix: ConvertToY for RGB64 and RGB48 20170528 r2487 - Blur, Sharpen 10-16 bits planar and RGB64: SSE2/SSE4 (2x-4x speed) - New script function: int GetProcessInfo([int type = 0]) Without parameter or type==0 the current bitness of Avisynth DLL is returned (32 or 64) With type=1 the function can return a bit more detailed info: -1: error, can't establish 0: 32 bit DLL on 32 bit OS 1: 32 bit DLL on 64 bit OS (WoW64 process) 2: 64 bit DLL - Fix: Blur width=16 (YV12 width=32) - 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 |
29th May 2017, 10:29 | #3405 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
29th May 2017, 12:17 | #3406 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
@pinterf
I have another suggestion in addition to the bitness function you added which is just as easy to implement. When you use "LoadPlugin" on a 64 bit plugin from a 32 bit avisynth.dll (and vice versa), the error thrown is "There is no function named..." which can be misleading even for experienced users. Using the determined bitness of avisynth.dll, you could add this function to check the bitness of the plugin and throw the appropriate error if there is a mismatch: Code:
BOOL Is64BitDLL(std::string sDLL, BOOL &bIs64BitDLL) { bIs64BitDLL = FALSE; LOADED_IMAGE li; if (!MapAndLoad((LPSTR)sDLL.c_str(), NULL, &li, TRUE, TRUE)) { //error handling (check GetLastError()) return FALSE; } if (li.FileHeader->FileHeader.Machine != IMAGE_FILE_MACHINE_I386) //64 bit image bIs64BitDLL = TRUE; UnMapAndLoad(&li); return TRUE; } Last edited by Groucho2004; 29th May 2017 at 16:18. |
30th May 2017, 07:53 | #3407 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Are you proposing that during plugin autoloading, if any mismatch is found, exception should be thrown immediately? |
|
30th May 2017, 08:17 | #3410 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
If I use an implicit "LoadPlugin" in the script it does indeed throw "%1 is not a valid Win32 application".
If I put the 64 bit plugin in the auto-load directory and call one of its functions in the script it throws "there is no function named...". I have not looked at the plugin manager code but I thought the auto-load enumeration at the start would call "LoadPlugin" on each plugin which does not appear to be the case. Anyway, even the "%1 is not a valid Win32 application" message is a bit cryptic for many so I think it might be a good idea to have it throw a clear error message. If the user doesn't call a function from the "wrong" DLL, everything will be fine. However, I would still check for any potential problems during the auto-load enumeration. Last edited by Groucho2004; 30th May 2017 at 08:29. |
30th May 2017, 08:52 | #3411 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
Code:
// Load the dll into memory plugin.Library = LoadLibraryEx(plugin.FilePath.c_str(), 0, LOAD_WITH_ALTERED_SEARCH_PATH); if (plugin.Library == NULL) { if (throwOnError) { DWORD errCode = GetLastError(); Env->ThrowError("Cannot load file '%s'. Platform returned code %d:\n%s", plugin.FilePath.c_str(), errCode, GetLastErrorText(errCode).c_str()); } else return false; } |
|
30th May 2017, 08:55 | #3412 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
10+bit greyscale is an exception, it is not autoconverted at all. |
|
30th May 2017, 09:16 | #3413 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
Code:
void PluginManager::AutoloadPlugins() { ... // Try to load plugin AVSValue dummy; LoadPlugin(p, false, &dummy); ... } |
|
30th May 2017, 15:33 | #3414 | Link | ||
Registered User
Join Date: Oct 2016
Posts: 111
|
I got this error when use Imagewriter filter after update AVS+ 2489
Quote:
Quote:
|
||
30th May 2017, 16:20 | #3416 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
And in the meanwhile with a magic '//' I have probably healed the infamous MT_SERIALIZABLE problem (which was intended to optimize the speed of the script a bit). So there will be a new release in some days. |
|
1st June 2017, 05:18 | #3419 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
I'm wondering if we even need SetMemoryMax(). Can this not be done dynamically depending on script requirements, possibly with a warning if Avisynth tries to allocate more than a certain percentage of the available memory?
Last edited by Groucho2004; 1st June 2017 at 15:27. |
1st June 2017, 13:45 | #3420 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
For manual LoadPlugin I have applied the checking you have proposed to give a clean error message Code:
avs [error]: Cannot load a 32 bit DLL in 64 bit Avisynth: 'c:/Test20160220/dll32mix64/etwas32.dll' |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|