Log in

View Full Version : Avisynth AiUpscale v1.2.0


Pages : 1 2 [3] 4

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.

LigH
7th May 2024, 13:20
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.