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 > Hardware & Software > Software players

Reply
 
Thread Tools Search this Thread Display Modes
Old 25th October 2014, 11:40   #261  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Quote:
Originally Posted by toniash View Post
@Zachs So, what I've to do to insert lumasharpen as a postscaling shader?
Just use the luma sharpen render script.
In that script (in RenderScripts folder, SweetFxSample.LumaSharpen.cs), it uses LumaSharpen.hlsl under the SweetFX folder to do pixel shading. In that file, there are several parameters you could change. If you want to stack pixel shaders, have a look at the Luma->Monochrome render script.
Zachs is offline   Reply With Quote
Old 25th October 2014, 12:04   #262  |  Link
toniash
Registered User
 
Join Date: Oct 2010
Posts: 131
Quote:
Originally Posted by Zachs View Post
Just use the luma sharpen render script.
In that script (in RenderScripts folder, SweetFxSample.LumaSharpen.cs), it uses LumaSharpen.hlsl under the SweetFX folder to do pixel shading. In that file, there are several parameters you could change. If you want to stack pixel shaders, have a look at the Luma->Monochrome render script.
Ok thanks, I'll try!

It works!

Last edited by toniash; 25th October 2014 at 23:51.
toniash is offline   Reply With Quote
Old 25th October 2014, 20:11   #263  |  Link
BetA13
cosmic entity
 
BetA13's Avatar
 
Join Date: May 2011
Location: outside the Box
Posts: 258
monochrome works, but lumasharpen doesnt do anything, even when i set it 1.25, wich should totaly oversharpen the picture.. but it didnt change anything...

dunno whats wrong.. i double checked everything, even restarted teh player after selecting teh sharpen shader...

in mpchc etc, this works perfect...
But there im using these here:

---> http://forum.doom9.org/showthread.ph...hlight=sweetfx

greetz
BetA13 is offline   Reply With Quote
Old 25th October 2014, 20:20   #264  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
As an example of what the new render scripts can do I've implemented the NEDI shaders I developed (for more information see this thread). The configuration process is now considerably easier. Simply download NEDIRenderScripts.rar and extract it in MPDN's RenderScript folder. Then go to MPDN's options and enable the NEDI render script. The script then doubles the image using NEDI and scales the result to the correct output size (using linear scaling, but this should be replaced by something better soon).

People interested in creating their own render scripts may also want to look at the Filter.cs file that is included, this script defines some classes that take care of some of the housekeeping you need to apply and chain shaders. I've asked Zachs to look at whether parts of this script can be included as part of the default render script code. Until that time using Filter.cs should at least make it easier to try things out.

EDIT: Use version 2.8.2. Older version won't work.
EDIT2: Minor improvements to code: NEDIFilter didn't report size correctly and Filter.cs now allows you to try to reuse Textures (fails gracefully and silently).

Last edited by Shiandow; 26th October 2014 at 02:27.
Shiandow is offline   Reply With Quote
Old 25th October 2014, 22:09   #265  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Did you perhaps use version 2.8.2? The name ITexture didn't exist yet in 2.8.0. I should probably have mentioned that, sorry about that.

Last edited by Shiandow; 25th October 2014 at 22:12.
Shiandow is offline   Reply With Quote
Old 25th October 2014, 22:12   #266  |  Link
Anime Viewer
Troubleshooter
 
Anime Viewer's Avatar
 
Join Date: Feb 2014
Posts: 339
Quote:
Originally Posted by Shiandow View Post
Did you perhaps use version 2.8.2? The name ITexture didn't exist yet in 2.8.0. I should probably have mentioned that, sorry about that.
Yep, that was the problem. I wasn't running 2.8.2, so now the scripts are running fine after updating the version.
__________________
System specs: Sager NP9150 SE with i7-3630QM 2.40GHz, 16 GB RAM, 64-bit Windows 10 Pro, NVidia GTX 680M/Intel 4000 HD optimus dual GPU system. Video viewed on LG notebook screen and LG 3D passive TV.
Anime Viewer is offline   Reply With Quote
Old 25th October 2014, 23:38   #267  |  Link
toniash
Registered User
 
Join Date: Oct 2010
Posts: 131
Quote:
Originally Posted by Shiandow View Post
As an example of what the new render scripts can do I've implemented the NEDI shaders I developed (for more information see this thread). The configuration process is now considerably easier. Simply download NEDIRenderScripts.rar and extract it in MPDN's RenderScript folder. Then go to MPDN's options and enable the NEDI render script. The script then doubles the image using NEDI and scales the result to the correct output size (using linear scaling, but this should be replaced by something better soon).

