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 17th September 2012, 18:25   #13901  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Quote:
Originally Posted by madshi View Post
Ah, thanks, that makes sense. Is there something like SetGammaRamp for colors, too? Or does the GPU only support gamma manipulations via ICC profiles? How are colors managed then?
I'm not sure I understand your question.

SetGammaRamp allows to set three 1D-LUTs (one for red, green, and blue). It's not one gamma ramp, it's three (3x1D-LUT). See D3DGAMMARAMP.

When you set a ICC profile in the Windows color options, it doesn't do anything in itself. You need a ICC profile loader (such as xcalib - most calibration software come with something similar that runs at windows startup) to apply the profile to your video output. The loader usually takes the ICC profile set in the Windows color options (although that's just a design choice, technically it could just use any ICC profile), extracts the info it needs, and then calls SetGammaRamp to apply the profile to the video output.

Of course, because SetGammaRamp only supports 3x1D-LUT, only part of the ICC profile is used and the result is not a complete calibration (white points and gamma is corrected, but hue and saturation stay untouched). There are also issues with some software like some games (e.g. Crysis) that erase the gamma ramps and don't restore them on exit; that's why I have a scheduled task that runs my calibration loader each minute to make sure it stays on.

These gamma ramps have 16-bit precision per color (i.e. they convert from 8-bit to 16-bit). Not sure if all hardware use the extra 8 bits. Ideally the GPU should dither the results, but we would be lucky if they do.

My dream would be to have an API like SetGammaRamp but with a better design (no hijacking from applications) and with 3DLUT capabilities. If we had that, then we could just apply a 3DLUT for the entire Windows desktop and be done with it. But I can only dream.

Last edited by e-t172; 17th September 2012 at 18:31.
e-t172 is offline   Reply With Quote
Old 17th September 2012, 18:26   #13902  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by nlnl View Post
madshi
When madvr renders this sample it detects 3:3 cadence and switches to 23.976 display refresh rate in film mode.
I guess it should switch to 59.94 for this 3:3 cadence?

The sample is silent film and original frame rate is 21.4 fps http://www.imdb.com/title/tt0018737/.

The sample: https://dl.dropbox.com/u/43376972/Pandora%203-3%20cadence.mkv

Edit:
So if original frame rate is funny 21.4 fps, they should transfer this silent film this way:
21.4 fps -> 19,98p (59,94/3) -> 59,94i (2:2:2 cadence) ?
Thanks for that sample! Yeah, I think they've slowed those 21.4fps down to 19.98p and then simply applied a 3:3 cadence to get to 59.94i.

And yes, you're right. Switching to 59p would make more sense for this sample than switching to 23p. However, my current refresh rate changer is too stupid to actually care about which cadence was detected. As soon as you activate film mode with 59i content, the refresh rate changer thinks: Oh, this is a movie, so it must be 23p. And in 99.9% of all cases that's right. It even works for most Anime stuff. This 3:3 sample is one of a very rare exceptions. Well, it should play ok with 23p, too, but it should be a more fluid with 59p, of course. Anyway, not easy for me to fix. One of the problems is that cadences can break. What happens if a movie partially consists of 3:2 cadences and then switches to 3:3 cadences in between? Should madVR then switch from 23p to 59p and later back again? Not really sure how to handle this right now. I've some ideas for a future version, but it's not easy to fix right now, so you'll have to live with the current situation at the moment. I'll keep this in mind, though...
madshi is offline   Reply With Quote
Old 17th September 2012, 18:30   #13903  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by e-t172 View Post
I'm not sure I understand your question.

SetGammaRamp allows to set three 1D-LUTs (one for red, green, and blue). It's not one gamma ramp, it's three (3x1D-LUT).

When you set a ICC profile in the Windows color options, it doesn't do anything in itself. You need a ICC profile loader (such as xcalib - most calibration software come with something similar that runs at windows startup) to apply the profile to your video output. The loader usually takes the ICC profile set in the Windows color options (although that's just a design choice, technically it could just use any ICC profile), extracts the info it needs, and then calls SetGammaRamp to apply the profile to the video output.

Of course, because SetGammaRamp only supports 3x1D-LUT, only part of the ICC profile is used and the result is not a complete calibration (white points and gamma is corrected, but hue and saturation stay untouched). There are also issues with some software like some games (e.g. Crysis) that erase the gamma ramps and don't restore them on exit; that's why I have a scheduled task that runs my calibration loader each minute to make sure it stays on.

