Log in

View Full Version : AviSynthShader + SuperRes


Pages : 1 2 3 4 5 [6] 7 8 9 10 11 12 13

MysteryX
15th January 2016, 22:55
Do you have an x64 version by any chance ?
No I haven't done a x64 version yet. I guess it shouldn't be difficult, but I haven't got into looking at how to do a x64 compilation with C++.

MysteryX
16th January 2016, 06:52
Oh, I just found a use for SuperRes's Softness parameter! I got a video where Super-xBR causes too much ringing, yet it still looks slightly better than with NNEDI3. In which case, it's useful to use SuperRes with greater strength to neutralize the ringing (2 passes of Strength=1), and Softness allows for that. Still not perfect, but it looks good

jinkazuya
16th January 2016, 08:22
Is it possible for somebody to enlighten me on how to install this plugin? It would be great cuz it is nice to enhance some of the videos in high quality. Thanks.

jpsdr
16th January 2016, 11:21
I've tried to build the project, so i've clone github, try to build, but there was an error saying that "d3d9x.h" can't be found.
I've seen DirectX SDK was needed, so i get it, install it, try to build again, still the same error... What am i missing ?

MysteryX
16th January 2016, 20:22
I've tried to build the project, so i've clone github, try to build, but there was an error saying that "d3d9x.h" can't be found.
I've seen DirectX SDK was needed, so i get it, install it, try to build again, still the same error... What am i missing ?
You need DirectX (June 2010) SDK
https://www.microsoft.com/en-ca/download/details.aspx?id=6812

Btw you must uninstall VC++ 2010 Redistributables before installing it, otherwise setup will fail.


Install AviSynthShader just like any other filter. Either copy the files into your Plugins folder, or into any folder and load the DLL and AVSI files. The CSO files must be in the same folder as the DLL.

Peronally, I created a sub-folder called Shaders containing the DLL, AVSI and all CSO files, and import the DLL and AVSI manually.

jpsdr
17th January 2016, 09:56
You need DirectX (June 2010) SDK
https://www.microsoft.com/en-ca/download/details.aspx?id=6812

As i've said, i've installed it.


Btw you must uninstall VC++ 2010 Redistributables before installing it, otherwise setup will fail.

Yes... I've learned it the hard way...:sly:

But there is still the result when i try to build :

1>------ Début de la génération*: Projet*: Shader, Configuration*: Release Win32 ------
1> ConvertFromShader.cpp
1>f:\prg\x264\avisynthshader\src\ConvertFromShader.h(7): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
1> ConvertToShader.cpp
1>f:\prg\x264\avisynthshader\src\ConvertToShader.h(7): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
1> ExecuteShader.cpp
1>f:\prg\x264\avisynthshader\src\ExecuteShader.h(4): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
1> Init.cpp
1>f:\prg\x264\avisynthshader\src\ConvertToShader.h(7): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
1> Shader.cpp
1>f:\prg\x264\avisynthshader\src\Shader.h(4): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
1> D3D9RenderImpl.cpp
1>f:\prg\x264\avisynthshader\src\D3D9Macros.h(2): fatal error C1083: Impossible d'ouvrir le fichier include*: 'd3dx9.h'*: No such file or directory
========== Génération*: 0 a réussi, 1 a échoué, 0 mis à jour, 0 a été ignoré ==========


I have no issue installing the filter and using it, it's just i've try to build it (VS2015 Update 1), and still failled.

MysteryX
18th January 2016, 03:23
Do you have a 32-bit or 64-bit system? In project properties, these are configured under Linker|Input|Additional Dependencies.

Perhaps you need to update the paths under VC++ Directories.

aegisofrime
18th January 2016, 06:14
Hi MysteryX. I have read the documentation a few times but I'm still confused. If I'm reading it right, if I call SuperResXBR I do not need to call SuperRes, correct? The wording seems to imply that calling SuperResXBR will also call SuperRes and Super-XBR without any need for me to call them...

