Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th October 2017, 18:14   #521  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Just rounding errors. Alternatively, you can also use DitherTools to do 16-bit conversion with Stack16 format.
MysteryX is offline   Reply With Quote
Old 19th October 2017, 16:29   #522  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 136
SOLVED. When using AVISynth+ instead of AVISynth2.6 there is no error on loading SuperRes or SuperResXBR. Using the flag matrixin="Rec601" for this DVD source results in perfect colors that match the source and no clipping at the extremes. Thanks again for the assist.
SaurusX is offline   Reply With Quote
Old 5th November 2017, 21:39   #523  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
I can't get 10-bit input to work correctly even with AVS+.
Code:
LWLibavVideoSource("file.ts", format="YUV420P10")

ResizeShader(width=1920, height=1080, kernel="SSim")
8-bit works fine though. All I get for 10-bit is this:
https://imgur.com/a/v82jg
It's not even the right resolution, its 960x1080.

ps. have you thought about adding support for bt.2020?

Last edited by Gser; 5th November 2017 at 22:02.
Gser is offline   Reply With Quote
Old 5th November 2017, 22:56   #524  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
L-Smash doesn't support the native high bitdepth formats of AviSynth+. Either use ffms2 or try something like:
Code:
LWLibavVideoSource("file.ts", format="YUV420P16", stacked=true)
ConvertFromStacked()
ResizeShader(width=1920, height=1080, kernel="SSim")
sneaker_ger is offline   Reply With Quote
Old 6th November 2017, 13:39   #525  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
Quote:
Originally Posted by sneaker_ger View Post
L-Smash doesn't support the native high bitdepth formats of AviSynth+. Either use ffms2 or try something like:
Code:
LWLibavVideoSource("file.ts", format="YUV420P16", stacked=true)
ConvertFromStacked()
ResizeShader(width=1920, height=1080, kernel="SSim")
L-Smash works just fine with avs+ formats http://avisynth.nl/index.php/LSMASHS...bavVideoSource
But it seems that I will have to use stacked as the only resizers that work directly with 10-bit are the internal ones.
Gser is offline   Reply With Quote
Old 6th November 2017, 14:16   #526  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Quote:
Originally Posted by Gser View Post
L-Smash works just fine with avs+ formats http://avisynth.nl/index.php/LSMASHS...bavVideoSource
I don't read anything about AVS+ formats in there.

Quote:
Originally Posted by Gser View Post
But it seems that I will have to use stacked as the only resizers that work directly with 10-bit are the internal ones.
I don't really know but to me this implies the AVS+ formats should be supported:
Quote:
Originally Posted by MysteryX View Post
If you're using Avisynth+, you can use ConvertBits(16) and ConvertBits(8) to work in high-bit-depth.

Did you try my suggestions (unsuccessfully)?
sneaker_ger is offline   Reply With Quote
Old 6th November 2017, 15:02   #527  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
Quote:
Originally Posted by sneaker_ger View Post
I don't read anything about AVS+ formats in there.


I don't really know but to me this implies the AVS+ formats should be supported:



Did you try my suggestions (unsuccessfully)?
I can't demonstrate it any better that this picture.

https://imgur.com/a/60gYY

Yes I understood also that avs+ formats were supported but at least 10-bit didn't work.

Now I am using this code
Code:
LWLibavVideoSource("file.ts", stacked=true, format="YUV420P16" )
Dither_convert_yuv_to_rgb (matrix="2020", output="rgb48y", lsb_in=true)
Dither_y_gamma_to_linear (tv_range_in=true, tv_range_out=true, curve="2020", sigmoid=true)
Dither_resize16 (1920, 1080, kernel="bicubic", a1=0, a2=0.75)
Dither_y_linear_to_gamma (tv_range_in=true, tv_range_out=true, curve="2020", sigmoid=true)
r = SelectEvery (3, 0)
g = SelectEvery (3, 1)
b = SelectEvery (3, 2)
Dither_convert_rgb_to_yuv (r, g, b, matrix="2020", lsb=true)
Dither_quantize (10, mode=7, reducerange=true)
Dither_out ()
Prefetch(3)
I'm doing the rgb conversion with dither tools as avisynthshader doesn't support bt.2020. I was hoping to process the rgb video then in avisynthshader but it processes stacked formats only in YV12 and YV24.

Last edited by Gser; 6th November 2017 at 16:21.
Gser is offline   Reply With Quote
Old 6th November 2017, 16:36   #528  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
The image above isn't Stack16 format otherwise it would appear in 2 vertical sections with the bottom half showing random junk.

Note that if you pass 10-bit, it needs to be converted to 16-bit to pass into the shader. Use ConvertBits(16) before it and it should work fine.
MysteryX is offline   Reply With Quote
Old 6th November 2017, 17:22   #529  |  Link
Gser
Registered User
 
Join Date: Apr 2008
Posts: 418
Quote:
Originally Posted by MysteryX View Post
The image above isn't Stack16 format otherwise it would appear in 2 vertical sections with the bottom half showing random junk.

