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

Reply
 
Thread Tools Search this Thread Display Modes
Old 10th September 2017, 09:13   #501  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
avs 2.6

avs 2.6 is ok
gmail123 is offline   Reply With Quote
Old 10th September 2017, 09:13   #502  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
but avs + is wrong:

Quote:
Originally Posted by gmail123 View Post
avs+,in megui, script:
AddAutoloadDir("D:\video\MeGUI\tools\avisynth_plugin")
LoadPlugin("D:\video\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\Users\pc\Desktop\am.mkv")
ConvertBits(16)
SuperRes(3, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize")""")
ConvertBits(8, dither=0)
but
gmail123 is offline   Reply With Quote
Old 10th September 2017, 09:21   #503  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
in this script:
AddAutoloadDir("D:\video\MeGUI\tools\avisynth_plugin")
LoadPlugin("D:\video\MeGUI\tools\lsmash\LSMASHSource.dll")
LWLibavVideoSource("C:\Users\pc\Desktop\12.mkv")
#LanczosResize(704,380) # Lanczos (Sharp)
ConvertToShader(2)
last
Shader("D:\video\MeGUI\tools\avisynth_plugin\nnedi3.hlsl" )
Shader("D:\video\MeGUI\tools\avisynth_plugin\SuperRes.hlsl")
ExecuteShader(last,last,Clip1Precision=1,Precision=3,OutputPrecision=2)
ConvertFromShader(2)

ConvertBits(16)
SuperRes(3, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize")""")
ConvertBits(8, dither=0)


https://imgbox.com/m1amfWuz

.hlsl is ok
http://imgbox.com/jfBfgJWk

Last edited by gmail123; 10th September 2017 at 09:28.
gmail123 is offline   Reply With Quote
Old 10th September 2017, 14:41   #504  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by gmail123 View Post
but avs + is wrong:
Oh right there was this bug when handling HBD with the Upscale command.

SuperResXbr is probably working fine for you.


With NNEDI3.hlsl, is it using PS_3_0 format? I haven't yet found a NNEDI3 HLSL script written in 3_0 format, all I've seen were in 4_0 format which doesn't work here.

Try compiling it manually with fxc as I mentioned a few posts back.

Last edited by MysteryX; 10th September 2017 at 14:44.
MysteryX is offline   Reply With Quote
Old 13th September 2017, 13:31   #505  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
in this script:
Dither_convert_8_to_16()
SuperRes(3, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize")""")
ResizeShader(720,400)
DitherPost()
output:720*200
bug?
gmail123 is offline   Reply With Quote
Old 13th September 2017, 15:22   #506  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
You're using Stack16 format as input, so you need to set lsb_in=true and lsb_out=true. lsb_upscale=lsb_in by default.

Also, you're using nnedi3_rpow2 on a Stack16 clip which isn't valid.
MysteryX is offline   Reply With Quote
Old 13th September 2017, 16:18   #507  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
because of :
gmail123 is offline   Reply With Quote
Old 13th September 2017, 16:23   #508  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
how to use "nnedi3_rpow2" on a Stack16 clip?
use "lsb_in=true and lsb_out=true" all wrong.

now ,I have no idea...

Last edited by gmail123; 13th September 2017 at 16:25.
gmail123 is offline   Reply With Quote
Old 13th September 2017, 16:34   #509  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
AFAIK nnedi3_rpow2 doesn't support Stack16, but you can use ConvertToStacked and ConvertFromStacked to convert between native 16-bit and Stack16

csp invalid? Make sure you have the latest version of DitherTools. csp parameter is in the docs.

The but with AvisynthShader is in properly detecting 16-bit clips in the Upscale command.

Perhaps this will work, haven't tested
Code:
ConvertBits(16)
SuperRes(3, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize").ConvertToStacked()""", lsb_upscale=true)
ConvertBits(8)

Last edited by MysteryX; 13th September 2017 at 16:38.
MysteryX is offline   Reply With Quote
Old 17th September 2017, 15:10   #510  |  Link
gmail123
Registered User
 
Join Date: Dec 2014
Posts: 36
Quote:
Originally Posted by MysteryX View Post
AFAIK nnedi3_rpow2 doesn't support Stack16, but you can use ConvertToStacked and ConvertFromStacked to convert between native 16-bit and Stack16

csp invalid? Make sure you have the latest version of DitherTools. csp parameter is in the docs.

The but with AvisynthShader is in properly detecting 16-bit clips in the Upscale command.

Perhaps this will work, haven't tested
Code:
ConvertBits(16)
SuperRes(3, .43, 0, """nnedi3_rpow2(2, nns=4, cshift="Spline16Resize").ConvertToStacked()""", lsb_upscale=true)
ConvertBits(8)
wrong...
dither ver 1.27.2

I am crazy...