loneboyz
18th January 2016, 09:56
The way I see, it is considered that the combination of SuperRes with Super-XBR. Instead of calling both SuperRes and Super-XBR, then you'll only call SuperResXBR. The results is the same.

jpsdr
18th January 2016, 11:23
Do you have a 32-bit or 64-bit system? In project properties, these are configured under Linker|Input|Additional Dependencies.

Perhaps you need to update the paths under VC++ Directories.

I have a 32-bit system. Never thought this could affect the build process, i thought that path for SDK were added automaticaly on VS product when installed.

Ok, thanks for the information nevertheless, i'll check this evening when back home.

aegisofrime
18th January 2016, 13:01
The way I see, it is considered that the combination of SuperRes with Super-XBR. Instead of calling both SuperRes and Super-XBR, then you'll only call SuperResXBR. The results is the same.

The thing that confused me is that SuperResXBR does not have a Upscaler parameter. That is pretty much a required parameter that you must pass to SuperRes. The absence of this parameter in SuperResXBR caused me to have doubts.

CkJ
18th January 2016, 13:34
The thing that confused me is that SuperResXBR does not have a Upscaler parameter. That is pretty much a required parameter that you must pass to SuperRes. The absence of this parameter in SuperResXBR caused me to have doubts.

You mean the scale factor? I think it's 2x because 3 and 7 have the same size.
3. nnedi3_rpow2(4, nns=4, cshift="Spline16Resize")
7. SuperResXBR(1, .7, xbrEdgeStrength=.1, xbrSharpness=.7), twice

Hyllian
18th January 2016, 14:44
During my development and tests, I think the best values for super-xbr params (xbrEdgeStrength, xbrSharpness) are in these ranges:

xbrEdgeStrength between 1.0 and 2.0 (1.5 is the best for the clown image).
xbrSharpness between 0.3 and 1.0 (above 1.0 inctroduce some strange artifacts and intensify the ringing too much).

MysteryX
18th January 2016, 17:12
I have a 32-bit system. Never thought this could affect the build process, i thought that path for SDK were added automaticaly on VS product when installed.
It changes the path from "Program Files" to "Program Files (x86)" to find the DirectX SDK files.

The thing that confused me is that SuperResXBR does not have a Upscaler parameter. That is pretty much a required parameter that you must pass to SuperRes. The absence of this parameter in SuperResXBR caused me to have doubts.
That's because the upscaler is hard-coded as SuperRes-xBR. Instead of passing an upscaler string, you pass Super-xBR's parameters. It gives almost the same result as calling them separately, except that performance is higher due to reduced memory transfers, and quality is slightly better due to processing the whole thing in 16-bit without any rounding.

During my development and tests, I think the best values for super-xbr params (xbrEdgeStrength, xbrSharpness) are in these ranges:

xbrEdgeStrength between 1.0 and 2.0 (1.5 is the best for the clown image).
xbrSharpness between 0.3 and 1.0 (above 1.0 inctroduce some strange artifacts and intensify the ringing too much).
That's for Super-xBR on its own. When adding SuperRes, it greatly reduces ringing and it changes the game.

MysteryX
18th January 2016, 18:42
I added support for 64-bit but haven't tested it. You guys can play with it and let me know if there is any problem.
https://github.com/mysteryx93/AviSynthShader/blob/master/Release/Shader-x64.dll

I was wondering how to download a specific file from GitHub... found it... just press the "Raw" button.

jpsdr
18th January 2016, 20:51
Changing the VC++ directory solved issue, thanks.

luquinhas0021
20th January 2016, 22:45
I am trying use AviSynth Shader 1.3.5, with this following script line

SuperXBR(MatrixIn="Rec601", EdgeStrength=1.5, Sharpness=0.9, MatrixOut="Rec709")

When I go open the .avs file in MPC-BE 1.4.5, the player shows: "SuperXBR doesn't have a function name called "EdgeStrength". What can I do to solve this?

