Log in

View Full Version : Avisynth AiUpscale v1.2.0


Pages : 1 2 3 [4]

TCmullet
7th May 2024, 13:46
The AiUpscale include script requires AviSynthShader (https://github.com/mysteryx93/AviSynthShader/releases) to be installed as well. So when using 32 bit VirtualDub, your plugins directory should contain: AiUpscale.avsi; Shaders\*.*; Shader.avsi; Shader.dll (when using 64-bit VirtualDub2, all the same in plugins64, except Shader-x64.dll instead of Shader.dll).
Thanks! I guess I didn't read the AiUpscale readme carefully. I especially appreciate you getting specific about folders, as the Shader readme does not tell how to correctly install.

I've done it but still get that fatal syntax error. I thought Avisynth was dynamically loaded every time I open an .avs in Vdub. Do I need to reboot or something?? Uh, it bombs even if my script is merely version.avs, as the .avsi is getting loaded from the plugins upon Avisynth invocation, not the particular script I'm trying to run. (AiUpscale is not being called within version.avs.)

Oh, I didn't see your edit. Am working on AVSMeter.

TCmullet
7th May 2024, 14:01
Here's my AVSMeter: (I'm not sure why AVSMeter says 2.4.6 when I downloaded it from a link that said it was 3.0.9.0.)

D:\MyApplications\AVSMeter>avsmeter64 -avsinfo

AVSMeter 2.4.6 (x64) - Copyright (c) 2012-2016, Groucho2004

