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 28th December 2015, 06:10   #201  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
If someone wants to port NNEDI3...
https://github.com/zachsaw/MPDN_Exte...Scripts/NNEDI3

There might be some advantages to it. First, it would allow processing NNEDI3 with 16-bit depth. Second, it *might* not have performance overhead compared to SuperRes if both are run together, since running more commands in the same chain won't increase memory transfers. I know the AviSynth version of NNEDI3 is well optimized, and I'd be curious to see how it would perform in this case since the GPU is under-utilized anyway.

It would take a stand-alone version of NNEDI3, and then another script that combines NNEDI3 and SuperRes to run in the same chain. What I'm not sure about is how to do the sub-pixel shift in HLSL.
MysteryX is offline   Reply With Quote
Old 28th December 2015, 07:11   #202  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
btw I found something that makes SuperRes shine even more. If I use KNLMeans with cmode=true to also denoise the chroma, I can apply a stronger SuperRes. See for yourself.

Without SuperRes
Code:
AviSource("Preview.avi", pixel_type="YV12")
ConvertToYV24()
KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0)
ConvertToYV12()
ColorMatrixShader(MatrixIn="601")
edi_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)
edi_rpow2(2, nns=4, cshift="BicubicResize", a1=-.6, a2=0, fwidth=960, fheight=720, Threads=2)


With SuperRes
Code:
AviSource("Preview.avi", pixel_type="YV12")
ConvertToYV24()
KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0)
ConvertToYV12()
Double="""edi_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)"""
SuperRes(1, 1, 0, Double, MatrixIn="601")
Double="""edi_rpow2(2, nns=4, cshift="BicubicResize", a1=-.6, a2=0, lsb=true, fwidth=960, fheight=720, Threads=2)"""
SuperRes(1, 1, 0, Double, lsb_upscale=true)
MysteryX is offline   Reply With Quote
Old 28th December 2015, 11:30   #203  |  Link
sqrt(9801)
Registered User
 
Join Date: Jun 2013
Posts: 24
Quote:
Originally Posted by MysteryX View Post
You'll need to add support for SM5 in AvisynthShader first.
sqrt(9801) is offline   Reply With Quote
Old 28th December 2015, 18:07   #204  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by sqrt(9801) View Post
You'll need to add support for SM5 in AvisynthShader first.
Oh.

Using ShaderModel 5 requires DirectX 11 DirectCompute instead of DirectX 9.

I had worked on that implementation before; and then reverted back to DX9 when I realized configuring parameters was complex complicated. Everything else was pretty straightforward. Exact same logic as DX9 but replacing the commands with new names that make more sense. The DirectX code is well separated from the AviSynth code to make it easy.

That still would be considerable work that I won't have time for.

Last edited by MysteryX; 28th December 2015 at 18:15.
MysteryX is offline   Reply With Quote
Old 28th December 2015, 23:55   #205  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
MisteryX, the Natural Grounding Player v1.3 is coming soon? Your last update was about 6 months (v1.2.1) and has no superresolution.
__________________
Searching for great solutions
luquinhas0021 is offline   Reply With Quote
Old 29th December 2015, 01:58   #206  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by luquinhas0021 View Post
MisteryX, the Natural Grounding Player v1.3 is coming soon? Your last update was about 6 months (v1.2.1) and has no superresolution.
Yes, I just finished it; just have to release it. It has GREAT improvements to the Media Encoder!!

In the meantime, here's AviSynthShader v1.3.2

What's new:
- Added FormatOut to all scripts to set output format
- Fixed SuperRes when using lsb_out
- Removed bogus "info" in Super-xBR
MysteryX is offline   Reply With Quote
Old 29th December 2015, 03:11   #207  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Natural Grounding Player v1.3 is here. Merry Christmas!!

Natural Grounding Player Media Encoder thread is here