MysteryX
20th January 2016, 22:52
I changed the parameter names but didn't update the documentation on this page. Look at parameters information on the GitHub page (https://github.com/mysteryx93/AviSynthShader), or within the AVSI file.

bxyhxyh
19th February 2016, 05:49
Please tell me how 2 pass is better than 1 pass.
I'm not saying 1 pass is enough or something.

I'm asking what really pass settings do.

MysteryX
19th February 2016, 11:49
Honestly, 2 passes with Str=.45 is almost the same as 1 pass with Str=.9, with very slight quality improvement based on the source.

If you want more Strength (sharpness) than 1, then 2 passes will allow you to increase the strength further.

2 passes with Str=.6 appears to be identical to 3 passes with Str=.6

Oh, and if you use the Softness parameter, it will only have an effect if you use 2 passes.

bxyhxyh
20th February 2016, 05:28
Ok. Can you make it support Y8?
If i need to use it only on luma that would speed up things.

MysteryX
20th February 2016, 07:01
No, HLSL shaders work on RGB data. Any other data format first needs to be converted into 16-bit RGB. Plus, the necessary colorspace conversions (Gamma to Linear RGB) wouldn't be possible with Y8 data.

luigizaninoni
4th March 2016, 20:47
I added support for 64-bit but haven't tested it. You guys can play with it and let me know if there is any problem.
https://github.com/mysteryx93/AviSynthShader/blob/master/Release/Shader-x64.dll.

SuperRes works fine with Avisynth+ 64-bit

MysteryX
6th March 2016, 13:49
SuperRes works fine with Avisynth+ 64-bit
Good to know! Still haven't tested it :)

burfadel
7th March 2016, 05:53
Good to know! Still haven't tested it :)

Works fine here too :). Is it generically compiled or optimised?

I notice that SuperRes has recently been updated in the recent MPDN extensions (potentially better quality and faster), any chance of this plugin being updated with the changes?

MysteryX
7th March 2016, 15:57
Oh, you're right. The new version will give performance improvement. Super-xBR was also updated. I also want to integrate SSimDownscaler.

Not sure when I'll have time to do that. If someone else wants to do the update, I'll integrate the changes.

It is generically compiled. Since the bottleneck is the memory transfers from the GPU back to the CPU, I doubt you'll get much improvement from compile optimizations.

MysteryX
2nd May 2016, 09:41
v1.3.6 released! (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1.3.6)

What's new:
- Includes the x64 DLL
- Updated SuperRes and Super-xBR to the latest version
- SuperRes is now over 50% faster by using custom downscaler!

Todo: Implement SSimDownscaler

MysteryX
5th May 2016, 11:10
v1.3.7 released! (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1.3.7)

What's new:
- Fixed SuperRes as the last upgrade was broken
- SuperRes 20-50% faster than previously
- SuperRes now produces a softer result but with much less ringing and its setting can be increased for extra sharpness

Here is a benchmark comparison


SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)
AviSource("Preview.avi", audio=false, pixel_type="YV12") #288p video
SuperResXBR(2, 0.6, 0, XbrStr=2, XbrSharp=1.2, MatrixIn="601")
SuperResXBR(2, 0.6, 0, XbrStr=2, XbrSharp=1.2)
Prefetch(8)


SuperRes v1.3.5

Frames processed: 518 (0 - 517)
FPS (min | max | average): 0.485 | 1000000 | 11.23
Memory usage (phys | virt): 557 | 869 MB
Thread count: 143
CPU usage (average): 8%


SuperRes v1.3.7

Frames processed: 523 (0 - 522)
FPS (min | max | average): 0.444 | 1000000 | 16.03
Memory usage (phys | virt): 610 | 990 MB
Thread count: 162
CPU usage (average): 12%


Note: Super-xBR+SuperRes is working with AviSynth+ MT, but NNEDI3+SuperRes won't work with the latest AviSynth+ MT build because the image gets shifted to the left. AVS 2.6 is still the most reliable for this.