These gamma ramps have 16-bit precision per color (i.e. they convert from 8-bit to 16-bit). Not sure if all hardware use the extra 8 bits. Ideally the GPU should dither the results, but we would be lucky if they do.
From the very limited knowledge I gained when working with the yCMS developer, I thought that 3x1D-LUTs could not be used to calibrate colors in any reasonable way, because each 1D-LUT has no influence on the other 2 1D-LUTs. So those 3x1D-LUTs is all that is supported by the GPU and by Windows in terms of calibration? That's rather poor, I'd say...
madshi is offline   Reply With Quote
Old 17th September 2012, 18:38   #13904  |  Link
e-t172
Registered User
 
Join Date: Jan 2008
Posts: 589
Indeed it is. As I said, you can still use 3x1D-LUTs to calibrate gamma and make sure white points follow the D65 illuminant. That's all it can do, but it's better than nothing IMO. You're out of luck for saturation and hue because fixing them would require (R, G, B) = f(r, g, b) (3D-LUT) instead of (R, G, B) = (f(r), f'(g), f''(b)) (3x1D-LUT).

That's why image editing software like Photoshop don't use hardware LUTs and use their own 3DLUT implementation like madVR does. You just have to be careful not to use both at the same time, for obvious reasons.
e-t172 is offline   Reply With Quote
Old 17th September 2012, 18:46   #13905  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
K, thanks.
madshi is offline   Reply With Quote
Old 17th September 2012, 19:11   #13906  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Quote:
Originally Posted by e-t172 View Post
That's why I made a feature request ages ago to have madVR reset these tables (and restore them at the end of playback): to avoid the obvious double conversion issue when using madVR's 3DLUTs and the hardware LUTs simultaneously.
If that's ever considered, please be so kind as to make it optional because at this point there is no way to merge the 3x1D LUT data(such as a .cal file from Argyll) into a 3DLUT AFAIK, so both color corrections are required. Surely, if that's ever made possible, this option might come in handy to those who use 3DLUT's in mVR.....but I use a .cal file in Argyll in order to get my display to reach D65/2.4 in all Windows apps and 3DLUT files in ffdshow/avisynth to map gamuts, so I very much require mVR to not reset the graphic card's 10bit CLUT.
leeperry is offline   Reply With Quote
Old 17th September 2012, 19:55   #13907  |  Link
omarank
Registered User
 
Join Date: Nov 2011
Posts: 187
Quote:
Originally Posted by madshi View Post
It seems to working just fine here. Which splitter/"decoder" is used on your PC to display images?
I use LAV Filters [Splitter + Video decoder + Audio decoder]. I attached a madVR crash report in my last post. I could see some division by zero exception in that report. Didn't it help?
omarank is offline   Reply With Quote
Old 17th September 2012, 20:47   #13908  |  Link
Boltron
Registered User
 
Boltron's Avatar
 
Join Date: May 2011
Posts: 94
Quote:
Originally Posted by madshi View Post
You say you have calibrated it. How? Did you use the display controls to do the calibration? Or did you use yCMS? If you calibrated the display by using the display controls then in the madVR settings you should set it to "this display is already calibrated".

Depends on whether you watch in the same lighting conditions all the time or not. If you watch in sunlight or with room lights on, using e.g. a pure power curve of 2.20 might make sense. And that's probably what you calibrated your display to? However, if you watch at night with all lights turned off, going to a gamma curve of maybe 2.35 might make sense. So if you want to switch between different gamma values to adjust for different lighting situations, turn gamma processing on. Otherwise turn it off.
I calibrated using display controls, colorimeter and Chromapure software. I will then keep madVR set to "this display is already calibrated".

My set is in the basement and the room is always dimly lit. I will then keep it off.

Thanks for taking the time to reply!
Boltron is offline   Reply With Quote
Old 18th September 2012, 09:31   #13909  |  Link
Nicola
Registered User
 
Join Date: Aug 2004
Posts: 29
mmm, I didn't read al the topic, it's too long, but I have a question:
ages ago I hit the limit of my gpu (GeForce8500GT) using madvr and scaling 720p content to full HD monitor res, but couldn't really afford a new gpu.
right now I should be able to get a GeForce GT 610 for cheap, so I'd like to ask if it's powerful enough for madvr (lol, but yeah).
Thanks.
Nicola is offline   Reply With Quote
Old 18th September 2012, 12:56   #13910  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by nlnl View Post
madshi
When I try to switch Film-> Video (23hz -> 59 hz) using Cntrl+Alt+Sh+T I get red message resetting Direct3D device failed (8876086c).
Log and freeze report: http://dl.dropbox.com/u/43376972/LOG%20MADVR.zip
Thanks!
I've changed something to improve this. Could you please retest with the next build, once it's released? Thanks.

