View Full Version : Avisynth AiUpscale v1.2.0
Alexkral
20th July 2020, 13:39
This is a script to test some Super-resolution convolutional neural networks implemented as hlsl pixel shaders, through Avisynth Shader.
Download (https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/1.2.0)
Github repository with explanation on its usage:
https://github.com/Alexkral/AviSynthAiUpscale
I became interested in this after reading some posts in which it was assumed that implementing the FSRCNNX shaders using AviSynth Shader was not possible, because they were written in GLSL. After all, GLSL and HLSL are not that different, and the mpv hook format doesn't change this. So I was able to do it without too much trouble, also with the other FSRCNN shaders by igv and haasn. That is what I thought to share at the time, but since igv provides the code not only to train the networks, but also to convert the weights into mpv hooks, I became interested in training different models. This also I think has worked very well (quite boring I must say, except for the part related to experimentation), and I could have shared the result but, how not, I became interested in adding other kinds of networks, which also allowed me to do other kinds of experiments. Finally, I realized that using a specific dataset for training allowed to obtain better results for specific content, which made me repeat the entire training process for the "Illustration" models.
So it's been a while since I started with this, every single part has needed to be redone multiple times, lots of training and retraining, having to deal with things that I didn't even know existed, such as the chroma positioning when resizing or some AviSynth Shader specific problems, so I can't be happier to have finished it at last.
Special thanks to MysteryX, igv and Shiandow for writing such amazing code without which this couldn't be possible.
Here are some results on performance tested with AVSMeter for a YV12 clip with default settings (chroma upscaled with Lanczos). GPU is a Nvidia GTX 1080:
1080p -> 2160p
AiUpscale Fast = 38.47 fps
AiUpscale Medium = 25.30 fps
AiUpscale HQ = 17.16 fps
real.finder
20th July 2020, 15:12
thanks!
I did try it and it work with server that don't has gpu, is this ok? but anyway it a good thing :)
edit: FFT3DGPU also work! seems directx things can work with cpu only
goorawin
22nd July 2020, 02:02
Your AiUpscale looks very interesting, so I'm interested to test it against other upscaling options.
You mention that it is able to adjust the target width and height.
The 4x Upscaling looks good.
If that is the case could you please provide a sample script that upscales from 720x576SD to 1920x1080HD and HD to UHD.
Alexkral
22nd July 2020, 02:44
If that is the case could you please provide a sample script that upscales from 720x576SD to 1920x1080HD and HD to UHD.
AiUpscale (clip, Luma = "VDSR", Width = 1920, Height = 1080)
This will scale the 720x576 clip to 1920x1080. Since the height scaling ratio is 1.875, only the VDSR model can be used. When the ratio is at least 2 (and less than or equal to 4) for both width and height, the HQ and HQ Sharp models can also be used.
For HD to UHD it is the same.
poisondeathray
22nd July 2020, 05:07
Thanks for this. I'm having problems getting it working
Shader: Failed to open pixel shader Shaders\Photo\Medium\2x\feature_1.cso
AiUpscale.avsi, line 393
line 217
line 218
line 239
I think it's some path related issue. Win8
AiUpscale.avsi and Shaders folder are in the avisynth+ plugins directory. AviSynthShader works ok for me separately .
(The .avsi says "AviSinth+ plugins folder", but I'm assuming it's obviously a typo, the github page says "AviSynth+ plugins directory", but maybe you can edit it for the next release)
Does mpv need to be installed ? I installed it anyways but still same error; I normally use a "portable" version, but I might uninstall if you technically don't need it. I have mpv.conf in AppData\Roaming\mpv and edited some entries .
profile = gpu-hq
glsl-shader = "<PATH TO HOOK>"
Where the actual path of mpv.hooks is located; and I tried different things such as specifying the directory above (container mpv.hooks folder), and "/" vs. "" slashes , I tried escaping colon, tried ' instead of " , I tried specifying specific .glsl files in the mpv.hooks directory
Alexkral
22nd July 2020, 06:19
That's weird, the path seems correct.
AiUpscale.avsi and the Shaders folder should be in the same folder as AviSynth Shader, on my PC that is the AviSynth+\plugins64+ folder.
I have only tested it on Win7 and Win10 x64, but I don't see any reason why it won't work with x86.
Other than that you could try opening VirtualDub2 with administrator privileges to see if that makes any difference, and then open the script.
mpv is only needed to use the hooks, if you extract them in the same folder as mpv.conf, you would have to edit it for example like this:
profile = gpu-hq
glsl-shader = "~~/AiUpscale_Fast_2x_Photo.glsl"
real.finder
22nd July 2020, 17:20
I think the script need to use ScriptDir() http://avisynth.nl/index.php/Internal_functions#ScriptDir
poisondeathray
22nd July 2020, 19:33
I have only tested it on Win7 and Win10 x64, but I don't see any reason why it won't work with x86.
Sorry it is x64
My plugins are in a custom directory location, not default (registry entries are ok , everything else works, other scripts/plugins). Could that be related?
Other than that you could try opening VirtualDub2 with administrator privileges to see if that makes any difference, and then open the script.
no difference
mpv is only needed to use the hooks, if you extract them in the same folder as mpv.conf, you would have to edit it for example like this:
profile = gpu-hq
glsl-shader = "~~/AiUpscale_Fast_2x_Photo.glsl"
I tried moving them and this configuration too, same error
Alexkral
22nd July 2020, 21:16
Just to be clear, the mpv hooks are not required at all for AviSynth AiUpscale to work, and the path in mpv.conf is also not used. They are included only to be used with mpv.
Please change line 109 in AiUpscale.avsi to this and report if this fixes the problem:
Global Path = ".\Shaders\"
poisondeathray
22nd July 2020, 23:31
Just to be clear, the mpv hooks are not required at all for AviSynth AiUpscale to work, and the path in mpv.conf is also not used. They are included only to be used with mpv.
Got it, thanks.
Please change line 109 in AiUpscale.avsi to this and report if this fixes the problem:
Global Path = ".\Shaders\"
No , similar error
Shader: Failed to open pixel shader .\Shaders\Photo\Medium\2x\feature_1.cso
(rest of message is the same)
Alexkral
23rd July 2020, 00:44
Sorry but I can't figure out how to fix this since AviSynth doesn't provide anything to find out the path to the plugins directory. It should work if you specify the full path to the Shaders folder (ended with a backslash and in quotes) on line 109, but obviously that's not going to help others with the same problem.
poisondeathray
23rd July 2020, 00:52
Sorry but I can't figure out how to fix this since AviSynth doesn't provide anything to find out the path to the plugins directory. It should work if you specify the full path to the Shaders folder (ended with a backslash and in quotes) on line 109, but obviously that's not going to help others with the same problem.
Yes, this works for me. Was it just me having the problem ?
Global Path = "<full path...\Shaders\>"
I don't understand why either, because I'm pretty sure other working scripts use that variable method too.
Thanks again
real.finder
23rd July 2020, 03:36
Sorry but I can't figure out how to fix this since AviSynth doesn't provide anything to find out the path to the plugins directory. It should work if you specify the full path to the Shaders folder (ended with a backslash and in quotes) on line 109, but obviously that's not going to help others with the same problem.
as I said here https://forum.doom9.org/showthread.php?p=1919111#post1919111 anyway see my Pull request
Alexkral
23rd July 2020, 04:26
as I said here https://forum.doom9.org/showthread.php?p=1919111#post1919111 anyway see my Pull request
Thanks but this doesn't work since ScriptDir() returns the path of the loaded script, not the .avsi
real.finder
23rd July 2020, 06:01
Thanks but this doesn't work since ScriptDir() returns the path of the loaded script, not the .avsi
you sure? it's work fine here from the avsi
real.finder
23rd July 2020, 06:03
poisondeathray, can you try it? https://github.com/realfinder/AviSynthAiUpscale/raw/master/AiUpscale.avsi
poisondeathray
23rd July 2020, 06:25
poisondeathray, can you try it? https://github.com/realfinder/AviSynthAiUpscale/raw/master/AiUpscale.avsi
Different error message. The current directory location of the .avs script is location is appended (but Shaders directory actually isn't there)
Shader: Failed to open pixel shader F:\test\Shaders\Photo\Medium\2x\feature_1.cso
If I copy/paste Shaders folder to that F:\test folder, it works
real.finder
23rd July 2020, 06:32
Different error message. The current directory location of the .avs script is location is appended (but Shaders directory actually isn't there)
Shader: Failed to open pixel shader F:\test\Shaders\Photo\Medium\2x\feature_1.cso
If I copy/paste Shaders folder to that F:\test folder, it works
but it work fine for me, maybe because I made it load from subfolder by another avsi
anyway
make an avsi named AviSynthPluginsDir.avsi and put this in it
global AviSynthPluginsDir = VersionNumber() < 2.60 ? RT_GetWorkingDir() : ScriptDir()
and put it in your plugins folder
and replace ScriptDir() with AviSynthPluginsDir in AiUpscale.avsi
poisondeathray
23rd July 2020, 06:38
r.f - it works.
I deleted the copied shaders folder, find/replaced all 4 entries in AiUpscale.avsi as per instructions
Thanks to you both
Alexkral
23rd July 2020, 14:48
Some tests here:
https://forum.doom9.org/showthread.php?p=1919165#post1919165
Strange to see Lanczos resize as reference for video data. I think the SincResize (with max possible 'taps' parameter) is closer to reference upsize resampler for band-limited and 'conditioned' against ringing good quality video data. Lanczos is more universal, but it significally limited for reference restoring of highset frequencies in video data. Unfortunately current version avisynth looks like has (small) bug in SincResize resampler implementation and it can make compare metrics with ideal input reference image data worse.
Alexkral
25th July 2020, 21:35
AviSynth AiUpscale v1.0.1 (https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/v1.0.1)
Changes:
- Added shaders source code.
- Some minor fixes.
wolfman2791
26th July 2020, 19:23
This is very good. Thank you!
gmail123
27th July 2020, 03:12
how to import to vs?
Alexkral
27th July 2020, 05:22
This is very good. Thank you!
You're welcome. :)
how to import to vs?
I'm pretty new to VapourSynth so I can't help you with that, sorry.
poisondeathray
27th July 2020, 05:49
how to import to vs?
you can run glsl shaders directly in vs with vs-placebo
https://github.com/Lypheo/vs-placebo
If you're on Windows with avisynth installed, you can also import an avs script into vapoursynth with AVISource
gmail123
27th July 2020, 08:46
you can run glsl shaders directly in vs with vs-placebo
https://github.com/Lypheo/vs-placebo
If you're on Windows with avisynth installed, you can also import an avs script into vapoursynth with AVISource
my english is poor...
sample:1080p ---->2160P,
can you give me a vs script ?
thx!
poisondeathray
27th July 2020, 14:44
my english is poor...
sample:1080p ---->2160P,
can you give me a vs script ?
thx!
My English is poor too (and it's my first language :D)
You should probably post in the vapoursynth subforum
One difference is Alexral did some separate training (slightly different) . I'm not sure how to use those into vapoursynth directly; only .glsl shaders can be used with placebo.Shader . (You can use the AVISource workaround, but you need windows, avisynth installed)
There is documentation on the page
eg.
import vapoursynth as vs
core = vs.get_core()
clip = core.lsmas.LWLibavSource(r'PATH\input.mkv')
clip = core.resize.Bicubic(clip, format=vs.YUV444P16)
clip = core.placebo.Shader(clip, width=clip.width*2, height=clip.height*2, shader=r'PATH\FSRCNN-Medium\FSRCNN_x2_r2_16-0-2.glsl')
clip.set_output()
Alexkral
27th July 2020, 16:15
Yes, there are no glsl mpv hooks of the VDSR and HQ models because they were fully or partially trained with Matlab, and their weights were converted directly to hlsl. They would have been too slow for mpv anyway.
biship
28th July 2020, 11:38
This can be used in MadVR?
Alexkral
28th July 2020, 13:15
This can be used in MadVR?
No, they are different programs.
gmail123
30th July 2020, 17:34
compare to with Waifu2x- cunet (For 2D artwork. Slow, but better quality.)?
Alexkral
31st July 2020, 02:04
compare to with Waifu2x- cunet (For 2D artwork. Slow, but better quality.)?
That's subjective. For RGB it seems that the VDSR and HQ models are a little slower. Looking at the results, I think you'll find that the AiUpscale models are a bit sharper.
gmail123
31st July 2020, 02:43
That's subjective. For RGB it seems that the VDSR and HQ models are a little slower. Looking at the results, I think you'll find that the AiUpscale models are a bit sharper.
I had tested it,VDSR/HQ models are very good.
1、Plan to support 32bit float?
2、for video, "Photo" or "Illustration",Which is better?
Alexkral
31st July 2020, 03:19
32 bit float is not supported because the processing in Avisynth Shader is done at 16 bit depth, I don't think that will change.
For video that comes from a camera you should use the "Photo" models, the "Illustration" models are for artwork, drawings, etc.
gmail123
31st July 2020, 03:30
32 bit float is not supported because the processing in Avisynth Shader is done at 16 bit depth, I don't think that will change.
For video that comes from a camera you should use the "Photo" models, the "Illustration" models are for artwork, drawings, etc.
good,thx!
markiemarcus
31st July 2020, 07:57
This is really fantastic work. Thank you so much for all of the effort! These NN upscalers can be a little unpredictable and being able to modify the script and check the results in realtime is just invaluable. Really, really, terrific work. It's incredibly fast, too. Absolutely flies on my RX 480.
markiemarcus
31st July 2020, 09:39
Quick question. How is this handling 601 to 709 conversion, if at all? The SD sources I'm working from are all 601 so there's a huge shift post upscale. Is there an optimal way of handling this?
Alexkral
31st July 2020, 11:26
Quick question. How is this handling 601 to 709 conversion, if at all? The SD sources I'm working from are all 601 so there's a huge shift post upscale. Is there an optimal way of handling this?
Hi, thanks for the feedback. There is no conversion between RGB and YUV so there should be no change in this. If you're using VirtualDub2 you have to select that in Video > Decode format.
markiemarcus
31st July 2020, 20:22
Hi, thanks for the feedback. There is no conversion between RGB and YUV so there should be no change in this. If you're using VirtualDub2 you have to select that in Video > Decode format.
Spot on, thanks for getting back to me. Again, this is just fab work and much appreciated.
gmail123
2nd August 2020, 10:30
hq/vdsr model,a lot of Mosquito noise,how to get rid of?...
hungryeyes
3rd August 2020, 08:46
thank goodness for this script. I've been trying to get waifu2x to work without having to write temporary files (am noob) and this looks like it will work way better. I'm particularly anxious to see how it will handle old DVDs with interlacing.
Alexkral
3rd August 2020, 12:06
I'm particularly anxious to see how it will handle old DVDs with interlacing.
Interlaced content is not supported, you'll have to deinterlace first.
hungryeyes
3rd August 2020, 21:57
some of the first ai upscalers started as deinterlacing filters, such as nnedi. odd scanlines were interpolated, and since the result was quite nice, it led to use as a general upscaler. anyway, a lot of damage can still happen when trying to go progressive, so my idea is to AI upscale THEN deinterlace to try and eek out as much detail as possible. something like SeperateFields->AiUpscale->Weave->QTGMC. the question is- will the trained model perform when fed half-height photos, or is even more processing required.
Alexkral
3rd August 2020, 23:09
something like SeperateFields->AiUpscale->Weave->QTGMC. the question is- will the trained model perform when fed half-height photos, or is even more processing required.
From my very limited experience with interlaced content, I'd say that should work fine.
markiemarcus
4th August 2020, 07:01
All seems to be working really well. Regarding the dither problem you'd mentioned in the Avisynth Shader thread, does the usual high bit depth approach work around this? For example:
ConvertBits(16)
AiUpscale(luma="vdsr",Chroma="KrigBilateral",mode="illustration")
ConvertBits(8, dither=-1)
Alexkral
4th August 2020, 08:32
Processing is done at 16 bit depth anyway, but if the input is 8 bit, the output is converted to 8 bit (without dithering) in the script before returning it. If the input is 16 bit, so is the output, but the transfer to the GPU is slower.
The problem is that AviSynth Shader uses ordered dithering when converting to 8 bit on the GPU before returning the result, so the conversion cannot be done this way which would be faster.
markiemarcus
4th August 2020, 09:21
Yes that's definitely a nuisance; there are often times where you need additional processing post upscale and having dither baked like that isn't ideal.
Just to clarify though, passing 16-bit to AIUpscale like this, even though it offers no quality benefits and is slower, doesn't add dither?
Alexkral
4th August 2020, 10:40
Dithering is for bit depth reduction only, so no. I could add an option to return 16 bit for an 8 bit input in the next release.
markiemarcus
4th August 2020, 11:06
Gotcha, thanks for the clarification. It's actually no real biggie for me given there's some HBD processing going on before and afterwards, but I'm sure that such an extra option might be useful for some.
Many thanks again for your hard work. The results are really impressive and it's considerably faster than every other NN upscaler I've tried. It's just so useful being able to modify the denoising on-the-fly to get the best out of it.
ReinerSchweinlin
23rd August 2020, 22:42
Thanx for this, it looks really interesting :)
Just set up a completeley fresh win10/64 (2004), installed avisynth+ and Avisynthshader, put all the files in ".....\avisynth+\plugins+", loaded up Virtualdub64..
First, I had to get rid of shader.dll, otherwise VD2 was complaining about "not loading 32bit plugin into 64bit avisynth"...
Now I get. "There is no function named 'convertToShader'", refering to 4 lines in aiupscaler.avsi..
Can you help me on this one please?
Alexkral
24th August 2020, 00:46
For VirtualDub2 x64 you need AviSynth Shader x64 and AiUpscale in the plugins64 folder, default is \AviSynth+\plugins64+
gmail123
25th August 2020, 09:31
any plan to add denoise filter?
markiemarcus
25th August 2020, 11:04
Thanx for this, it looks really interesting :)
Just set up a completeley fresh win10/64 (2004), installed avisynth+ and Avisynthshader, put all the files in ".....\avisynth+\plugins+", loaded up Virtualdub64..
First, I had to get rid of shader.dll, otherwise VD2 was complaining about "not loading 32bit plugin into 64bit avisynth"...
Now I get. "There is no function named 'convertToShader'", refering to 4 lines in aiupscaler.avsi..
Can you help me on this one please?
I had the same issue. Was solved by specifying the absolute directory of the Shaders folder in line 110 of AIUpscale. For example:
Global Path = "C:\Program Files (x86)\AviSynth+\plugins64+\Shaders"
There's no need to delete shader.dll.
Alexkral
25th August 2020, 12:39
any plan to add denoise filter?
There are already plenty of denoise filters in AviSynth that can be used in a better way than an embedded filter.
ReinerSchweinlin
27th August 2020, 21:29
For VirtualDub2 x64 you need AviSynth Shader x64 and AiUpscale in the plugins64 folder, default is \AviSynth+\plugins64+
Thanx. I copied the content of avisynthsader 1.6.6 zip into plugins64+, as well as the content of aiupscale. Thatīs what I did before what gave the error. I missed be missing something else.
ReinerSchweinlin
27th August 2020, 21:34
I had the same issue. Was solved by specifying the absolute directory of the Shaders folder in line 110 of AIUpscale. For example:
Global Path = "C:\Program Files (x86)\AviSynth+\plugins64+\Shaders"
There's no need to delete shader.dll.
Thank you. Changed the path, but still get:
"canot load 32.. in 64..: "c:/program..... /avisynth+/plugins64+/shader.dll".
Somehow it always tries to load shader.dll
If I remove shader.dll from the plugins+ folder, leaving everythnig else as it is (including shader-x64.dll), I get:
"avisynth open failure: Script Erro: There is no function named "converttoshader", followed by the mentioning of four lines of the aiupscale.avsi skript...
seems the error is the same as before
poisondeathray
28th August 2020, 01:09
If I remove shader.dll from the plugins+ folder, leaving everythnig else as it is (including shader-x64.dll), I get:
"avisynth open failure: Script Erro: There is no function named "converttoshader", followed by the mentioning of four lines of the aiupscale.avsi skript...
seems the error is the same as before
shader-x64.dll should be all you need to get rid of that error. It looks like it's not autoloading. Try moving it out of the autoload directory and explicitly loading with LoadPlugin()
If it still does not work, try cleaning out the plugins directory. Maybe some conflicting .dlls
gmail123
5th September 2020, 18:45
please add vdsl/hq/hq hard.glsl,thx.
gmail123
5th September 2020, 18:46
import to vs:thanks:
SaurusX
27th October 2020, 14:21
Fantastic work on this. The results speak for themselves. Definitely improved quality when compared to SuperResXBR.
Alexkral
27th October 2020, 19:21
Thanks! I have managed to improve the VDSR models considerably, I will make a new release in the next few days.
ReinerSchweinlin
28th October 2020, 10:23
Thanks! I have managed to improve the VDSR models considerably, I will make a new release in the next few days.
Nice :) Thanx for your efforts !
Alexkral
30th October 2020, 04:47
AviSynth AiUpscale v1.1.0 (https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/v1.1.0)
Changes:
- Improved the VDSR models.
- Added new parameter to set the output bit depth.
- When the output is less than 16 bit, the conversion is now done on the GPU with ordered dithering.
- Alpha planes are now upscaled with Lanczos instead of being removed.
The VDSR models have been substantially improved for all scale factors after adjusting some training options. About the dithering, I honestly don't remember what I read that made me think that it wasn't good for this, but after doing some tests it is clear that this is not the case. So doing the conversion now on the GPU should mean a nice speed-up, more noticeable for the faster models.
Also, I have found that at least on my system there is a benefit when using four threads, so try using Prefetch(4) at the end of your scripts.
gmail123
1st November 2020, 07:36
vdsr model:
AiUpscale1.01--SSIM Mean Y:0.9707451 (15.338db)
--PSNR Mean Y:40.994 U:49.153 V:49.248 Avg:42.249
AiUpscale1.10-- SSIM Mean Y:0.9709488 (15.368db)
--PSNR Mean Y:40.976 U:49.103 V:49.290 Avg:42.233
Alexkral
1st November 2020, 11:43
Set5 - Photo
1.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 40.303107806444 0.977076850531857
'VDSR-1.0.1' 40.0231705258812 0.976284959358199
2x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 37.0541978031766 0.957678515410715
'VDSR-1.0.1' 36.6700956028294 0.955898000384579
2.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 34.7290845636078 0.936933199722221
'VDSR-1.0.1' 34.3833689195523 0.933502938036026
3x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 33.0708644076159 0.914888194061316
'VDSR-1.0.1' 32.7252438666527 0.910143847730622
3.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 31.7451881124588 0.891913536377046
'VDSR-1.0.1' 31.4385026528417 0.885549575366799
4x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 30.6333993713215 0.868059737258679
'VDSR-1.0.1' 30.3843028542906 0.861332075381644
Set5 - Illustration
1.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 40.3110321290525 0.976887220812664
'VDSR-1.0.1' 40.1070682034134 0.976346287794712
2x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 36.9362257004149 0.956827635790212
'VDSR-1.0.1' 36.631527053702 0.95544423942317
2.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 34.3816642584093 0.933170040816044
'VDSR-1.0.1' 34.1517733908771 0.931394422143814
3x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 32.8355848241999 0.911281952451763
'VDSR-1.0.1' 32.5152354802607 0.907160504583839
3.5x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 31.4385026528417 0.885549575366799
'VDSR-1.0.1' 31.1604700679502 0.881199445944243
4x
Model PSNR SSIM
____________ ________________ _________________
'VDSR-1.1.0' 30.3683034245151 0.861417745548344
'VDSR-1.0.1' 30.1770642431373 0.857356189888384
Shinkiro
13th January 2021, 16:51
ConvertBits(16)
AiUpscale(Factor=4, Luma="HQ", Chroma="Lanczos", Width = 1920, Height = 1080, Double=0, Mode="Illustration", CPlace="MPEG2", OutDepth=16)
http://i114.fastpic.ru/big/2021/0113/17/61c4341134e378fddf63a48029147117.png
does not accept yuv420p16 as input I cannot understand why
Alexkral
13th January 2021, 23:45
Neither do I, it works fine here. That should only show up if the input is YV411 or 32 bits.
kopmjj
17th February 2021, 09:01
Hi this looks like an interesting upscale feature
But I'm having trouble making this work, I put the avs and the other folder in plugins 64 but I dont know the basic script.
I'm trying to upscale DVD to 4k
Can someone show me a sample script to enter in my avspmod?
Just cant get my head round it. Thanks.
Alexkral
19th February 2021, 00:42
Which problem you have? You just need to use a factor equal to 4, and then use some interpolation method to get to 4K, something like this:
AiUpscale(Factor = 4)
LanczosResize(3840, 2160)
Note however that this will change the aspect ratio.
kopmjj
19th February 2021, 02:40
Which problem you have? You just need to use a factor equal to 4, and then use some interpolation method to get to 4K, something like this:
AiUpscale(Factor = 4)
LanczosResize(3840, 2160)
Note however that this will change the aspect ratio.
hi thanks im getting the following error image attached.
what am i missing?
kopmjj
19th February 2021, 20:06
ok looks like the photo upload doesnt work heres my script below, the error i get is there is no function named convertToshader
and the following error in aiupscale avsi in lines
341
217
228
239
DirectShowSource("C:\Users\king\Desktop\VID-20210125-WA0012.mp4")
Import("C:\Program Files (x86)\AviSynth+\plugins64+\AiUpscale.avsi")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\AddGrainC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\mvtools2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\mt_masktools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\RgTools.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\dfttest.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\aWarpsharpMT.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\nnedi3.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\TDeint.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\FFT3dGPU.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\FFT3dGPU.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\fft3dfilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\gradfun2db.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\flash3kyuu_deband.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth+\plugins64\Deblock-x64.dll")
Import("C:\Program Files (x86)\AviSynth+\plugins64\AiUpscale.avsi")
Converttorgb()
AiUpscale(Factor = 4)
LanczosResize(3840, 2160)
poisondeathray
19th February 2021, 21:25
the error i get is there is no function named convertToshader
You need AviSynthShader, the .dll and .avsi
It's listed under the requirements
https://github.com/Alexkral/AviSynthAiUpscale
https://github.com/mysteryx93/AviSynthShader/releases
kopmjj
19th February 2021, 22:38
You need AviSynthShader, the .dll and .avsi
It's listed under the requirements
https://github.com/Alexkral/AviSynthAiUpscale
https://github.com/mysteryx93/AviSynthShader/releases
thank you this worked.
now need to find out whats the best way to upscale dvd to 4k need to see what settings i need to enter.
is there anything else i need besides AiUpscale(Factor = 4) i will do the denoising and sharpening before ai upscale.
Alexkral
20th February 2021, 01:07
You will probably find the result too sharp if you use the HQ Sharp model after sharpening the image, you could also try it instead. There are some performance results in the first post of this thread, and everything else is explained in the Github readme.
kopmjj
23rd February 2021, 16:24
You will probably find the result too sharp if you use the HQ Sharp model after sharpening the image, you could also try it instead. There are some performance results in the first post of this thread, and everything else is explained in the Github readme.
hi thanks for this, but no matter what i try my video is getting to sharp, doesnt look natural all i done was deinterlace the dvd, before using ai upscale, is there a setting to tone down the sharpness? tried fast setting but not much difference, also tried vdsr but no luck.
Alexkral
23rd February 2021, 21:21
Try a factor = 3 or 2 and then some interpolation.
ReinerSchweinlin
24th February 2021, 12:09
hi thanks for this, but no matter what i try my video is getting to sharp, doesnt look natural all i done was deinterlace the dvd, before using ai upscale, is there a setting to tone down the sharpness? tried fast setting but not much difference, also tried vdsr but no luck.
You could try a slight blurring afterwards, as well as adding some random noise - it helps to get a more natural look sometimes.
Alexkral
28th March 2021, 03:09
AviSynth AiUpscale v1.2.0 (https://github.com/Alexkral/AviSynthAiUpscale/releases/tag/1.2.0)
Changes:
- Changed/Improved all models.
- Removed the VDSR models.
- Added Sharp versions of the Fast and Medium models.
- Removed the Double, Width and Height parameters.
- Added mpv user shaders of all models.
- Renamed the Illustration models to LineArt.
- Fixed: the mpv shaders didn't work properly with vs-placebo.
Now all models are based on FSRCNNX, with Global Residual Learning using Lanczos interpolation, and more layers and Local Residual Learning for the HQ models. I also trained some VDSR models with the processing done in the low-resolution space, obtaining the same results as the previous ones, but even those are outperformed by the new Medium models, so there's no reason to keep them. Also, the processing on the new HQ models is done entirely in the low-resolution space, so the arbitrary resize feature has been removed. I think it was handy, and I was using it myself for some things, but the traditional fractional upscaling method should give better results.
At this point, I think that considering the limitations of AviSynth Shader, there's not much room for improvement for the main application. The mpv shaders could still be greatly improved for use with some of the latest GPUs, but these are not yet available where I live, so that will have to wait.
ReinerSchweinlin
29th March 2021, 12:19
Thanx !
real.finder
7th April 2021, 12:58
at least for Anime I read that FSRCNNX is not good for things that less than 720 (will case oil pant effect), is it possible have another options like SSSR and Ravu? as they good for those cases
Alexkral
7th April 2021, 19:43
Despite being based on FSRCNNX, the latest models are actually very different in some important ways, and the LineArt models have been trained with an Anime dataset, which makes a big difference. It is true however that for more than 2x there are more artifacts, but not much more can be done with only 24 filters.
Anyway, to implement RAVU it is necessary to load a 32 bit texture, which I think is not possible with AviSynth. SSSR seems definitely possible, but it would not fit in this application, and also I'm not very interested.
real.finder
9th April 2021, 13:13
so that mean AviSynthShader need update to support float (32 bit)? maybe with opengl and Vulkan too
Alexkral
10th April 2021, 07:24
Avisynth Shader supports 16 bit half-float for internal processing, which should be enough, but it doesn't support 32 bit float input. The problem would also be to load a floating point image in AviSynth since ImageSource would not work. 16 bit integer is useless because there are negative values.
AviSynth Shader would surely also benefit from an update to DirectX 10 or higher, which would mean Shader Model 4 -> no limit on the number of constant registers per shader -> more filters per convolutional layer -> better models (and also slower :)).
VincAlastor
11th October 2021, 08:15
Really good script! Thanks!
I'm using it for anamorphic SD upscaling. At the end I'm resizing to 1280*720. I would like to use avisynth shader ResizeShader() with SSIM downscaling. But I'll getting a script error when using AiUpscale() and Avisynth shader in the same script. I know AiUpscale is using avisynth shader but is there nevertheless a way to load two instances avisynth shader?
MysteryX
11th October 2021, 20:42
Wow I hadn't seen this one before! Glad AvisynthShader has been of more modern use! I've been wondering for a while how to run more modern upscalers in Avisynth.
To clarify a few things. The output can be in any bitdepth you want. See ExecuteShader's OutputPrecision parameter. However, graphic cards are designed to push data to the graphic card with a large pipeline. The pipeline to get data back is a lot more limited and is a performance bottleneck. Returning in 16-bit instead of 8-bit can cut performance by half (might depend on graphic card too, haven't tested on my new system).
As for using DirectX 10, 11 or 12 instead of DirectX 9... it would be possible (madVR is doing it), but complicated. The approach (shortcut) I'm using in DirectX 9 doesn't work in later versions. It would require more complicated vertex calculation code or whatever that I simply don't understand to mimic the DX9 way.
I think that what's missing in DX10 and above is all the FVF stuff (https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dfvf) to convert this (https://github.com/mysteryx93/AviSynthShader/blob/master/Src/D3D9RenderImpl.cpp#L241). Searching FVF with DX10 or above returns nearly nothing. This thread (https://www.gamedev.net/forums/topic/705895-converting-from-directx-90c-to-directx-11/5422229/) mentions that "FVF Format's are pretty much abandoned" and "What this means in practice is getting rid of fixed pipeline code, moving everything over to shaders and using IDirect3DVertexDeclaration9 instead of FVF codes". I'll leave the interpretation up to you.
I'm not exactly sure why I hadn't supported 32-bit calculation. One problem I had is that supported video buffer formats vary greatly from one video card to the next -- hard to know which formats can be used reliably. Some formats would work on NVidia and not on AMD, and vice-versa. PlanarOut feature, in particular, doesn't work with all graphic cards.
btw software vertex processing is supported right here (https://github.com/mysteryx93/AviSynthShader/blob/master/Src/D3D9RenderImpl.cpp#L67). Glad it's working! (seeing a few surprised faces)
Alexkral
14th October 2021, 08:01
But I'll getting a script error when using AiUpscale() and Avisynth shader in the same script.
I'm not sure if that could be fixed, could you post your script and the errors you are getting?
Wow I hadn't seen this one before! Glad AvisynthShader has been of more modern use! I've been wondering for a while how to run more modern upscalers in Avisynth.
Hi MysteryX, I'm glad you like this!
I have to say that I have zero knowledge of DirectX programming, so I can't help with that. However when I was doing the whole training thing, I also trained a 2x HQ model with 64 filters (the published model has 24), which cannot be used with AviSynth Shader but can be used as an mpv shader. Using it in mpv with my GTX 1080 I was only able to get 12 fps for 4k upscaling, so I'm not sure it could be used with more modern GPUs. The results in terms of metrics were very similar to a full VDSR model, but the most important thing is that perceptually I could barely distinguish any difference between it, and the 24 filter model at a fairly short distance. So I think at least for 2x it would be overkill. For 3x and 4x however, these models usually produce quite noticeable artifacts with only 24 filters, so a 64 filter model would probably be more justified.
VincAlastor
14th October 2021, 11:13
I'm not sure if that could be fixed, could you post your script and the errors you are getting?
Sure, thank you very much to take a look to.
DGSource("", cl = 0, ct = 0, cr = 0, cb = 0, deinterlace=1, use_pf=true)
AiUpscale(Luma="HQ Sharp", Chroma="KrigBilateral")
ResizeShader(Width=1280, Height=720, Kernel="SSIM")
Script Error
Shader: Failed to open pixel shader Shaders\Lanczos3\Lanczos3.cso
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 362)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 366)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 146)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 147)
(C:\Temp\script.avs, line 6)
Alexkral
14th October 2021, 13:04
It works fine here. Try changing line 96 in AiUpscale.avsi to reflect the full path to your Shaders folder, e.g:
Global Path = "C:\Program Files (x86)\AviSynth+\plugins64+\Shaders\"
MysteryX
14th October 2021, 18:11
Is there a problem running 64 filters in a row? The only restriction I'm seeing is to not have more than 10 different source clips. Unless you need more than 10 intermediary clips, like needing to merge the result of 64 different shaders or something.
Btw you'd greatly benefit from running SIMD downscaling in the same chain before returning it from the GPU; otherwise you pull everything and push everything back, killing performance for nothing.
VincAlastor
14th October 2021, 19:07
It works fine here. Try changing line 96 in AiUpscale.avsi to reflect the full path to your Shaders folder, e.g:
Global Path = "C:\Program Files (x86)\AviSynth+\plugins64+\Shaders\"
thats the solution! thank you very much :)
VincAlastor
14th October 2021, 19:25
Is there a problem running 64 filters in a row? The only restriction I'm seeing is to not have more than 10 different source clips. Unless you need more than 10 intermediary clips, like needing to merge the result of 64 different shaders or something.
Btw you'd greatly benefit from running SIMD downscaling in the same chain before returning it from the GPU; otherwise you pull everything and push everything back, killing performance for nothing.
sure, you're totally right. Thank you.
MysteryX
14th October 2021, 19:52
GPU processing isn't a big deal; you can process as much as you want once the video data is there. The bottleneck is data transfer between the CPU and GPU.
Which is where it's beneficial to downscale in 16-bit and then return back from the GPU in 8-bit.
LigH
5th January 2022, 07:02
I tested this upscaler too, on possibly not so easy material: Interlaced, compressed with obvious artifacts in motion even after applying QTGMC. So far, I don't see much difference to the usual approach with NNEDI3_rpow2. I guess it depends much more on the cleaning before upscaling. There seem to be stronger AI models, but only implemented in VapourSynth yet.
Alexkral
5th January 2022, 11:48
I tested this upscaler too, on possibly not so easy material: Interlaced, compressed with obvious artifacts in motion even after applying QTGMC. So far, I don't see much difference to the usual approach with NNEDI3_rpow2. I guess it depends much more on the cleaning before upscaling. There seem to be stronger AI models, but only implemented in VapourSynth yet.
That's normal, the quality of the upscaler is of less importance as the quality of the content worsens. For this type of content you will probably get better results with the FSRCNNX (https://github.com/igv/FSRCNN-TensorFlow/releases/tag/1.1) shaders, or even the FSRCNNX-Enhance (https://github.com/HelpSeeker/FSRCNN-TensorFlow/releases/tag/1.1_distort) shaders. Both have been trained with different levels of increased distortion, and therefore should be able to reduce compression artifacts. You can try both in VS with vs-placebo.
spam_sakura
21st January 2022, 01:25
Hi, need some help.
My script:
Import("W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\AiUpscale.avsi")
Import("W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\Shaders\AviSynthShader-1.6.6\Shader.avsi")
LoadPlugin("W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\Shaders\AviSynthShader-1.6.6\Shader-x64.dll")
DirectShowSource("V:\1.mp4").AiUpscale
spline64resize(2880,2160)
Error
System exception - Access Violation
(W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\AiUpscale.avsi, line 281)
(W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\AiUpscale.avsi, line 285)
(W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\AiUpscale.avsi, line 142)
(W:\TEST StaxRip-x64-2.0.8.0-stable\Apps\Plugins\AiUpscale.avsi, line 147)
(E:\!DownloaD\4k\TEST_4K_PC_4x3.avs, line 4)
(E:\!DownloaD\4k\TEST_4K_PC_4x3_temp\TEST_4K_PC_4x3_source.avs, line 1)
Alexkral
21st January 2022, 05:52
It works fine for me with the latest versions, I don't know where the problem may be.
LigH
21st January 2022, 09:22
I would not trust DirectShowSource to be reliable. For MP4 clips, I would prefer L-SMASH Works with LSMASHVideoSource (or alternatively LwLibavVideoSource if the source container is a little incomplete).
goorawin
21st January 2022, 11:18
You need to include brackets after AiUpscale, like so
DirectShowSource("V:\1.mp4").AiUpscale()
Floatingshed
15th May 2022, 18:36
I'm having trouble getting this to load. I think the problem is with Shader-x64.dll. It and all the other files are in the correct plugins directory.
I am getting the No function named "ConvertToShader" message. If I move Shader-x64.dll out of the plugins folder and load it manually I get:
"Cannot load.... platform returned code 126.... specified module could not be found.
So, it looks like I'm missing a runtime, can anyone please let me know which one? Thanks.
Alexkral
16th May 2022, 03:28
Yes, I think you need the DirectX End-User Runtime:
https://www.microsoft.com/en-gb/download/details.aspx?id=35
Floatingshed
16th May 2022, 07:59
Thanks very much for the info.
I have installed the DirectX components, the dll load error has gone away, but now I get:
System exception - Access Violation
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 281)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 285)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 146)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 147)
Any ideas?
Thanks again.
Alexkral
16th May 2022, 09:31
Try changing line 281 in AiUpscale.avs to this:
ExecuteShader(last, c, Clip1Precision = InPrec, Precision = 3, OutputPrecision = OutPrec, PlanarOut = false)
I don't remember how this worked, but there were some problems on certain GPUs with planar output.
Floatingshed
16th May 2022, 11:59
OK, thanks.
This has fixed the exception,
Now I have:
Error requesting frame 0
ExecuteShader: ProcessFrame failed
Sorry, any more thoughts?
Thanks.
Alexkral
16th May 2022, 12:47
I don't think it will work with your GPU then, it may be too old.
Floatingshed
16th May 2022, 13:20
Oh, that's a pain.
Is there no way to just use cpu?
MysteryX
17th May 2022, 03:21
AvisynthShader can run even on a server without GPU.
DX9 is very old, I'm not sure what GPU wouldn't work. What was an issue were supported video buffer formats that vary between GPUs; hence planar output not working everywhere.
Perhaps that GPU has even more restricted buffer formats. In the case that a GPU is detected but is not supported, I'm not sure I offered a way to disable the GPU and use the CPU only? That could be added.
Floatingshed
17th May 2022, 12:11
I'm not sure I offered a way to disable the GPU and use the CPU only? That could be added.
That would be a very useful test, if it isn't too time consuming for you... Thanks.
MysteryX
18th May 2022, 02:12
I was adding the option of setting Device="cpu", but it doesn't seem to have any effect...
Then saw this from the docs (https://docs.microsoft.com/en-us/windows/win32/direct3d9/d3dcreate).
D3DCREATE_SOFTWARE_VERTEXPROCESSING
[!Note]
Unless hardware vertex processing is not available, the usage of software vertex processing is not recommended in Windows 10, version 1607 (and later versions) because the efficiency of software vertex processing was significantly reduced while improving the security of the implementation.
It looks like the parameter is ignored altogether; because setting Device="gpu" works in a VM with no GPU, and Device="cpu" has high GPU usage on VM with GPU.
btw what GPU do you use?
StainlessS
18th May 2022, 13:44
DX9 is very old
If memory serves correctly, final version of DX9 was June 2010.
MysteryX
18th May 2022, 15:03
yes you need DirectX SDK June 2010 to compile it (and it requires uninstalling Visual Studio Redistributables 2010 or install fails)
simple_simon
24th January 2023, 02:19
I'm trying to test this out but I keep getting this error.
Avisynth script error:
ExecuteShader: Failed to create input textures.
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 281)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 285)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 146)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 147)
kedautinh12
24th January 2023, 02:25
I'm trying to test this out but I keep getting this error.
Avisynth script error:
ExecuteShader: Failed to create input textures.
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 281)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 285)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 146)
(C:/Program Files (x86)/AviSynth+/plugins64+/AiUpscale.avsi, line 147)
Are you copy Shaders folder to same folder with AiUpscale.avsi??
"Copy AiUpscale.avsi and the Shaders folder to the AviSynth+ plugins folder"
simple_simon
24th January 2023, 06:05
Are you copy Shaders folder to same folder with AiUpscale.avsi??
"Copy AiUpscale.avsi and the Shaders folder to the AviSynth+ plugins folder"
Yes I did. I even changed line 96 in the aiupscale.avsi script to the direct path of the Shaders folder, as suggested earlier.
guest
24th January 2023, 07:16
Are you copy Shaders folder to same folder with AiUpscale.avsi??
"Copy AiUpscale.avsi and the Shaders folder to the AviSynth+ plugins folder"
Hi k,
This is a bit old, isn't it ??
Wouldn't Dogway's "deep resize" be better ??
kedautinh12
24th January 2023, 08:01
Hi k,
This is a bit old, isn't it ??
Wouldn't Dogway's "deep resize" be better ??
I don't know cause i don't compare them yet
guest
26th January 2023, 01:02
I don't know cause i don't compare them yet
Hi, I used deep_resize on a 1080p to 4K conversion yesterday, worked pretty well....:sly:
guest
27th January 2023, 13:05
I don't know cause i don't compare them yet
Hi k, just a follow up on my comment about this the other day..
I'm having some random issues, sometimes it works, sometimes it doesn't.
https://forum.doom9.org/showthread.php?p=1981904#post1981904
guest
29th January 2023, 03:08
I don't know cause i don't compare them yet
Hi k, would you be so kind as to share a basic AiUpscale script ;)
poisondeathray
29th January 2023, 05:30
Hi k, would you be so kind as to share a basic AiUpscale script ;)
eg
AiUpscale(luma="HQ Sharp")
OrangeColaJuice
17th February 2023, 00:25
Yes I did. I even changed line 96 in the aiupscale.avsi script to the direct path of the Shaders folder, as suggested earlier.
I had the exact same problem and I've also tried the rename step.
What fixed it was: https://www.microsoft.com/en-us/download/details.aspx?id=35
guest
17th February 2023, 03:43
I had the exact same problem and I've also tried the rename step.
What fixed it was: https://www.microsoft.com/en-us/download/details.aspx?id=35
I'm not having any luck, have tried all the suggestions, get this error :-
https://i.imgur.com/fmwRZi7.jpg
poisondeathray
17th February 2023, 03:56
I'm not having any luck, have tried all the suggestions, get this error :-
https://i.imgur.com/fmwRZi7.jpg
ConvertToShader is from AvisynthShader . The link is listed under the requirements
Just google the error message
kedautinh12
17th February 2023, 04:21
avisynth shader here:
https://github.com/mysteryx93/AviSynthShader/releases
guest
17th February 2023, 04:39
@ kedautinh12 & pdr,
Thanks guys, it's a goer.
#Custom
SetCacheMode(1)
SetMemoryMax(16384)
LoadPlugin("%AVISYNTHPLUGINS%\PD_TOOLS\AviSynthShader\Shader-x64.dll")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\AviSynthShader\Shader.avs")
Import("%AVISYNTHPLUGINS%\PD_TOOLS\AviSynthAiUpscale\AiUpscale.avs")
video=ConvertBits(video,16)
video=AiUpscale(video, luma="HQ Sharp")
Now it's just some time consuming tweaking.
OrangeColaJuice
17th February 2023, 05:25
Is there a way to use only the chroma scaling to output 4:4:4 at the source resolution? I'm interested in KrigBilateral particularly.
poisondeathray
17th February 2023, 05:39
Is there a way to use only the chroma scaling to output 4:4:4 at the source resolution? I'm interested in KrigBilateral particularly.
Use factor=1 to keep Y source resolution
eg.
AiUpscale(factor=1, chroma="HQ Sharp", CResample="HQ Sharp")
Alexkral
17th February 2023, 08:58
For chroma resampling with factor=1 and CResample= any AiUpscale model, the source must be 4:2:0. With a 4:2:2 source you can also use CResample="KrigBilateral".
Chroma resample is done first if CResample is set, and then all planes are upscaled if factor>1
PoeBear
21st February 2023, 08:44
For chroma resampling with factor=1 and CResample= any AiUpscale model, the source must be 4:2:0. With a 4:2:2 source you can also use CResample="KrigBilateral".
Chroma resample is done first if CResample is set, and then all planes are upscaled if factor>1
CResample of any model seems to change the colors slightly for my DVDs, is that correct? If I just use Luma option it looks normal
https://thumbs4.imagebam.com/6e/76/11/MEIXOD3_t.png (https://www.imagebam.com/view/MEIXOD3)
The first picture is without upscaling. I was just trying a basic 720 upscale in the others. Did I do it wrong?
MPEG2Source("DVD.d2v")
TFM()
TDecimate()
propSet("_FieldBased", 0)
z_ConvertFormat(colorspace_op="601=>709")
BalanceBorders(0,0,0,5)
FineDehalo()
AiUpscale(Factor=2, CResample="KrigBilateral", Mode="LineArt")
z_Spline36Resize(1280,720)
Edit: It goes away if I put in a ConvertBits(16) before AiUpscale!
jerrycan
5th October 2023, 17:24
Yes, I think you need the DirectX End-User Runtime:
https://www.microsoft.com/en-gb/download/details.aspx?id=35
Just to explicitly point out the connection, if anybody's getting the 126 error, please install this binary. That should fix it. Between that and the "Global Path" fix others have mentioned, you should be set. You only need the x64 DLL too, so don't worry about the 32-bit DLL that's included.
tormento
8th October 2023, 12:37
For chroma resampling
Is your plugin compatible with libplacebo_Shader of avslibplacebo?
That would make life easier.
Alexkral
9th October 2023, 04:04
No, this uses hlsl shaders via Avisynth Shader. I haven't tried avslibplacebo, but vs-placebo was considerably slower, probably due to the need to both send and receive 16-bit planes.
The added mpv user shaders should be usable on both.
It's great to have all the functionality of libplacebo available though.
jerrycan
11th November 2023, 16:49
I had the exact same problem and I've also tried the rename step.
What fixed it was: https://www.microsoft.com/en-us/download/details.aspx?id=35
Just so everybody knows, this does work but only for online machines. I have an offline machine that I use for certain tasks, including encoding. You can use https://www.microsoft.com/en-us/download/details.aspx?id=8109 instead if you're offline. I don't know if you have to reboot after installing but I did to be safe. No problems after that.
DeafYakuza
7th January 2024, 18:11
I have some problem with StaxRip. See here:
Script Error
Cannot load file 'C:/StaxRip-v2.31.0-x64/Apps/Plugins/AVS/AviSynthShader/Shader-x64.dll'. Platform returned code 126:
The specified module was not found.
(L:\Videobearbeitung\Video_Sample_new.avs, line 3)
Although the file "dll" is on location at StaxRip.
StainlessS
8th January 2024, 13:02
You can use https://www.microsoft.com/en-us/download/details.aspx?id=8109 instead if you're offline.
Just thought that I'de mention that DirectX 9.0C [directx_Jun2010_redist.exe], is more a sort of 'standard' than a version.
There are multiple binary versions of the same thing [that one is versioned v9.29.1974.1, Feb/20/2021].
Some years since I updated my archived version, so I'll down that one assuming is newer than the one I've got somewhere.
DeafYakuza
8th January 2024, 18:18
Error Index LWLibav (v2.32.0)
Index LWLibav returned exit code: -1313558101 (0xB1B4B1AB)
StaxRip.ErrorAbortException: Index LWLibav returned exit code: -1313558101 (0xB1B4B1AB)
bei System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
bei System.Windows.Forms.BindToObject.SetValue(Object value)
bei System.Windows.Forms.Binding.PullData(Boolean reformat, Boolean force)
bei System.Windows.Forms.Binding.Target_PropertyChanged(Object sender, EventArgs e)
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnTextChanged(EventArgs e)
bei System.Windows.Forms.TextBoxBase.OnTextChanged(EventArgs e)
bei StaxRip.UI.TextBoxEx.OnTextChanged(EventArgs e) in D:\Code\Github\staxrip\staxrip\Source\UI\Controls\Controls.vb:Zeile 649.
bei System.Windows.Forms.Control.set_Text(String value)
bei System.Windows.Forms.TextBoxBase.set_Text(String value)
bei System.Windows.Forms.TextBox.set_Text(String value)
bei StaxRip.UI.TextEdit.set_Text(String value) in D:\Code\Github\staxrip\staxrip\Source\UI\Controls\Controls.vb:Zeile 3036.
bei StaxRip.MainForm.OpenVideoSourceFiles(IEnumerable`1 files, Boolean isEncoding) in D:\Code\Github\staxrip\staxrip\Source\Forms\MainForm.vb:Zeile 2203.
Alexkral
11th January 2024, 00:07
All I can say is that I also have frequent problems with Staxrip, with scripts working perfectly just by passing the command line to the encoder via Virtualdub2.
bassquake
12th March 2024, 15:50
Is there a way to avoid the jaggies that occur when upscaling?
This is what I use in AvsPmod. QTGMC deinterlaces to progressive and then AiUpscale to enlarge:
SetFilterMTMode ("QTGMC", 2)
AVISource("video.avi", audio=true) #720x576
AssumeFPS(25)
AssumeBFF()
QTGMC(preset="Slower", EdiThreads=2)
AiUpscale(Factor=2, Luma="HQ Sharp", Chroma="Lanczos", CResample="", Mode="Photo", CPlace="MPEG2", OutDepth=8)
Crop(0,36,0,-36)
Prefetch(5)
Creates the desired 1440x1080 video. See section of image below showing jaggies/staircasing (100% zoomed):
https://i.ibb.co/k0C5x07/jaggies.png
Emulgator
12th March 2024, 16:11
This is in the source, still.
Such sources got to be prefiltered.
I get those vertical strip patterns also with certain maimed sources fed into Topaz VEAI.
I am guessing on careless NTSC <-> PAL normconversions involving certain too-sharp resizing kernels or not caring for interlaced content.
AI uprezzing is not to blame, it only finds something tiny that it thinks is desired detail to be enhanced.
bassquake
12th March 2024, 16:47
This is in the source, still.
Such sources got to be prefiltered.
I get those vertical strip patterns also with certain maimed sources fed into Topaz VEAI.
I am guessing on careless NTSC <-> PAL normconversions involving certain too-sharp resizing kernels or not caring for interlaced content.
AI uprezzing is not to blame, it only finds something tiny that it thinks is desired detail to be enhanced.
Ok. I guess I'll remove AiUpscale and stick with standard BilinearResize then, it looks far better (attached screenshot).
The source is original PAL dv video. There's no NTSC conversion involved. The resizing is applied after the deinterlacing.
https://i.ibb.co/27j6B00/jaggies-biliear.png
Emulgator
13th March 2024, 02:36
I would suggest to give QTGMCp a try.
Thanks to Dogways permanent improvement work it kicks the previous versions out of the water for me.
I am on version 4.5 now, with the recent uprezzers the occasional smearing is gone,
lots of detail to be harvested even from poor VHS sources, plus convincing grain/noise, if you like it.
Need lots of dependencies, you may want to follow the thread
https://forum.doom9.org/showthread.php?t=182881
Something along the lines of
LWLibavVideoSource(...format="YUV444P16")
Assumefps(25.000).AssumeBFF()
propSet("_FieldBased",1)
QTGMCp(InputType=0, EdiMode="BWDIF" or "SuperResXBR", tr2=3, Rep1=2, RepChroma=true, ChromaMotion=false, DenoiseMC=true, sharpness=2.0, lossless=0, GrainRestore=0.0, NoiseRestore=0.5, ChromaNoise=true, show=false)
... ...may do.
I have no access to your source, so play with the settings.
A sample uploaded to wetransfer maybe?
anta777
15th March 2024, 18:28
Why does not it work your glsl in mpv?
8600 GS
600x300 video up 1200x600
LigH
15th March 2024, 18:31
Might be that it requires a specific minimum API/Shader version?
anta777
17th March 2024, 15:04
Today AiUpscale working.
What difference Chroma and CResample in AiUpscale ?
Chroma - when the image size changes?
CResample - when the image size does not change?
anta777
17th March 2024, 18:49
I want to use my version for chroma upscale with mpv shader. Is this possible?
Alexkral
18th March 2024, 09:03
The AiUpscale mpv shaders are for luma upscaling.
anta777
18th March 2024, 10:03
Thank you very much!
bassquake
18th March 2024, 17:03
I would suggest to give QTGMCp a try.
Thanks to Dogways permanent improvement work it kicks the previous versions out of the water for me.
I am on version 4.5 now, with the recent uprezzers the occasional smearing is gone,
lots of detail to be harvested even from poor VHS sources, plus convincing grain/noise, if you like it.
Need lots of dependencies, you may want to follow the thread
https://forum.doom9.org/showthread.php?t=182881
Something along the lines of
LWLibavVideoSource(...format="YUV444P16")
Assumefps(25.000).AssumeBFF()
propSet("_FieldBased",1)
QTGMCp(InputType=0, EdiMode="BWDIF" or "SuperResXBR", tr2=3, Rep1=2, RepChroma=true, ChromaMotion=false, DenoiseMC=true, sharpness=2.0, lossless=0, GrainRestore=0.0, NoiseRestore=0.5, ChromaNoise=true, show=false)
... ...may do.
I have no access to your source, so play with the settings.
A sample uploaded to wetransfer maybe?
I had a go with QTGMCp as suggested but it didn't seem any better. Ill stick with Bilinear and standard QTGMC. Thanks anyway.
TCmullet
7th May 2024, 12:32
I've been using SuperRes for ages. But upon figuring maybe there's something better now, I discovered this (AiUpscale 1.2.0) and am dying to see it in action for a big SD to HD project I'm tackling. I have A+ 3.7.3. I have 4 plugins folders. (plugins, plugins+, plugins64, plugins64+). I have 64-bit Windows 10, but 32-bit VirtualDub 1.10.4.
I generally put filters in "plugins". But I get this error:
Avisynth open failure:
Script error: syntax error
(AiUpscale.avsi, line 102, column 16)
If I move AiUpscale.avsi and Shaders folder to any of the other 3 plugins folder, it says aiupscale is not found.
I'm also bothered by the fact that "version.avs" script shows "Avisynth 2.60, build:Feb 20 2015" instead of "Avisynth+".
I'd appreciate any help on getting AiUpscale to run without fatal errors.
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).
To avoid version trouble, check that no other copies of avisynth.dll exist in any directory of tools you execute, in your case not in the same directory as VirtualDub. The only copies should be in Windows' system32 and SysWOW64. AVSMeter can help testing the presence and conflicts of Avisynth and plugins.
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]
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>
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".
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.
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?
.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".
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.
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.
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.
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.
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.
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.
> 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.
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.
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.
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!
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!
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.
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
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.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.