luigizaninoni
5th May 2016, 13:56
MysteryX, could you make a Vapoursynth version of you excellent plugin ? MT works much better in VS than in Avisynth

MysteryX
5th May 2016, 16:09
MysteryX, could you make a Vapoursynth version of you excellent plugin ? MT works much better in VS than in Avisynth

It would require a lot of work from my part and I personally have no need for VapourSynth; neither do I know anything about VapourSynth.

Not only the DLL code-base would have to be adapted, the whole AVSI script file would also have to be rewritten.

I don't know how easy or hard it is to adapt the DLL, but I don't think it will happen anytime soon unless someone else decides to implement it.

I will however work on implementing SSimDownscaler.

On a side note, I wouldn't expect much performance difference between VapourSynth and AviSynth as the bottleneck is memory transfers from the GPU to the CPU which will remain the same either way.

luigizaninoni
6th May 2016, 06:03
On a side note, I wouldn't expect much performance difference between VapourSynth and AviSynth as the bottleneck is memory transfers from the GPU to the CPU which will remain the same either way.

Ah, so that's the reason I'm seeing lowish GPU and CPU % usage. Ok, so porting to VS would be practically useless from this point of view

MysteryX
6th May 2016, 06:15
Ah, so that's the reason I'm seeing lowish GPU and CPU % usage. Ok, so porting to VS would be practically useless from this point of view
Correct.

I do, however, make great savings in memory transfers by executing all the shaders at the same time before returning them from the GPU.

madVR can make much better use of the GPU because it doesn't need to trasfer back from the GPU; it only displays forward.

MysteryX
8th May 2016, 08:54
Here are some image comparison with the latest version.

1. nnedi3_rpow2(4, nns=4, cshift="Spline16Resize")
2. SuperResXBR(2, 0.6, XbrStr=2, XbrSharp=1), old version, twice
3. SuperResXBR(2, 0.6, XbrStr=2, XbrSharp=1), new version, twice
4. SuperResXBR(2, 1, XbrStr=2.2, XbrSharp=1.4), new version, twice


http://s20.postimg.org/5yts02f6h/Clown_NNEDI3.jpg (http://postimg.org/image/5yts02f6h/) http://s20.postimg.org/6uu9t4vyx/Clown_Update_Old.png (http://postimg.org/image/6uu9t4vyx/) http://s20.postimg.org/76bq5wcex/Clown_Update_New.png (http://postimg.org/image/76bq5wcex/) http://s20.postimg.org/8b5sb9yvt/Clown_Update_Sharp.png (http://postimg.org/image/8b5sb9yvt/)

http://s20.postimg.org/qzamti3x5/Lighthouse_NNEDI3.jpg (http://postimg.org/image/qzamti3x5/) http://s20.postimg.org/5ickr8yjd/Lighthouse_Update_Old.png (http://postimg.org/image/5ickr8yjd/) http://s20.postimg.org/fgxjdq7yx/Lighthouse_Update_New.png (http://postimg.org/image/fgxjdq7yx/) http://s20.postimg.org/awbcyso9l/Lighthouse_Update_Sharp.png (http://postimg.org/image/awbcyso9l/)

MysteryX
16th May 2016, 14:06
SSimDownscaler is almost ready BUT there is a weird bug where the border pixel gets random noise which I haven't figured out yet.

However, here's a real-life comparison of before and after.

Before: Super-XBR(Str=20, Sharp=12) + SuperRes(2 passes of Str=.6), twice, with Bicubic downscaling(B=0, C=.75)
http://s20.postimg.org/lmjd9r1zt/SSim_Before.png (http://postimg.org/image/lmjd9r1zt/)

After: Super-XBR(Str=30, Sharp=15) + SuperRes(2 passes of Str=1), twice, with SSimDownscaler(Str=1)
http://s20.postimg.org/m0kp9cm3d/SSim_After.png (http://postimg.org/image/m0kp9cm3d/)