Last edited by MysteryX; 29th December 2015 at 03:40.
MysteryX is offline   Reply With Quote
Old 29th December 2015, 03:17   #208  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Hi, thanks for your work. One question, I am testing your code with some modification, this:

Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_13\074\VideoFile.d2v", info=3)

assumetff()

tfm(order=1,pp=6,mode=4).tdecimate(mode=1)

Spline36Resize(720,480,6,0,-3,-6)

	ConvertToYV24()

	ChromaReconstructor() # Dont smooth

	KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0)
	ConvertToYV12()
	Double="""edi_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)"""
	SuperRes(1, 1, 0, Double, MatrixIn="601")
	Double="""edi_rpow2(2, nns=4, cshift="BicubicResize", a1=-.6, a2=0, lsb=true, fwidth=960, fheight=720, Threads=2)"""
	SuperRes(1, 1, 0, Double, lsb_upscale=true)

spline36resize(640,480) # its for comparison

return last


The result is good, but in dark areas is too smoothing and lost details (background). Any configuration less destrutive for your code, type as sourcematch in qtmgc??
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 29th December 2015, 03:43   #209  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
What is causing the loss of details? With SuperRes, you can play with Strength and Passes, such as Passes=2 with Strength=.45

and perhaps your loss of details is due to KNLMeansCL?
MysteryX is offline   Reply With Quote
Old 29th December 2015, 12:34   #210  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Ok, apologize me. It is KNLMeansCl which causes lost of details.

Edit: I get a good result but its bit slooooooow XD:

Original: 640x480; Upsize: 960x720


Code:

Code:
DGDecode_mpeg2source("E:\Dragon Ball\DB_13\074\VideoFile.d2v", info=3)

assumetff()

tfm(order=1,pp=6,mode=4).tdecimate(mode=1)

Spline36Resize(720,480,6,0,-3,-6)

	ConvertToYV24()

	ChromaReconstructor()

	ConvertToYV12()

	Double="""edi_rpow2(2, nns=4, cshift="Spline16Resize", Threads=2)"""

	SuperRes(1, 1, 0, Double, MatrixIn="601")

	Double="""edi_rpow2(2, nns=4, cshift="BicubicResize", a1=-.6, a2=0, lsb=true, fwidth=960, fheight=720, Threads=2)"""

	SuperRes(1, 1, 0, Double, lsb_upscale=true)

#/*Prefiltrado*/#

	original=last

	pre=original.BrightDfttestMod(sbright=8.5, smedium=2.0, sdark=0,th_low=20, th_med=40, th_high=100, tbsize=1,lsb=true,mode=6)

	mascara=original.mt_edge("hprewitt",thY1=8, thY2=255,thc1=0,thc2=255)

	prefiltrado=mt_merge(pre, original, mascara)

#Temporal degrain

	tr = 6

	last=prefiltrado.SMDegrain (tr, thSAD=570, thSADC=180,lsb=true,lsb_out=true,thSCD1=570,thSCD2=160, blksize=8, overlap=4,search=4,contrasharp=false)