Last edited by gmail123; 17th September 2017 at 15:14.
gmail123 is offline   Reply With Quote
Old 17th September 2017, 18:10   #511  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by gmail123 View Post
wrong...
dither ver 1.27.2

I am crazy...
hum... I have 1.27.1

Weird. Perhaps someone else knows about that
MysteryX is offline   Reply With Quote
Old 20th September 2017, 18:00   #512  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Version 1.6.4 is ready!

What's new:
- Fixed SuperRes when using high-bit-depth upscale
MysteryX is offline   Reply With Quote
Old 16th October 2017, 20:39   #513  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
When using SuperRes is it always necessary to use ConvertoRGB24() when encoding from a DVD source? Is there any way to keep the video in YV12 and use this upscaling? There are slight color shifts as a consequence of converting color space. I'm using a GTX750 Ti.
SaurusX is offline   Reply With Quote
Old 16th October 2017, 22:23   #514  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
It needs to be converted to RGB32 internally. However, if you pass in YUV data, it will do the YUV to RGB conversion on the GPU in 16-bit and convert back to YUV. Alternatively, you can convert to RGB32 in 16-bit and do several operations and then convert back to YUV yourself in 16-bit. You shouldn't be seeing color shifts unless you convert colors in 8-bit.
MysteryX is offline   Reply With Quote
Old 17th October 2017, 02:35   #515  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
Quote:
Originally Posted by MysteryX View Post
It needs to be converted to RGB32 internally. However, if you pass in YUV data, it will do the YUV to RGB conversion on the GPU in 16-bit and convert back to YUV. Alternatively, you can convert to RGB32 in 16-bit and do several operations and then convert back to YUV yourself in 16-bit. You shouldn't be seeing color shifts unless you convert colors in 8-bit.
I am converting in 8-bit, but how do I NOT do that? I'm just using straight ConverttoRGB24(matrix="Rec709") and ConverttoYV12(matrix="Rec709") later. I was lacking the matrix specification which was causing even worse color shifts before. Now it's mitigated, but there's still something happening.
SaurusX is offline   Reply With Quote
Old 17th October 2017, 05:32   #516  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
If you're using Avisynth+, you can use ConvertBits(16) and ConvertBits(8) to work in high-bit-depth.

Also is there a reason why you wouldn't just let the RGB conversation happen on the GPU? If there's a color shift, it might be due to a wrong color matrix. When doing GPU conversion, you can use MatrixIn and MatrixOut which are Rec709 by default. Perhaps your clip has Rec601. Double-check what color matrix is your source material.
MysteryX is offline   Reply With Quote
Old 17th October 2017, 11:30   #517  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
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.

Also is there a reason why you wouldn't just let the RGB conversation happen on the GPU? If there's a color shift, it might be due to a wrong color matrix. When doing GPU conversion, you can use MatrixIn and MatrixOut which are Rec709 by default. Perhaps your clip has Rec601. Double-check what color matrix is your source material.
I'm using AviSynth through megui. Without an explicit call of ConverttoRGB24(matrix="Rec709") I get the following error message:



So I'm not quite sure what you mean by letting the conversion happen on the GPU. Is this problem an Nvidia thing? I've already had to make two small alterations to shader.avsi where I've set PlanarOut=False.

Thanks for your help.

Last edited by SaurusX; 17th October 2017 at 12:26.
SaurusX is offline   Reply With Quote
Old 17th October 2017, 15:24   #518  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
OK, reading up on the Convert filters apparently I need to be using "PC.709" instead of "Rec.709" as I only want it to keep it's current color space range and not try to stretch it again. I'll try that and see if the color changing disappears.

EDIT: I figured it out. I have to use the following in order for the colors not to shift.

ConverttoRGB24(matrix="Rec601")
SuperResXBR(3, 1, 0.15, XbrStr=2.7, XbrSharp=1.3, fWidth=960, fHeight=720, fKernel="Bicubic", fB=0, fC=.75)
ConvertToYV12(matrix="Rec709")

This is from a DVD source, BTW. I don't know why the internal conversion process isn't working, but at least the problem is solved.

Last edited by SaurusX; 17th October 2017 at 18:03.
SaurusX is offline   Reply With Quote
Old 17th October 2017, 18:28   #519  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
It's possible that there's still a bug with Avisynth 2.6 if that's what you're using.

Here it's working but you're losing data on both Convert functions resulting in loss of details accuracy.
MysteryX is offline   Reply With Quote
Old 17th October 2017, 19:17   #520  |  Link
SaurusX
Registered User
 
Join Date: Feb 2017
Posts: 134
I am using AVISynth 2.6 with megui. For me, the ConvertoX calls seem to be unavoidable for now. I may upgrade to AVISynth+ in the future to get rid of this problem.

How much detail is lost in these conversions at any rate? For animation it seems to be completely unnoticeable.
SaurusX is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 17:29.


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