The new image is definitely softer and requires higher settings; pretty much max settings to get similar sharpness. The artifacts and halos, however, are much weaker than in the previous image.

With softer artifacts, I suspect that the MP4 compressibility will be higher and there will be additional gain there.

MysteryX
17th May 2016, 08:52
Version 1.4 is ready! (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1.4)

What's new:
- Tweaked DLL for better MT support (thanks to Pinterf)
- ConvertToShader, ConvertFromShader and Shader now support MT=1. ExecuteShader supports MT=2.
- Added SSimDownscaler for high-quality downscaling
- SuperResXBR now uses SSimDownscaler instead of Bicubic for final resize
- Added fWidth, fHeight, fStr and fSoft to SuperRes, SuperXBR and SuperResXBR
- Fixed a bug in the DLL where it wouldn't search the DLL's folder to find non-compiled HLSL shaders with relative path.
- Fixed a bug where CLAMP for out-of-bound pixels was only applied to the first clip.

MysteryX
17th May 2016, 13:48
Here's an image comparison of SSimDownscaler

I'm downscaling by 1.3 and then multiplying by 3 with Spline16

1. Bicubic
2. Bicubic(0, .75)
3. SSim(.5)
4. SSim(.5, Soft)
5. SSim(1)
6. SSim(1, Soft)

http://s20.postimg.org/mse6h2bix/Clown_Down_Bicubic.png (http://postimg.org/image/mse6h2bix/) http://s20.postimg.org/yis3yg4bd/Clown_Down_Bicubic75.png (http://postimg.org/image/yis3yg4bd/) http://s20.postimg.org/cywz499eh/Clown_Down_SSim5.png (http://postimg.org/image/cywz499eh/) http://s20.postimg.org/hwajpdbdl/Clown_Down_SSim5_Soft.png (http://postimg.org/image/hwajpdbdl/) http://s20.postimg.org/k8ijmynyx/Clown_Down_SSim1.png (http://postimg.org/image/k8ijmynyx/) http://s20.postimg.org/5qlceywnt/Clown_Down_SSim1_Soft.png (http://postimg.org/image/5qlceywnt/)

http://s20.postimg.org/hslbmuva1/Lighthouse_Down_Bicubic.png (http://postimg.org/image/hslbmuva1/) http://s20.postimg.org/4ppp3l521/Lighthouse_Down_Bicubic75.png (http://postimg.org/image/4ppp3l521/) http://s20.postimg.org/jvvquiv2x/Lighthouse_Down_SSim1.png (http://postimg.org/image/jvvquiv2x/) http://s20.postimg.org/s6hk2cqmx/Lighthouse_Down_SSim1_Soft.png (http://postimg.org/image/s6hk2cqmx/) http://s20.postimg.org/eoanq2ehl/Lighthouse_Down_SSim5.png (http://postimg.org/image/eoanq2ehl/) http://s20.postimg.org/9ffms6w2h/Lighthouse_Down_SSim5_Soft.png (http://postimg.org/image/9ffms6w2h/)

Which would you say is best?

I have to admit that SSim fails with the Lighthouse... Bicubic(0,.75) looks best.

The following are simply divided by 1.3

http://s20.postimg.org/slstvdck9/Eclipse_Down_Bicubic.png (http://postimg.org/image/slstvdck9/) http://s20.postimg.org/y11jwc449/Eclipse_Down_Bicubic75.png (http://postimg.org/image/y11jwc449/) http://s20.postimg.org/f65t5x42h/Eclipse_Down_SSim1.png (http://postimg.org/image/f65t5x42h/) http://s20.postimg.org/p4qrsedi1/Eclipse_Down_SSim1_Soft.png (http://postimg.org/image/p4qrsedi1/) http://s20.postimg.org/n1gurn74p/Eclipse_Down_SSim5.png (http://postimg.org/image/n1gurn74p/) http://s20.postimg.org/lnp7wc7vd/Eclipse_Down_SSim5_Soft.png (http://postimg.org/image/lnp7wc7vd/)