#/*Otros*/#

	csmod16(lsb_in=true, lsb=true)

	gradfun3(mode=6,lsb_in=true, lsb=false)

	Unsharphq(19,1.6,0.2,show=false)

	santiag(aa=15)

	hysteria(showmask=false,strength=0.9,lowthresh=32,highthresh=32)
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 29th December 2015 at 13:53.
Overdrive80 is offline   Reply With Quote
Old 29th December 2015, 15:27   #211  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
overdrive80, suggestion: instead use spline 36 and edi, apply spline 144 or lanczos 4, and nnedi3, and change cshift: put spline144 or lanczos4. Post here the result. Your result you`ve posted is a bit blurry, if we compare with original image.
__________________
Searching for great solutions

Last edited by luquinhas0021; 29th December 2015 at 15:47.
luquinhas0021 is offline   Reply With Quote
Old 29th December 2015, 17:09   #212  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
The code is here, you can change at your way. I am only playing with that tool.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite
Overdrive80 is offline   Reply With Quote
Old 29th December 2015, 17:56   #213  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
whats the difference between superres and superres xbr?
__________________
Searching for great solutions
luquinhas0021 is offline   Reply With Quote
Old 29th December 2015, 18:41   #214  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by Overdrive80 View Post
Edit: I get a good result but its bit slooooooow XD:
ChromaReconstructor is very slow; remove it to get a performance boost.

Code:
ConvertToYV24()
ChromaReconstructor()
ConvertToYV12()
And this is useless! There's no point in calling ChromaReconstructor to throw away the data right after.

Quote:
Originally Posted by luquinhas0021 View Post
whats the difference between superres and superres xbr?
SuperRes runs around resizers to restore the details while upscaling.

Super-xBR is a frame-double algorithm, similar to NNEDI3.

SuperRes require a frame-double algorithm to run: either NNEDI3, EEDI3 or Super-xBR.
MysteryX is offline   Reply With Quote
Old 29th December 2015, 18:53   #215  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
super-xbr or nnedi3: what you preffer?
Ah, in "Super-xBR 100", what the "100" means?
__________________
Searching for great solutions

Last edited by luquinhas0021; 29th December 2015 at 19:28.
luquinhas0021 is offline   Reply With Quote
Old 29th December 2015, 19:10   #216  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Quote:
Originally Posted by MysteryX View Post

And this is useless! There's no point in calling ChromaReconstructor to throw away the data right after.
Oh, my mistake, I just limited to copy and paste your code.

If I remove Converttoyv12, I get this:

http://postimg.org/image/s1g7mv6pp/

I had add Converttoyv12 before of Hysteria because dont admit YV24

EDIT: Problem of SMDegrain, neither admit YV24
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 29th December 2015 at 19:31.
Overdrive80 is offline   Reply With Quote
Old 29th December 2015, 20:02   #217  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
Quote:
Originally Posted by luquinhas0021 View Post
super-xbr or nnedi3: what you preffer?
Ah, in "Super-xBR 100", what the "100" means?
Strength parameter; actually it should be 1. Default is Strength=1, Sharpness=1.

Super-xBR seems to be doing a good job on some material. It is very sharp but has serious ringing problems, which are then reduced by applying SuperRes.

I personally prefer NNEDI3 because its results are more consistent.
MysteryX is offline   Reply With Quote
Old 29th December 2015, 20:10   #218  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673





Code:
	#Obviously, garbage is accentuated

	Double="""edi_rpow2(2, nns=4, cshift="SincResize", Threads=8)"""

	SuperRes(1, 1, 0, Double, MatrixIn="601")

	Double="""edi_rpow2(2, nns=4, cshift="SincResize", a1=-.6, a2=0, lsb=true, fwidth=960, fheight=720, Threads=8)"""

	SuperRes(1, 1, 0, Double, lsb_upscale=true)
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 29th December 2015 at 20:22.
Overdrive80 is offline   Reply With Quote
Old 29th December 2015, 20:17   #219  |  Link
luquinhas0021
The image enthusyast
 
Join Date: Mar 2015
Location: Brazil
Posts: 270
MisteryX, edge strenght goes from 0 to 5. 1 is the maximum acceptable value? 1 is the maximum acceptable value of sharpness? Super-xBR in Dither16 generates less artifacts? You talked you preffer nnedi3, but a lot of people says Super-xBR retains more details than nnedi3. You told me that use Super-xBR with SuperRes reduces ringing. What about sharpness where there isn`t ringing: reduces? Super-xBR is equal sharp or sharper than sinc4? And compared with the monstruosly sharp, and aliased, Bicubic b=-1, c=1?
__________________
Searching for great solutions

Last edited by luquinhas0021; 29th December 2015 at 20:31.
luquinhas0021 is offline   Reply With Quote
Old 29th December 2015, 21:24   #220  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
I haven't played much with Super-xBR. Post your discoveries.
MysteryX 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 10:39.


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