Quote:
Originally Posted by leeperry View Post
If that's ever considered, please be so kind as to make it optional because at this point there is no way to merge the 3x1D LUT data(such as a .cal file from Argyll) into a 3DLUT AFAIK, so both color corrections are required.
Can't you create a 3DLUT which also does the same which those 3x1D LUTs do?

Quote:
Originally Posted by omarank View Post
I use LAV Filters [Splitter + Video decoder + Audio decoder]. I attached a madVR crash report in my last post. I could see some division by zero exception in that report. Didn't it help?
The crash report didn't help too much, unfortunately. I don't think LAV supports displaying images/pictures? Please check which filters are used on your PC if you try to display pictures. If you can't find out due to the crash, try a different video renderer.

Quote:
Originally Posted by Nicola View Post
right now I should be able to get a GeForce GT 610 for cheap, so I'd like to ask if it's powerful enough for madvr (lol, but yeah).
Maybe just fast enough for 1080p24 with 2-tap resizers. Probably not fast enough for anti-ringing lanczos and/or 1080p60. But I don't really know for sure. Of course you can always switch to "Bilinear" scaling, but that would be a really sad solution...
madshi is offline   Reply With Quote
Old 18th September 2012, 13:58   #13911  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
Quote:
Originally Posted by madshi View Post
So madVR reports a video size of 720x480 and a preferred aspect ratio resolution of 853x480. The correct AR resolution would be 853.333333x480, but madVR has no way to pass this information to the media player, so it rounds down to 853x480.
So only integers are allowed, but what about 2560:1440 as AR ? Should give exact 1920*1080 after scaling.
Just kidding..
Pat357 is offline   Reply With Quote
Old 18th September 2012, 14:19   #13912  |  Link
leeperry
Kid for Today
 
Join Date: Aug 2004
Posts: 3,477
Quote:
Originally Posted by madshi View Post
Can't you create a 3DLUT which also does the same which those 3x1D LUTs do?
Well, the 1D LUT's are generated by ArgyllCMS and loaded into the graphic card's CLUT, then they are applied in actual 10bit(Argyll provides a small app to check that) due to the fact that I'm outputting VGA. I very much enjoy having a well calibrated display corrected in 10bit, then I do the gamut mapping in ffdshow via automatic scripts. It's all automatic and works flawlessly.

Surely, if outputting TMDS and if there were an app allowing to merge my .cal Argyll file into a 3DLUT then resetting the graphic card's CLUT would theoritically be a better choice but sometimes I like to K.I.S.S.
leeperry is offline   Reply With Quote
Old 18th September 2012, 15:40   #13913  |  Link
mirkosp
Registered User
 
Join Date: Jul 2009
Posts: 19
Quote:
Originally Posted by madshi View Post
So we're talking about a native RGB video here? Can you send me a sample?
No, I didn't test with RGB videos. I realized there was this problem with a Hi444PP video, since vsfilter doesn't support Hi444PP and thus it gets converted to RGB32 before it's passed to it, but I can reproduce the issue with Hi10P and HiP files too when I force RGB32. Ideally any file with subtitles embedded will do, as long as rgb32 is being forced. Which means rgb32 video will work too for testing, obviously, but isn't strictly required.
As I said, the issue is only present if vsfilter or xyvsfilter is handing the stream to madvr. I tested, and pc level rgb32 output directly from lav and cccp's ffdshow is properly handled by madvr.

As a sort of off-topic side note: the fact that vsfilter doesn't support hi444pp currently means that it's converted to rgb by lav/ffdshow with the proper matrix, which means when hi444pp support will be added to xy/vsfilter, there won't be any need for the rec.601 hack with 4:4:4 videos!

Last edited by mirkosp; 18th September 2012 at 15:45.
mirkosp is offline   Reply With Quote
Old 18th September 2012, 17:38   #13914  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
VSFilter & xy-VSFilter only support full-range RGB. If the decoder passes limited range RGB, subtitles will get double expanded by the video renderer. That said, it is a bit of a problem that madVR double-expands full-range RGB by default when a YCbCr bitstream is flagged as limited-range, and VSFilter is in the graph.

I ran into this problem as well when madshi was taking his break, but forgot to report it. The temporary workaround is to use CTRL+ALT+SHIFT+I & F2 change the default from auto-detect to PC range until you are done watching such files. For the next madVR version, I think it would be better if madVR always assumed RGB to be fullrange when connected to VSFilter.