Note that if you pass 10-bit, it needs to be converted to 16-bit to pass into the shader. Use ConvertBits(16) before it and it should work fine.
Yes it wasn't supposed to be stacked, I was trying to directly convert planar 10-bit. And also convertbits didn't work, just gives an error about reading video. Only converting it to stacked works. There might be a problem in convertbits because just using it without resizing already gives me an error. Quite bizarre.

Last edited by Gser; 6th November 2017 at 17:55.
Gser is offline   Reply With Quote
Old 12th November 2017, 04:30   #530  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Just to be clear. The GPU works only in 8-bit, 16-bit, or 32-bit.

If you pass other formats like 10-bit, it should automatically handle the conversions but perhaps I haven't tested that much.
MysteryX is offline   Reply With Quote
Old 16th December 2017, 04:47   #531  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Madshi replaced NNEDI3 with NGU in madVR. I haven't tried it yet but it appears to be better as he also removed NNEDI3.

Anyone knows of available HLSL implementation of NGU?
MysteryX is offline   Reply With Quote
Old 16th December 2017, 09:36   #532  |  Link
cork_OS
Registered User
 
cork_OS's Avatar
 
Join Date: Mar 2016
Posts: 160
Quote:
Originally Posted by MysteryX View Post
Madshi replaced NNEDI3 with NGU in madVR. I haven't tried it yet but it appears to be better as he also removed NNEDI3.

Anyone knows of available HLSL implementation of NGU?
Note that there are two main NGU variants, NGU AA (madshi's rewrite of NNEDI3, somewhat improved) and NGU Sharp/Standard/Soft (madshi's own edge-directed upscaler like waifu2x, FSRCNN etc.).
I assume that NGU sources will never be shared (however madshi plans to release avisynth plugin with madVR algorithms someday). For now you can try FSRCNN from mpv, I assume.
__________________
I'm infected with poor sources.
cork_OS is offline   Reply With Quote
Old 16th December 2017, 17:34   #533  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Oh madshi wrote these himself? Yeah that might make it harder to implement it elsewhere as he tends to be protective with his hard work.
MysteryX is offline   Reply With Quote
Old 16th December 2017, 21:11   #534  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
OK I talked with Madshi. He's planning to release a madVR toolkit for Avisynth+ and VapourSynth, so you'll be able to use NGU + SuperRes without using AvisynthShader. When he gets the time to finish it.
MysteryX is offline   Reply With Quote
Old 18th December 2017, 00:57   #535  |  Link
edcrfv94
Registered User
 
Join Date: Apr 2015
Posts: 84
Quote:
Originally Posted by MysteryX View Post
OK I talked with Madshi. He's planning to release a madVR toolkit for Avisynth+ and VapourSynth, so you'll be able to use NGU + SuperRes without using AvisynthShader. When he gets the time to finish it.
I do a fast search for super-resolution FSRCNN look like much better than nnedi3, But AviSynthShader not compatible MPV glsl Shaders.

NGU Sharp compares to mpv's latest FSRCNN(X):
https://forum.doom9.org/showthread.p...32#post1825432
edcrfv94 is offline   Reply With Quote
Old 21st December 2017, 03:01   #536  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
NGU looks considerably better than FSRCNN(X) that causes much more edge/color distortion. It's also a lot faster. Thanks for the benchmarks and comparison.

Now NGU+SuperRes should also look great
MysteryX is offline   Reply With Quote
Old 21st December 2017, 23:46   #537  |  Link
cork_OS
Registered User
 
cork_OS's Avatar
 
Join Date: Mar 2016
Posts: 160
Quote:
Originally Posted by MysteryX View Post
Now NGU+SuperRes should also look great
madshi said several times that SuperRes doesn't seem to be beneficial for NGU and even can harm it.
__________________
I'm infected with poor sources.
cork_OS is offline   Reply With Quote
Old 22nd December 2017, 20:04   #538  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Have they also done comparison of SuperRes with NNEDI3 or SuperXbr, with NGU? SuperRes+Xbr was doing a great job already but had some distortion in some cases with geometric forms. I'd be curious to see NGU side-by-side.
MysteryX is offline   Reply With Quote
Old 24th December 2017, 08:24   #539  |  Link
edcrfv94
Registered User
 
Join Date: Apr 2015
Posts: 84
Quote:
Originally Posted by cork_OS View Post
madshi said several times that SuperRes doesn't seem to be beneficial for NGU and even can harm it.
EDSR look super!!!
https://github.com/LimBee/NTIRE2017
edcrfv94 is offline   Reply With Quote
Old 13th May 2018, 06:20   #540  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
AviSynthShader v1.6.5 is ready!

What's new:
- Fixed crash on NVidia cards when PlanarOut=true

Btw I'm hoping someone will port EDSR or other such algorithms to Avisynth... but I can only hope.
MysteryX is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:53.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.