MysteryX
17th May 2016, 14:09
Here's more

http://s20.postimg.org/7avry0nvd/Orig_Down_Bicubic.png (http://postimg.org/image/7avry0nvd/) http://s20.postimg.org/en183k63d/Orig_Down_Bicubic75.png (http://postimg.org/image/en183k63d/) http://s20.postimg.org/sffmz6wux/Orig_Down_SSim1.png (http://postimg.org/image/sffmz6wux/) http://s20.postimg.org/904v633kp/Orig_Down_SSim1_Soft.png (http://postimg.org/image/904v633kp/) http://s20.postimg.org/omw4jghcp/Orig_Down_SSim5.png (http://postimg.org/image/omw4jghcp/) http://s20.postimg.org/3sjs1mmzd/Orig_Down_SSim5_Soft.png (http://postimg.org/image/3sjs1mmzd/)

Honestly the difference in this one is minimal.

luquinhas0021
18th May 2016, 05:34
It's clear for me that SSIM maintain more detail and it's sharper than Bicubic. Great choice, Mystery!
SuperRES upscaling with nnedi3 with those optimal configurations I told you, with SSIM downscaler, beats SuperResXBR, non-soft, with SSIM downscaler? both in sharpness and detail retention.
I'm a little curious about SuperRES with Spline 144 upscaler and SSIM downscaler

MysteryX
18th May 2016, 07:48
Version 1.4.1 is ready (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1.4.1)

What's new:
- Bug fix: SuperRes and SuperResXBR were performing downscaling in YUV format which caused quality loss
- Bug fix: MatrixOut parameter was ignored
- Both SSim and Bicubic can now be used for downscaling
- SuperRes, SuperXBR and SuperResXBR now have these parameters: fDownscaler, fWidth, fHeight, fStr, fSoft, fB, fC
- SSimDownscaler now has these parameters: Downscaler, Width, Height, Str, Soft, B, C
- SSimDownscaler: changed parameter W to Width, H to Height

MysteryX
18th May 2016, 10:09
Here are some image comparison with the new version.


1. NNEDI3+Bicubic
edi_rpow2(4, nns=4, cshift="BicubicResize", a1=0, a2=.75, fwidth=int(width*3.2)/2*2, fheight=int(height*3.2)/2*2)

2. SuperRes+Sinc
U="""ResizeX(int(Width*3.2)/2*2, int(Height*3.2)/2*2, kernel="Sinc")"""
SuperRes(2, Str=1, Soft=.15, Upscale=U)

3. SuperRes+NNEDI3+Bicubic
SuperRes(2, Str=1, Soft=.15, Upscale="""edi_rpow2(2, nns=4, cshift="Spline16Resize")""")
U="""edi_rpow2(2, nns=4, cshift="BicubicResize", a1=0, a2=.75, fwidth=int(width*1.6)/2*2, fheight=int(height*1.6)/2*2)"""
SuperRes(2, Str=1, Soft=.15, Upscale=U)

4. SuperRes+NNEDI3+SSim
U="""edi_rpow2(2, nns=4, cshift="Spline16Resize")"""
SuperRes(2, Str=1, Soft=.15, Upscale=U)
SuperRes(2, Str=1, Soft=.15, Upscale=U, fWidth=int(Width*1.6)/2*2, fHeight=int(Height*1.6)/2*2, fStr=1)

5. SuperRes+SuperXBR+SSim
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.2, XbrSharp=1.3)
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.2, XbrSharp=1.3, fWidth=int(Width*1.6)/2*2, fHeight=int(Height*1.6)/2*2, fStr=1)