Last edited by cyberbeing; 18th September 2012 at 17:42.
cyberbeing is offline   Reply With Quote
Old 18th September 2012, 17:42   #13915  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Ok, now I understand the problem better. It shouldn't be hard to fix that without having to specifically look for (xy-)VSFilter.
madshi is offline   Reply With Quote
Old 18th September 2012, 21:07   #13916  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by madshi View Post
Do you still have these problems? If so, can you sum them up again for me? Your reports are so spread over this thread that I lost overview.

Well, with my sample it still happens using madVR antiringing v6, which is expected I guess since nothing else changed.
Nevcairiel said this:
Quote:
Originally Posted by nevcairiel View Post
That file is flagged as full-range content in its headers, which means madVR won't perform range expansion.
You can temporarily fix it by pressing Ctrl-Alt-Shift-I a number of times to select TV as input range, but its really just a badly encoded file.
Which I have no reason to doubt. So in this case either EVR somehow figures out that it is 16-235 file or treats all as if they were.

This reminds me of my other problem, that turned out to be potplayers video processing filter hacking image quality. So I disabled it and now I don't have brightness/contrast/saturation settings (also effects like mirror/rotate), but they still would be useful, because some files still don't reach black (or 16 I guess with cropped range). So basically modifying brightness is what I miss most from madVR at the moment. I suppose effects could be added by anyone when you add pixel shader script support. (Maybe its impossible for the player to modify brightness without butchering upscaling, but anyway it always does so. )

The recent anti-ringing builds make me wonder: is NNEDI3 resizing considered? You seemed to like it in the non-ringing Lanczos thread. (Me too.)
mzso is offline   Reply With Quote
Old 18th September 2012, 21:09   #13917  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,342
Quote:
Originally Posted by mzso View Post
The recent anti-ringing builds make me wonder: is NNEDI3 resizing considered? You seemed to like it in the non-ringing Lanczos thread. (Me too.)
Implementations so far are way too slow for realtime usage. Its sad.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 18th September 2012, 21:31   #13918  |  Link
mzso
Registered User
 
Join Date: Oct 2009
Posts: 930
Quote:
Originally Posted by nevcairiel View Post
Implementations so far are way too slow for realtime usage. Its sad.
Oh. I didn't think of that. (for some reason)
Well, maybe in the not to near future then.
mzso is offline   Reply With Quote
Old 18th September 2012, 21:47   #13919  |  Link
Fullmetal Encoder
Registered User
 
Join Date: Jan 2011
Posts: 107
Quote:
Originally Posted by nevcairiel View Post
Implementations so far are way too slow for realtime usage. Its sad.
If memory serves, I was once able to get QTGMC using NNEDI3 running DVD material on my Core i7 860 system at almost 30 fps with madVR.

What we need is to abstract the algorithms to run in GPU hardware with CUDA
Fullmetal Encoder is offline   Reply With Quote
Old 18th September 2012, 22:18   #13920  |  Link
madshi
Registered Developer
 
Join Date: Sep 2006
Posts: 9,140
Quote:
Originally Posted by mzso View Post
Which I have no reason to doubt. So in this case either EVR somehow figures out that it is 16-235 file or treats all as if they were.
EVR treats all as if they were 16-235. You can tell madVR to behave identical: Just press Ctrl+Alt+Shift+i to switch input levels to TV, then press F2 to save your changes. From then on madVR will also treat all videos as 16-235.

Quote:
Originally Posted by mzso View Post
This reminds me of my other problem, that turned out to be potplayers video processing filter hacking image quality. So I disabled it and now I don't have brightness/contrast/saturation settings (also effects like mirror/rotate), but they still would be useful, because some files still don't reach black (or 16 I guess with cropped range). So basically modifying brightness is what I miss most from madVR at the moment. I suppose effects could be added by anyone when you add pixel shader script support. (Maybe its impossible for the player to modify brightness without butchering upscaling, but anyway it always does so. )
Stuff like brightness/contrast controls etc are on my to do list. And yes, pixel shader script support, too.

Quote:
Originally Posted by mzso View Post
The recent anti-ringing builds make me wonder: is NNEDI3 resizing considered? You seemed to like it in the non-ringing Lanczos thread. (Me too.)
I'm not sure if it is well suited to the way GPUs work (every pixel should ideally run through the same code). I might look into this in the future, but probably not soon.
madshi is offline   Reply With Quote
Reply

Tags
direct compute, dithering, error diffusion, madvr, ngu, nnedi3, quality, renderer, scaling, uhd upscaling, upsampling

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 14:14.


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