People interested in creating their own render scripts may also want to look at the Filter.cs file that is included, this script defines some classes that take care of some of the housekeeping you need to apply and chain shaders. I've asked Zachs to look at whether parts of this script can be included as part of the default render script code. Until that time using Filter.cs should at least make it easier to try things out.

EDIT: Use version 2.8.2. Older version won't work.
Could you create a script with Lumasharpen on top of NEDI?
toniash is offline   Reply With Quote
Old 26th October 2014, 00:35   #268  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Quote:
Originally Posted by toniash View Post
Could you create a script with Lumasharpen on top of NEDI?
Hopefully it will soon be possible to do this from within MPDN. It should be fairly trivial to add LumaSharpen after NEDI, but you seem to have found a bug, which I'll need to fix to actually make it trivial. I probably won't release a separate version with the LumaSharpen, but after I've fixed the bug you should be able to add it by changing 1~2 lines of code, so I'll just show you which lines you need to change.
Shiandow is offline   Reply With Quote
Old 26th October 2014, 01:14   #269  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Turns out it wasn't a major bug (yet) but I've removed it anyway. If you want to use LumaSharpen then what you need to do is: redownload the script, open Nedi.cs, find line 150 (last line of the NEDI.Render method) and add the line:
PHP Code:
m_NediFilter = new ShaderFilter(m_NediFilterm_Renderer.CompileShader(Path.Combine(ShaderDataFilePath, @"..\SweetFX\LumaSharpen.hlsl"))); 
just after
PHP Code:
m_NediFilter = new NEDIFilter(InputFilterShaderDataFilePath); 
Shiandow is offline   Reply With Quote
Old 26th October 2014, 01:19   #270  |  Link
fairchild
Registered User
 
Join Date: Sep 2010
Posts: 321
I just get a black screen when trying to use NEDI shader, the other 2 built in ones work fine. (black screen occurs when going full-screen)
__________________
MPC-HC/MPC-BE, Lav Filters, MadVR
CPU: AMD Ryzen 5 1600, Video: AMD Radeon RX Vega 56 -> TCL S405 55", Audio: Audio-Technica M50S
fairchild is offline   Reply With Quote
Old 26th October 2014, 01:24   #271  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 130
Shiandow, thanks for porting your NEDI shader to MPDN, however I found a possible bug, I got blank screen if I resize the window, or go to full screen.

Edit: Ooops, fairchild beats me to it. I wrote the post while retesting the finding.
patul is offline   Reply With Quote
Old 26th October 2014, 02:15   #272  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
That's odd, I don't seem to be able to reproduce that. Perhaps something weird happens when allocating the new textures. Can't think of anything in the NEDI script that should cause that though, not without crashing.

Edit: Do you still have sound by the way? That would suggest that it is at least doing something.

Last edited by Shiandow; 26th October 2014 at 02:17.
Shiandow is offline   Reply With Quote
Old 26th October 2014, 03:03   #273  |  Link
fairchild
Registered User
 
Join Date: Sep 2010
Posts: 321
Quote:
Originally Posted by Shiandow View Post
Edit: Do you still have sound by the way? That would suggest that it is at least doing something.
Yes, I get sound continuing to play while the screen is just black.

I also just tested with a 1080p file, basically since it has to scale down to a smaller window when not full screen (on a 1080p screen) then I have the black screen. When I go fullscreen with the 1080p movie, I get an image. So basically when it has to resize to a resolution that is not the default, I get a black screen.
__________________
MPC-HC/MPC-BE, Lav Filters, MadVR
CPU: AMD Ryzen 5 1600, Video: AMD Radeon RX Vega 56 -> TCL S405 55", Audio: Audio-Technica M50S
fairchild is offline   Reply With Quote
Old 26th October 2014, 03:21   #274  |  Link
Shiandow
Registered User
 