http://s20.postimg.org/b6vbos4pl/Clown_Down_Nnedi_Bicubic.png (http://postimg.org/image/b6vbos4pl/) http://s20.postimg.org/f72h10v6h/Clown_Down_Super_Res_Sinc.png (http://postimg.org/image/f72h10v6h/) http://s20.postimg.org/tc8a2u47t/Clown_Down_Super_Res_Nnedi_Bicubic.png (http://postimg.org/image/tc8a2u47t/) http://s20.postimg.org/uv89lk061/Clown_Down_Super_Res_Nnedi_Ssim.jpg (http://postimg.org/image/uv89lk061/) http://s20.postimg.org/lysw3vk61/Clown_Down_Super_Res_Xbr_Ssim.jpg (http://postimg.org/image/lysw3vk61/)

http://s20.postimg.org/qpxczn2e1/Lighthouse_Down_Nnedi_Bicubic.png (http://postimg.org/image/qpxczn2e1/) http://s20.postimg.org/c9a3l2cwp/Lighthouse_Down_Super_Res_Sinc.png (http://postimg.org/image/c9a3l2cwp/) http://s20.postimg.org/5dpv1yift/Lighthouse_Down_Super_Res_Nnedi_Bicubic.png (http://postimg.org/image/5dpv1yift/) http://s20.postimg.org/asyl2x9zt/Lighthouse_Down_Super_Res_Nnedi_Ssim.png (http://postimg.org/image/asyl2x9zt/) http://s20.postimg.org/qonf680k9/Lighthouse_Down_Super_Res_Xbr_Ssim.png (http://postimg.org/image/qonf680k9/)

I cannot test Spline144 because ResizeX is required for pixel shift correction and it doesn't support Spline144.

luquinhas0021
18th May 2016, 19:41
It's clear SuperRES + SuperXBR + SSIM is better!!!
Your plugin is compatible with Vapoursynth R32?

MysteryX
19th May 2016, 17:16
Oups, I was processing SSim AFTER SuperRes instead of BEFORE! I fixed it to downscale first which increases both performance and quality.

Version 1.4.2 (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1.4.2)

What's new:
- SuperRes and SuperResXBR: Final downscaling is now done before processing SuperRes which increases both quality and performance
- Shader: If not specified Param0 is now set to Width,Height and Param1 is set is 1/Width,1/Height
- SSimDownsdaler: Soft default value changed from .5 to 1

No it doesn't support VapourSynth.

luquinhas0021
19th May 2016, 20:48
Why no more 0.5 for soft?
Advice: turn back to 0.5!!!

As you use to do, can you post results with new version (I suggest only SuperRES + SuperRESXBR, because it's better from far), with soft = 0.5 and soft = 1?
I will provide the ways like I test your plugin, if possible, today (In Brazil, is 16:50 hours). I promise you.
You think is good use, in SuperRES + SuperRESXBR, Soft = 0 and Str = 2 or 3?

MysteryX
20th May 2016, 04:02
I was using SSim with Strength=1 because the image was still too soft even with SuperRes at max and SuperXBR with the new algorithm... but that's because I was applying SSim AFTER applying SuperRes instead of before. Now the result is sharper so I'll have to test again to see how SSim's strength and SuperRes interact with each other, and how it compares to Bicubic.

MysteryX
20th May 2016, 05:16
Here are some updated images.


1. SuperRes+SSim+NNEDI3
U="""edi_rpow2(2, nns=4, cshift="Spline16Resize")"""
SuperRes(2, Str=1, Soft=.15, Upscale=U)
SuperRes(2, Str=1, Soft=.15, Upscale=U, fWidth=int(Width*1.6)/2*2, fHeight=int(Height*1.6)/2*2, fStr=.6)

2. SuperRes+SSim+SuperXBR
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.3, XbrSharp=1.3)
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.3, XbrSharp=1.3, fWidth=int(Width*1.6)/2*2, fHeight=int(Height*1.6)/2*2, fStr=.6)