VersionString: AviSynth+ 3.7.3 (r4003, 3.7, x86_64)
VersionNumber: 2.60
File version: 3.7.3.0
Interface Version: 7
Multi-threading support: Yes
Linker/compiler version: 14.29
Avisynth.dll location: C:\Windows\System32\AviSynth.dll
Avisynth.dll time stamp: 2023-07-16, 03:48:08 (UTC)
PluginDir+ (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64+
PluginDir2_5 (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64


[CPP 2.6 plugins]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll [n/a]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll [n/a]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll [n/a]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll [n/a]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll [n/a]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll [n/a]

LigH
7th May 2024, 14:10
AVSMeter thread here (https://forum.doom9.org/showthread.php?t=174797)
in Groucho's Mediafire archive (http://www.mediafire.com/folder/x6f7yqjufdg7c/Groucho's_Avisynth_Stuff)
in VideoHelp software archive (https://www.videohelp.com/software/AVSMeter)

With the real version 3.0.9.0, you should run avsmeter.exe -avsinfo -l to check the 32 bit installation, it creates a text file you can open, easier than grabbing from a console output.

TCmullet
7th May 2024, 14:31
AVSMeter thread here (https://forum.doom9.org/showthread.php?t=174797)
in Groucho's Mediafire archive (http://www.mediafire.com/folder/x6f7yqjufdg7c/Groucho's_Avisynth_Stuff)
in VideoHelp software archive (https://www.videohelp.com/software/AVSMeter)

With the real version 3.0.9.0, you should run avsmeter.exe -avsinfo -l to check the 32 bit installation, it creates a text file you can open, easier than grabbing from a console output.
I added the "-l", but it gave exactly the same info. (It's easy to copy from the cmd window and paste into the forum.) However, when I take the "64" off of "avsmeter64", it bombs with...

D:\MyApplications\AVSMeter>avsmeter -avsinfo -l

AVSMeter 2.4.6 (x86) - Copyright (c) 2012-2016, Groucho2004

Cannot load a 64 bit DLL in 32 bit Avisynth: 'C:/Program Files (x86)/AviSynth+/plugins/masktools2.dll'.


D:\MyApplications\AVSMeter>

LigH
7th May 2024, 14:47
So you have a 64-bit DLL of masktools2 in your plugins folder for 32-bit Avisynth, that will be one reason for issues. Exchange that with a 32-bit DLL of the same source and try again...

TCmullet
7th May 2024, 18:36
Well, I've fixed SOME things. It turns out I had a rogue AVSMeter somewhere, and I had forgotten I had ever had it. So now my meter shows:

D:\MyApplications\AVSMeter>avsmeter64 -avsinfo

AVSMeter 3.0.9.0 (x64), (c) Groucho2004, 2012-2021

VersionString: AviSynth+ 3.7.3 (r4003, 3.7, x86_64)
VersionNumber: 2.60
File / Product version: 3.7.3.0 / 3.7.3.0
Interface Version: 10
Multi-threading support: Yes
Avisynth.dll location: C:\WINDOWS\SYSTEM32\avisynth.dll
Avisynth.dll time stamp: 2023-07-16, 03:48:08 (UTC)
PluginDir2_5 (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+ (HKLM, x64): C:\Program Files (x86)\AviSynth+\plugins64+


[C++ 2.6 Plugins (64 Bit)] [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll [n/a, 2023-07-16]

[Scripts (AVSI)] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.avsi [2022-10-06]

[Uncategorized files] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt [2022-10-06]

D:\MyApplications\AVSMeter>

However, I still get the syntax error in line 102. And if I moved the Shaders folder and the AiUpscale.avsi to any of the 3 other plugins folders, "there is no function named aiupscale".

LigH
7th May 2024, 18:42
I already told you: Please run AVSMeter.exe instead of AVSMeter64.exe, because if you want to test how a 32-bit VirtualDub behaves, you have to use the 32-bit AVSMeter to test that bitness of AviSynth and its plugins.

And after testing the general AviSynth installation using the parameter "-avsinfo", you can as well test the specific behaviour of your script, using its filename as parameter for AVSMeter.

The placement in "plugins" is correct when using the 32-bit VirtualDub. Copying script and shaders to "plugins64" as well would be correct if you wanted to use a 64-bit VirtualDub2.

TCmullet
7th May 2024, 18:53
Sorry I had missed that I needed to NOT run AVSMeter64. It now gives something (at the end) that likely will be helpful to YOU as you kindly seek to help me.

D:\MyApplications\AVSMeter>avsmeter -avsinfo

AVSMeter 3.0.9.0 (x86), (c) Groucho2004, 2012-2021

VersionString: AviSynth+ 3.7.3 (r4003, 3.7, i386)
VersionNumber: 2.60
File / Product version: 3.7.3.0 / 3.7.3.0
Interface Version: 10
Multi-threading support: Yes
Avisynth.dll location: C:\WINDOWS\SysWOW64\avisynth.dll
Avisynth.dll time stamp: 2023-07-16, 04:00:38 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins
PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+


[C++ 2.5 Plugins (32 Bit)] [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\avssr.dll [n/a, 2014-01-09]
C:\Program Files (x86)\AviSynth+\plugins\dgbob.dll [n/a, 2003-07-06]
C:\Program Files (x86)\AviSynth+\plugins\DGDecode.dll [1.5.8.0, 2015-12-26]
C:\Program Files (x86)\AviSynth+\plugins\NicAudio.dll [n/a, 2012-08-27]
C:\Program Files (x86)\AviSynth+\plugins\TIVTC.dll [1.0.5.0, 2017-12-18]

[C++ 2.6 Plugins (32 Bit)] [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins\aWarpsharpMT.dll [2.1.9.0, 2023-11-19]
C:\Program Files (x86)\AviSynth+\plugins\DGDecodeNV.dll [0.0.0.2052, 2016-10-18]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.dll [n/a, 2020-08-22]
C:\Program Files (x86)\AviSynth+\plugins\LSMASHSource.dll [1129.0.0.0, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins\masktools2.dll [2.2.30.0, 2022-02-19]
C:\Program Files (x86)\AviSynth+\plugins\mvtools2.dll [2.7.45.0, 2021-06-08]
C:\Program Files (x86)\AviSynth+\plugins\Shader.dll [n/a, 2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\svpflow1.dll [4.0.0.132, 2016-12-21]
C:\Program Files (x86)\AviSynth+\plugins\svpflow2.dll [4.0.0.136, 2016-12-21]

[Scripts (AVSI)] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\AiUpscale.avsi [2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.avsi [2022-10-06]
C:\Program Files (x86)\AviSynth+\plugins\FFMS2.avsi [2015-05-22]
C:\Program Files (x86)\AviSynth+\plugins\GameDropFixV5.avsi [2017-10-04]
C:\Program Files (x86)\AviSynth+\plugins\InterFrame2.avsi [2015-07-22]
C:\Program Files (x86)\AviSynth+\plugins\LimitedSharpenFaster.avsi [2017-01-03]
C:\Program Files (x86)\AviSynth+\plugins\Shader.avsi [2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\TCS-Video-Functions.avsi [2024-04-27]

[Uncategorized files] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.txt [2022-10-06]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.lib [2020-08-22]
C:\Program Files (x86)\AviSynth+\plugins\ffmsindex.exe [2020-08-22]



[Plugin errors/warnings]
___________________________________________________________________________________________________

Cannot load file 'C:/Program Files (x86)/AviSynth+/plugins/Shader.dll'. Platform returned code 126:
The specified module could not be found.

Dependencies that could not be loaded:
d3dx9_43.dll
___________________________________________________________________________________________________

D:\MyApplications\AVSMeter>

As for using my script, I'd rather first get to a point where AVSMeter doesn't report any errors and the AiUpscale syntax error is gone.

LigH
7th May 2024, 19:08
Indeed, a missing d3dx9_43.dll points to an incomplete DirectX Runtime installation. You can find a "DirectX End User Runtime Web Installer" at Microsoft's website.

TCmullet
7th May 2024, 19:15
Indeed, a missing d3dx9_43.dll points to an incomplete DirectX Runtime installation. You can find a "DirectX End User Runtime Web Installer" at Microsoft's website.
I actually have a couple of versions of that file as part of app installations that I never used. Could I simply copy the newer one to some place where our Avisynth setup can use it?

DTL
7th May 2024, 19:28
.dll search and load order may include at least current working dir and PATH (for current user). Also you can try to put this .dll in the same folder with failed - C:/Program Files (x86)/AviSynth+/plugins/ . .dll load is not AVS (installer) but Windows runtime at loading of previous .dll and looking for its dependencies in some order. https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

TCmullet
7th May 2024, 21:47
Actually, I decided to, with hesitation, get and install the Microsoft thing. I hesitated as I always hesitate to use anything from Microsoft, but the main hesitation was that it didn't include Windows 10 as a "supported OS". However, I did do the install. Took longer than I thought, and yes, I did see the d3dx9_43.dll come up in the list. The 43 was the last of many such dll installs. It did install two, one in each of the two system folders:
C:\Windows\System32\D3DX9_43.dll
C:\Windows\SysWOW64\D3DX9_43.dll

Probably unimportant is that this filename is all caps instead of lower case as seen and referenced before. They're also both dated a date/time on May 26, 2010. Odd as one of the stray copies on my system is dated much more recently as 7/4/2023. However, that may have been the date I installed a video player on my PC (that I never ended up using) and the mod date came from the install date.

I rebooted the system (just to be sure) and I still get the syntax error in AiUpscale.

Here's the AVSMeter out again, just to show my Avisynth is apparently okay.


D:\MyApplications\AVSMeter>avsmeter -avsinfo

AVSMeter 3.0.9.0 (x86), (c) Groucho2004, 2012-2021

VersionString: AviSynth+ 3.7.3 (r4003, 3.7, i386)
VersionNumber: 2.60
File / Product version: 3.7.3.0 / 3.7.3.0
Interface Version: 10
Multi-threading support: Yes
Avisynth.dll location: C:\WINDOWS\SysWOW64\avisynth.dll
Avisynth.dll time stamp: 2023-07-16, 04:00:38 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins
PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+


[C++ 2.5 Plugins (32 Bit)] [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\avssr.dll [n/a, 2014-01-09]
C:\Program Files (x86)\AviSynth+\plugins\dgbob.dll [n/a, 2003-07-06]
C:\Program Files (x86)\AviSynth+\plugins\DGDecode.dll [1.5.8.0, 2015-12-26]
C:\Program Files (x86)\AviSynth+\plugins\NicAudio.dll [n/a, 2012-08-27]
C:\Program Files (x86)\AviSynth+\plugins\TIVTC.dll [1.0.5.0, 2017-12-18]

[C++ 2.6 Plugins (32 Bit)] [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll [n/a, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins\aWarpsharpMT.dll [2.1.9.0, 2023-11-19]
C:\Program Files (x86)\AviSynth+\plugins\DGDecodeNV.dll [0.0.0.2052, 2016-10-18]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.dll [n/a, 2020-08-22]
C:\Program Files (x86)\AviSynth+\plugins\LSMASHSource.dll [1129.0.0.0, 2023-07-16]
C:\Program Files (x86)\AviSynth+\plugins\masktools2.dll [2.2.30.0, 2022-02-19]
C:\Program Files (x86)\AviSynth+\plugins\mvtools2.dll [2.7.45.0, 2021-06-08]
C:\Program Files (x86)\AviSynth+\plugins\Shader.dll [n/a, 2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\svpflow1.dll [4.0.0.132, 2016-12-21]
C:\Program Files (x86)\AviSynth+\plugins\svpflow2.dll [4.0.0.136, 2016-12-21]

[Scripts (AVSI)] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\AiUpscale.avsi [2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.avsi [2022-10-06]
C:\Program Files (x86)\AviSynth+\plugins\FFMS2.avsi [2015-05-22]
C:\Program Files (x86)\AviSynth+\plugins\GameDropFixV5.avsi [2017-10-04]
C:\Program Files (x86)\AviSynth+\plugins\InterFrame2.avsi [2015-07-22]
C:\Program Files (x86)\AviSynth+\plugins\LimitedSharpenFaster.avsi [2017-01-03]
C:\Program Files (x86)\AviSynth+\plugins\Shader.avsi [2024-05-07]
C:\Program Files (x86)\AviSynth+\plugins\TCS-Video-Functions.avsi [2024-04-27]

[Uncategorized files] [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins\colors_rgb.txt [2022-10-06]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.lib [2020-08-22]
C:\Program Files (x86)\AviSynth+\plugins\ffmsindex.exe [2020-08-22]

D:\MyApplications\AVSMeter>

FWIW, here are two lines of the code that "is bad":


If (AVSCR) {
Input = Input.Is420 ? ConvertToYUV444(Input, ChromaInPlacement = CPlace, ChromaResample = CResample) : ConvertToYUV444(Input, ChromaResample = CResample)


The "syntax error" is thought by the system to be on the left brace. Is there a possibility of a transmission error when I downloaded it? Seems unlikely to me. Is the boolean AVSCR possibly not set and it's barfing over THAT? I'm too Avisynth internals-ignorant to know. But I'm very puzzled that apparently lot of you are using AiUpscale and using it successfully, whereas I, a quasi-seasoned Avisynth programmer (hundreds of video processed over the years), can't even get the filter to not bomb the system.

Alexkral
7th May 2024, 23:46
It seems like a problem with Gscript, but I have no idea why.

TCmullet
8th May 2024, 01:17
It seems like a problem with Gscript, but I have no idea why.
I was going to give you my one-line call to the function (in which I have no arguments yet), but this error happens with ANY .avs because I believe Avisynth is parsing/compiling the script when Avisynth is invoked by opening the .avs in my Vdub.

That is, I can't run any script without disabling your .avsi in my plugins. Even the classic "version.avs".

Guest
8th May 2024, 01:47
I was going to give you my one-line call to the function (in which I have no arguments yet), but this error happens with ANY .avs because I believe Avisynth is parsing/compiling the script when Avisynth is invoked by opening the .avs in my Vdub.

That is, I can't run any script without disabling your .avsi in my plugins. Even the classic "version.avs".

Why x86 ??

Alexkral
8th May 2024, 01:50
In the version of AvsPmod I'm using (v2.6.3.9), "If" and "For" are shown as unknown functions, again I don't know why.

Guest
8th May 2024, 01:53
In the version of AvsPmod I'm using (v2.6.3.9), "If" and "For" are shown as unknown functions, again I don't know why.

Try :- https://www.videohelp.com/software/AvsP newest build.

Alexkral
8th May 2024, 02:11
Try :- https://www.videohelp.com/software/AvsP newest build.

Yes, now it's OK with both x86 and x64.

TCmullet
8th May 2024, 02:21
Why x86 ??
Because I only have 32bit VirtualDub and I understand there's a lot to converting 32bit Avisynth filters to 64bit versions. I have felt I had no need to go 64bit as 32bit works fine, though it will take longer to do a run. I do think my 64bit CPU will execute stuff faster than it's corresponding 32bit CPU. In short, I don't want to risk breaking everything that I have that already works well in 32bit Vdub, etc.

TCmullet
8th May 2024, 02:24
Yes, now it's OK with both x86 and x64.
Aren't you the original author of AiUpscale? If so and if YOU can't solve this problem, then probably no one can and I'll never be able to use AiUpscale. :( Oh I had high hopes of improving on Infognition's SuperRes.

Guest
8th May 2024, 02:30
Because I only have 32bit VirtualDub and I understand there's a lot to converting 32bit Avisynth filters to 64bit versions. I have felt I had no need to go 64bit as 32bit works fine, though it will take longer to do a run. I do think my 64bit CPU will execute stuff faster than it's corresponding 32bit CPU. In short, I don't want to risk breaking everything that I have that already works well in 32bit Vdub, etc.

Can't you have both ??

TCmullet
8th May 2024, 02:38
Can't you have both ??
I don't know. I should be asking YOU. Do YOU have both?? Well, as Vdub support was shutdown years ago, I don't think I can get a 64-bit Vdub, or at least and still use any of the Vdub filters, which were mostly done for 32bit. That's enough to stop it right there, IMHO.

Guest
8th May 2024, 02:46
I don't know. I should be asking YOU. Do YOU have both??

I don't use it at all, so, no.

Well, as Vdub support was shutdown years ago, I don't think I can get a 64-bit Vdub, or at least and still use any of the Vdub filters, which were mostly done for 32bit.

Yes you can:-

https://www.videohelp.com/software/Virtualdub

That's enough to stop it right there, IMHO.

Not necessarily.

Guest
8th May 2024, 02:51
Aren't you the original author of AiUpscale? If so and if YOU can't solve this problem, then probably no one can and I'll never be able to use AiUpscale. :( Oh I had high hopes of improving on Infognition's SuperRes.

I remember trying this a year or so ago, and was not that happy with the outcome, and did something else.

There are a lot of dependencies & pre requisites for it to work.

Alexkral
8th May 2024, 03:08
then probably no one can and I'll never be able to use AiUpscale.

I don't think so at all. This seems like an Avisynth problem, and there are a lot of people here who know much more about Avisynth than me.

You could try to make a simple function with some GScript instruction, and save it as .avsi in the plugins folder to see if it also gives you an error.

There are a lot of dependencies & pre requisites for it to work.

Only Avisynth Shader and the DirectX Runtime that it needs.

TCmullet
8th May 2024, 03:21
You could try to make a simple function with some GScript instruction, and save it as .avsi in the plugins folder to see if it also gives you an error.

I've known nothing of GScript nor heard of it. But I just googled it with Avisynth and it appears that there IS a filter by that name. If you're using GScript and if this page is true,
http://avisynth.nl/index.php/GScript
...then THIS might be the problem. I did not obtain and install GScript because you didn't mention it in the Github that it was a requirement. As I read the GScript doc and as I remember it bombed right after the very first IF statement, I suspect this IS the problem! I'll install the GScript filter.

Alexkral
8th May 2024, 03:40
It was incorporated natively into AviSynth+, but that's the problematic line of the script.

StvG
8th May 2024, 14:47
FWIW, here are two lines of the code that "is bad":


If (AVSCR) {
Input = Input.Is420 ? ConvertToYUV444(Input, ChromaInPlacement = CPlace, ChromaResample = CResample) : ConvertToYUV444(Input, ChromaResample = CResample)


The "syntax error" is thought by the system to be on the left brace. Is there a possibility of a transmission error when I downloaded it? Seems unlikely to me. Is the boolean AVSCR possibly not set and it's barfing over THAT? I'm too Avisynth internals-ignorant to know. But I'm very puzzled that apparently lot of you are using AiUpscale and using it successfully, whereas I, a quasi-seasoned Avisynth programmer (hundreds of video processed over the years), can't even get the filter to not bomb the system.

Share the full used script.
Share the exact error message.

It seems like a problem with Gscript, but I have no idea why.

Nothing related to Gscript. The script (AiUpscale.avsi) doesn't use Gscript. The condition blocks (if/else, for/while) are ported from Gscript to the avs core - these functions are now avs internal (the syntax, execution is avs internal and nothing related to Gscript).

If Gscript is used, one will see a line having Gscript(.....).

Because I only have 32bit VirtualDub and I understand there's a lot to converting 32bit Avisynth filters to 64bit versions.

If you can't name specific 32bit Avisynth filter that doesn't have 64bit version, your understanding is not quite correct.

TCmullet
8th May 2024, 15:17
> Share the exact error message.

I did at the start of my subthread, but here it is again:

Avisynth open failure:
Script error: syntax error
(AiUpscale.avsi, line 102, column 16)


> Share the full used script.

This post is in the support thread for the publicly available AiUpscale filter. (The filter is a script; it is THE script that's bombing.) Available here:
https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/1.2.0

If you want, I'll simply copy that filter to here.

I don't even have to be using AiUpscale() in my own script. ANY script (even the ubiquitous version.avs) causes the loading and parsing of the AiUpscale.avsi to bomb with the above error message.

StvG
8th May 2024, 16:46
> Share the exact error message.

I did at the start of my subthread, but here it is again:

Avisynth open failure:
Script error: syntax error
(AiUpscale.avsi, line 102, column 16)


> Share the full used script.

This post is in the support thread for the publicly available AiUpscale filter. (The filter is a script; it is THE script that's bombing.) Available here:
https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/1.2.0

If you want, I'll simply copy that filter to here.

I don't even have to be using AiUpscale() in my own script. ANY script (even the ubiquitous version.avs) causes the loading and parsing of the AiUpscale.avsi to bomb with the above error message.

From post #162 (https://forum.doom9.org/showthread.php?p=2001580#post2001580):
1. You have error using VirtualDub.
2. You have no error using avsmeter -avsinfo.

Try the latest VirtualDub2 (https://forum.doom9.org/showthread.php?t=172021) (https://sourceforge.net/projects/vdfiltermod/files/VirtualDub%20pack/version%2020/).

TCmullet
8th May 2024, 17:12
The error is while Avisynth is parsing the AiUpscale.avsi when Vdub opens any .avs. This Vdub 1.10.4 (32b) has been working extremely well for many years. In light of where the error is occurring and in light of the stability of 1.10.4, your conclusion makes no sense. But I'll your give your alternate Vdub a try and let you know either way (even though I'm sure it will bomb there, too). I'll let you know.

StvG
8th May 2024, 17:34
This Vdub 1.10.4 (32b) has been working extremely well for many years. In light of where the error is occurring and in light of the stability of 1.10.4, your conclusion makes no sense.

If Vdub uses old Avisynth interface that doesn't support if/else, you cannot use it with new scripts having if/else.

TCmullet
8th May 2024, 17:51
This is a slight tangent from my AiUpdate subject (based on your urging me to try Vdub2), but when I run the current one which is 44282, it's dated Mar 2020, and also says for "AMD" processors at the top.

I only use Intel processors these days. Did you/they make separate versions for AMD and for Intel?

Is the most current version still the one from Mar 2020? Of course if the program has become perfect, then no need to ever change it. But 4 years is a long time for no updates to occur, especially with great computer nerds like everyone at Doom9.

LigH
8th May 2024, 18:12
The x86_64 processor architecture was invented by AMD, in contrast to intel's IA64 (Itanium) architecture. Both are not compatible to each other. But AMD's x86_64 mode is compatible to x86, and IA64 not even that. Therefore the x86_64 architecture was much more popular for consumer PCs, is now the most used standard.

VirtualDub2 is being developed further (https://forum.doom9.org/showthread.php?t=172021) by v0lt, you are in that thread too, did you not notice yet?

TCmullet
8th May 2024, 20:25
The x86_64 processor architecture was invented by AMD, in contrast to intel's IA64 (Itanium) architecture. Both are not compatible to each other. But AMD's x86_64 mode is compatible to x86, and IA64 not even that. Therefore the x86_64 architecture was much more popular for consumer PCs, is now the most used standard.

VirtualDub2 is being developed further (https://forum.doom9.org/showthread.php?t=172021) by v0lt, you are in that thread too, did you not notice yet?
Yes, I just went there to see if I could get answers, which I didn't. I asked you (I meant StvG) about vdub b/c you (StvG) are the one who suggested (here) that the if/then syntax error (which is in Avisynth) would somehow be corrected by switching to Vdub2. And I guess I didn't ask it clearly... If I have only Intel processors, which of those 2 GUI programs (.exe in the download) is safe for me to run, VirtualDub.exe which appears to be x86 (which means 32-bit) and/or VirtualDub64.exe which appears to be AMD64 (which means 64-bit but MAY MEAN that it can't run safely on Intel processors)? It would be nice if I really could switch to 64 bit Vdub. But I HAVE to know if the AMD64 version is fully safe to run on Intel if I'm urged to use it. (I currently have i5 and xeon Intel processors.) I can't run something that works fine for 3 months then suddenly blows up due to incompatible processor.

LigH
8th May 2024, 20:53
It really does not matter that AMD invented it first, to be implemented since Opteron and Athlon 64 processors: intel implemented a most similar version as well, to be implemented since Pentium 4 processors. Both implementations are absolutely similar in their core features, 32-bit x86 code is fully compatible without any changes.

This is not the thread to discuss CPU details. You can trust that the 64-bit VirtualDub2 will run on both 64-bit intel CPUs and 64-bit AMD CPUs exactly the same way. Differences exist only in CPU instruction extensions beyond Pentium 4 or Athlon64.

TCmullet
8th May 2024, 21:22
You can trust that the 64-bit VirtualDub2 will run on both 64-bit intel CPUs and 64-bit AMD CPUs exactly the same way.That's EXACTLY what I needed to hear. Thanks!

StvG
8th May 2024, 21:33
Yes, I just went there to see if I could get answers, which I didn't. I asked you (I meant StvG) about vdub b/c you (StvG) are the one who suggested (here) that the if/then syntax error (which is in Avisynth) would somehow be corrected by switching to Vdub2. And I guess I didn't ask it clearly... If I have only Intel processors, which of those 2 GUI programs (.exe in the download) is safe for me to run, VirtualDub.exe which appears to be x86 (which means 32-bit) and/or VirtualDub64.exe which appears to be AMD64 (which means 64-bit but MAY MEAN that it can't run safely on Intel processors)? It would be nice if I really could switch to 64 bit Vdub. But I HAVE to know if the AMD64 version is fully safe to run on Intel if I'm urged to use it. (I currently have i5 and xeon Intel processors.) I can't run something that works fine for 3 months then suddenly blows up due to incompatible processor.

@LigH already said it and you can read the first section here (https://en.wikipedia.org/wiki/X86-64) - "x86-64 (also known as x64, x86_64, AMD64, and Intel 64)...". Also "The original specification, created by AMD and released in 2000, has been implemented by AMD, Intel, and VIA...". Because of "The original specification, created by AMD..." 64bit files can have "amd64" in their names and this does not mean they are fully compatible with only AMD CPUs.

TCmullet
9th May 2024, 00:24
It seems like a problem with Gscript, but I have no idea why.

We have the cause! Your "teaching" about Gscript led to learning that it is incorporated into Avisynth+. Setting up Vdub2 got around it. But I also discovered that Version.avs showed an old 2.6 when running with my Vdub 1.10.4 (which Vdub I've used for many years now).

A seasoned user pointed out that there might be a rogue avisynth.dll somewhere that Vdub 1.10.4 was seeing but Vdub2 was not. I had searched for avisyn*.dll and anything x*.dll on my C: drive using Agent Ransack, my goto file search utility. It found only the two copies that are supposed to be each of two windows system folders. Was stymied. THEN, on a whim, I searched D: drive. I FOUND IT! An old dll was in the very folder that Virtualdub.exe 1.10.4 was located! Deleting that forced Vdub 1.10.4 to look in the right place for avisynth! Version.avs and AiUpscale.avsi work fine now!

I'm sorry that I scared myself so badly, as well as distracting everyone who read all this. NOW, I can try AiUpscale!

DTL
9th May 2024, 11:44
Hmm - I think application can not load avisynth.dll directly. I think it is registered as .avs file handler in Windows and only Windows first load it (from the exact path in win-system ?). Though I can not find direct path to windows\system in anything looking like .avs file handler - only DefaultIcon for .avs file directly points to c:\windows\system\avisynth.dll . So process can load any avisynth.dll (from current working dir too ?) at opening .avs script ? Same as plugin by LoadPlugin() command ?

TCmullet
9th May 2024, 22:01
Can I assume that every who is enjoying AiUpscale has previously used Super Res for Avisynth?
https://www.infognition.com/super_resolution_avisynth/

I've been using it for years. At their site they explains how it works, which essentially is collecting data from the immediately preceding frames. There are no "engine" controlling parameters to adjust.

If AiUpscale is better, could someone please point me (and all other less-tech-savy ones) to (1) an explanation of what's going on, and (2) how to go about tweaking it to the best possible results? Memorizing the parameters in the usage section of the readme page doesn't really help, aside from now knowing what parameters there are to work with.
https://github.com/Alexkral/AviSynthAiUpscale?tab=readme-ov-file#readme

Before studying this thread, I'd never HEARD of a shader nor what it is. Having googled it now, I have a slight feel for what it is, but am not clear what shaders have to do with synthesizing extra resolution (when upscaling). The bottom line need is for general guidance in changing parameters to accomplish the goal. I HAVE done this a little (changing Luma to HQ), but can't see any real difference. (I do confess I'm working with crappy input, VHS-EP tape.)

Also, seeing as how this method works to upscale isn't described, it doesn't say whether or not it uses info from previous frames to supplement detail. For all I know, it's working on each frame independently from the others. If so, how can it be better than SuperRes? (What bothers me about SuperRes is that it hasn't been touched since about 2017. But one cannot gripe about the price; it's now free. But I'd pay for something in the Avisynth world that's better.)

I am SO in the dark! Did I fail to find a fuller explanation that DOES exist somewhere on the web??

Guest
10th May 2024, 01:19
@ TCmullet

If you're so hell bent on trying some form of AI Upscaling, I would strongly suggest that you take a look at Topaz Video AI.

But here's an example of the script I was trying:-

SetCacheMode()
SetMemoryMax(20480)
LoadPlugin("%AVISYNTHPLUGINS%\masktools\masktools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\mvtools\mvtools2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\RgTools\RgTools.dll")
LoadPlugin("%AVISYNTHPLUGINS%\aWarpsharpMT\aWarpsharpMT.dll")
LoadPlugin("%AVISYNTHPLUGINS%\AviSynthShader\Shader-x64.dll")
LoadPlugin("%AVISYNTHPLUGINS%\MedianBlur2\MedianBlur2.dll")
LoadPlugin("%AVISYNTHPLUGINS%\NNEDI3CL\NNEDI3CL.dll")
LoadPlugin("%AVISYNTHPLUGINS%\ColorMatrix26\ColorMatrix64.dll")
Import("%AVISYNTHPLUGINS%\AviSynthShader\Shader.avs")
Import("%AVISYNTHPLUGINS%\AviSynthAiUpscale\AiUpscale.avs")
Import("%AVISYNTHPLUGINS%\GrainFactory3mod\GrainFactory3mod.avs")
Import("%AVISYNTHPLUGINS%\GRADE-PACK\Grade Pack.avs")
Import("%AVISYNTHPLUGINS%\MASK-PACK\Masks Pack.avs")
Import("%AVISYNTHPLUGINS%\TRANSFORM-PACK\Transforms Pack.avs")
Import("%AVISYNTHPLUGINS%\TRANSFORM-PACK\Transforms Pack-Models.avs")
Import("%AVISYNTHPLUGINS%\TRANSFORM-PACK\Transforms Pack-Transfers.avs")
Import("%AVISYNTHPLUGINS%\EXTOOLS\ExTools.avs")
Import("%AVISYNTHPLUGINS%\LSF-PLUS\LSFplus.avs")
Import("%AVISYNTHPLUGINS%\RESIZERS-PACK\Resizers Pack.avs")
Import("%AVISYNTHPLUGINS%\SHARPENERS-PACK\Sharpeners Pack.avs")
Import("%AVISYNTHPLUGINS%\SMDEGRAIN\SMDegrain.avs")
Import("%AVISYNTHPLUGINS%\Zs_RF_Shared\Zs_RF_Shared.avs")
video=ConvertToYV12(video)
video=ColorMatrix(video,mode="Rec.601->Rec.709")
video=ConvertBits(video,16)
video=AiUpscale(video, factor=2, chroma="HQ Sharp", luma="HQ Sharp")
pre=ex_Median(video,mode="IQMV")
video=SMDegrain(video,tr=8,thSAD=800,thSADC=400,contrasharp=true,prefilter=pre,refinemotion=true)
video=aWarpSharp2(video, thresh=128, blur=2, type=0, depth=16, chroma=3)



# factor=1, chroma="HQ Sharp", CResample="HQ Sharp")
# video=deep_resize(video,1440,1080,grain=0,qual=2)
# video=Tweak(video,hue=0,sat=0.8,bright=3,cont=1)
# video=AiUpscale(video, luma="HQ Sharp")

TCmullet
10th May 2024, 01:40
@ TCmullet
If you're so hell bent on trying some form of AI Upscaling, I would strongly suggest that you take a look at Topaz Video AI.

I'm not set on trying some form; I'm committed to DOING upscaling of much VHS footage. I've already seen Topaz and rejected it. Too expensive and (most importantly) it's NOT in Avisynth! But thanks for trying. I'm wanting guidelines on how to experiment meaningfully with THIS tool, AiUpscale, as it seems it's the only tool (other than Infognition's SuperRes) that's made for Avisynth.

LigH
10th May 2024, 09:44
Indeed, there is not much choice for Avisynth. VapourSynth has a few more filters, as you can see in Selur's "Hybrid" (downloading the different models costs several Gigabytes).

SaurusX
11th May 2024, 15:08
I'm not set on trying some form; I'm committed to DOING upscaling of much VHS footage. I've already seen Topaz and rejected it. Too expensive and (most importantly) it's NOT in Avisynth! But thanks for trying. I'm wanting guidelines on how to experiment meaningfully with THIS tool, AiUpscale, as it seems it's the only tool (other than Infognition's SuperRes) that's made for Avisynth.

I'm not sure if you figured this out already, but when I was last experimenting with AIUpscale last November I called it in the script like this:

AiUpscale(luma="HQ",Chroma="KrigBilateral",mode="LineArt")

Since I'm using MeGUI I also loaded in the Aiupscale.avsi and Shader.avsi scripts beforehand. Additionally, in my plugin folder I have a Shaders folder containing the accompanying models.

https://i.ibb.co/SyY3R95/Cybersix-01.png

LigH
11th May 2024, 19:11
That reminds me of Tintin... but could not name the exact movie.

tormento
13th January 2025, 13:13
A doubt arose in my mind: what is the difference between chroma upscaling (Chroma) and chroma resampling (CResample)?

When is better to apply one, the other or both?

Alexkral
16th January 2025, 22:31
It just depends on what format you want to end up with, other than that the behavior of KrigBilateral is the same for both, so you can benefit from using the luma information to scale the chroma.

tormento
17th January 2025, 12:21
It just depends on what format you want to end up with, other than that the behavior of KrigBilateral is the same for both, so you can benefit from using the luma information to scale the chroma.
Sorry but I keep on not understanding. What is the difference between rescale and upsample? Can you make me some examples?

Alexkral
19th January 2025, 04:35
In subsampled formats, chroma has a lower resolution than luma, so for example 4:2:2 has half the horizontal chroma resolution of 4:4:4, and 4:2:0 has half the chroma resolution both vertically and horizontally. Without going into more complex details, resampling or upsampling means scaling the chroma to the luma resolution.

So with a 4:2:0 source, if you double the chroma resolution and mix it with the luma, you get a 4:4:4 result. But if you then double the luma resolution as well, and mix it with the previous chroma, you get again a subsampled 4:2:0 result.

So upscaling and upsampling basically mean the same thing here, the operation is the same, but upsampling only refers to chroma, because then we are talking about chroma samples that are distributed differently depending on the format.