Join Date: Dec 2013
Posts: 753
Could be that the hardware scaling doesn't work for some reason. Could you try changing the extension of "MyOwnUniqueNamespace.MyScaler.cs_" to ".cs", change the "IRenderTarget" on line 24 to "ITexture", and then check if that render script has the same problem?
Shiandow is offline   Reply With Quote
Old 26th October 2014, 04:00   #275  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 130
Quote:
Originally Posted by Shiandow View Post
Could be that the hardware scaling doesn't work for some reason. Could you try changing the extension of "MyOwnUniqueNamespace.MyScaler.cs_" to ".cs", change the "IRenderTarget" on line 24 to "ITexture", and then check if that render script has the same problem?
No, it does not have the same problem. MyOwnUniqueNamespace.MyScaler works just fine.

Edit: But, if I read the code correctly, it supposed to run LumaSharpen first, then monochrome. If my understanding is right, then it's not working, I saw no such effect although no blank screen.

Last edited by patul; 26th October 2014 at 04:08.
patul is offline   Reply With Quote
Old 26th October 2014, 04:55   #276  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Love NEDI!

Quote:
Originally Posted by patul View Post
No, it does not have the same problem. MyOwnUniqueNamespace.MyScaler works just fine.

Edit: But, if I read the code correctly, it supposed to run LumaSharpen first, then monochrome. If my understanding is right, then it's not working, I saw no such effect although no blank screen.
Hmm this is odd.

Finally got a few minutes to test NEDI. It's working for me both upscale and downscale. Bloody fast too! 2ms render time for a 320x180 video upscaled to 1080. And the edge is perfectly smooth too on that fav test video of mine - it's highly compressed and has very jagged edges on a lot of the lines - NEDI is much better than Jinc! On several other free to air records, its quality combined with Softcubic chroma doubling is BETTER than my Samsung 55" Series 8 LED TV. It's very similar to NNEDI3 (although *personally* I feel NEDI is more natural - NNEDI3 draws a lot of hard lines when it detects edges while Shiandow's improved NEDI is like a better Jinc). Love it!

Amazing job Shiandow! (btw, this is without superres too right?)

As for the problems everyone else is seeing, when you enable MyOwnUniqueNamespace.MyScaler, you should see monochrome results. If you don't, then something is obviously broken. I've tested this and NEDI on both Intel and NVIDIA GPUs (don't have access to AMD cards at the moment) and both worked fine.

From the reports, I believe some of you are seeing an exception in the rendering pipeline. It sounds like intermediate texture creation has failed silently (if it seems to work in unscaled output, it's because MPDN is sharing texture with the script internally and would've painted something on it). In the next release of MPDN, I've changed the code quite a bit to enable debug output in the rendering pipeline for errors. What you could do is run DebugView and see if there's any errors. Unfortunately this feature isn't available in v2.8.2 yet, so a little more patience is required. My apologies.

Last edited by Zachs; 26th October 2014 at 05:02.
Zachs is offline   Reply With Quote
Old 26th October 2014, 05:40   #277  |  Link
Anima123
Registered User
 
Join Date: Jun 2005
Posts: 511
I might not follow, but how the NEDI script work with together chroma scaling or luma scaling algorithms offered by MPN?
Anima123 is offline   Reply With Quote
Old 26th October 2014, 06:05   #278  |  Link
patul
Registered User
 
Join Date: Sep 2005
Posts: 130
Quote:
Originally Posted by Zachs View Post

As for the problems everyone else is seeing, when you enable MyOwnUniqueNamespace.MyScaler, you should see monochrome results. If you don't, then something is obviously broken. I've tested this and NEDI on both Intel and NVIDIA GPUs (don't have access to AMD cards at the moment) and both worked fine.
Well, I happen to test it on AMD A5400K APU (Radeon HD 7540D) with 14.9 driver.
patul is offline   Reply With Quote
Old 26th October 2014, 06:45   #279  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Quote:
Originally Posted by patul View Post
Well, I happen to test it on AMD A5400K APU (Radeon HD 7540D) with 14.9 driver.
AMD again. My code is already filled with If AMD then... Looks like I need more of those! There's no specific code branch for Nvidia and Intel.

is everyone else with the problem also using AMD card?
Zachs is offline   Reply With Quote
Old 26th October 2014, 06:47   #280  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Quote:
Originally Posted by Anima123 View Post
I might not follow, but how the NEDI script work with together chroma scaling or luma scaling algorithms offered by MPN?
Chroma is usually half the size of luma in width and height. MPDN does the first scaling to get Chroma up to the size of luma. Then NEDI takes over.
Zachs is offline   Reply With Quote
Reply

Tags
direct3d, mpdn, nnedi3, opencl, reclock

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 23:39.


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