3. SuperRes+Bicubic+SuperXBR
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.3, XbrSharp=1.3)
SuperResXBR(2, Str=1, Soft=.15, XbrStr=2.3, XbrSharp=1.3, fWidth=int(Width*1.6)/2*2, fHeight=int(Height*1.6)/2*2, fDownscaler="Bicubic")


http://s20.postimg.org/ok3ioifvd/Clown_Down_Superres_Ssim_Nnedi.png (http://postimg.org/image/ok3ioifvd/) http://s20.postimg.org/jwxgmqsih/Clown_Down_Superres_Ssim_Xbr.png (http://postimg.org/image/jwxgmqsih/) http://s20.postimg.org/e3rzzx68p/Clown_Down_Super_Res_Bicubic_Xbr.jpg (http://postimg.org/image/e3rzzx68p/)

http://s20.postimg.org/mgt3gug2h/Lighthouse_Down_Superres_Ssim_Nnedi.png (http://postimg.org/image/mgt3gug2h/) http://s20.postimg.org/9dxgxkpuh/Lighthouse_Down_Superres_Ssim_Xbr.png (http://postimg.org/image/9dxgxkpuh/) http://s20.postimg.org/gwl7jy6l5/Lighthouse_Down_Super_Res_Bicubic_Xbr.jpg (http://postimg.org/image/gwl7jy6l5/)

Fixed 2 details, will release another version after the image tests.

According to my tests, downscaling with SSim(Str=.5 or Bicubic(B=0,C=.75) gives almost identical results. Perhaps SSim just very slightly preserves more details. The main advantage of SSim in this case is that you can fine-tune it.

MysteryX
20th May 2016, 06:57
Version 1.4.3 is ready! (https://github.com/mysteryx93/AviSynthShader/releases/tag/v1%2C4%2C3)

What's new:
- Fixed a bug introduced in SuperRes
- SuperResXBR now performs downscaling in Linear Light
- SSimDownscaler now performs downscaling in Linear Light
- SSimDownsdaler: Str default value changed back to .5

MysteryX
20th May 2016, 15:14
After doing some testing on real video footage... Bicubic(0,.75) actually gives a better result than SSim(.8), and it is also faster. The result is very similar but the edges are sharper.

I also did an encoding test with the same script and same settings except that one used SSim downscaling before SuperRes and the other used Bicubic. I used x265 encoding with fixed quality 22.
- SSim(.8): 89.1mb
- Bicubic(0,.75): 89.6mb

This indicates that there are more details to encode.

I'm getting pretty decent performance with this new version of SuperRes and with Bicubic.

I've added images above with Bicubic to compare.

luquinhas0021
21st May 2016, 01:34
MysteryX, is there some error in script above?

SuperResXBR(Passes=3, Str=1, Soft=0, XbrStr=4, XbrSharp=1.5, fDownscaler="SSim", fStr=1, fSoft=false, fB=0, fC=1)

I wrote it, and it was executed; after, I tried run it again, but... Didn't run. I guarantee you I didn't change the parameters. I ran it in a Windows computer, with LAV Filters 0.68.1 and MPC-BE 1.4.5, last update.

Your plugin don't recognize XbrStr=5, although you write in readme it does.
I put this same below script with a video, but didn't run.

Maybe the problem is the Avisynth 2.6.0 itself. I installed it again, but I didn't enough time to test.

MysteryX
21st May 2016, 07:51
what error do you get? Btw there is no need to specify fB and fC when using SSim

MysteryX
21st May 2016, 15:36
Ah! Interesting.

With 3 passes of SuperRes, there is barely any visible difference at first. BUT! It makes the video more encoder-friendly. The same video with 2 passes encodes at 95.9MB and with 3 passes at 94.7MB (with x265 fixed quality) and the encoded video is also clearer. After encoding, the small performance difference between 2 and 3 passes is worth it.

Edit: With 4 or 5 passes, there is a further reduction of the encoded file size. However, there is also a reduction of details after encoding. Thus, 3 passes appear to be what's working best according to my tests.