Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 08-25-09, 08:59 PM   #13
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: VDPAU and studio levels (16-235) possible?

It should be possible to support this from VDPAU by using custom color space conversion (CSC) matrices. See the VdpVideoMixer documentation. It shouldn't be that hard.
Maybe you can file a bug report with XBMC?
hl_ is offline   Reply With Quote
Old 08-25-09, 09:22 PM   #14
infernix
Registered User
 
Join Date: Aug 2009
Posts: 2
Default Re: VDPAU and studio levels (16-235) possible?

That would then only work for video rendering through VDPAU. Viewing photos or other formats would not benefit from it. That's why option C in post 7 would be the best solution as you really want to output everything in video levels when the HDTV expects that.
infernix is offline   Reply With Quote
Old 08-27-09, 08:36 PM   #15
hl_
Registered User
 
Join Date: Feb 2009
Posts: 138
Default Re: VDPAU and studio levels (16-235) possible?

Of course, I'm aware of that. However, doing it the way I suggested will work *now* and without any help or updates from NVidia. And if I remember correctly video playback is most relevant here.
hl_ is offline   Reply With Quote
Old 10-04-09, 12:45 PM   #16
LauriM
Registered User
 
Join Date: Dec 2008
Posts: 19
Default Re: VDPAU and studio levels (16-235) possible?

I started having real problems with the PC levels. My receiver upconverts analog sources to video level RGB. My Blu-ray player gives best image quality with video RGB. I would like to use video RGB for my HD DVD player too.

To have everything connected to my receiver and only one HDMI going from receiver to monitor I had to start patching. Attached is a patch for MPlayer's VDPAU video output.

I've added a parameter "studio" to switch to video level output. PC levels are used by default.

There was no support for BT.709, so HD colors were always a bit wrong. I've added simple auto detection based on video resolution and parameter "colorspace" to choose manually. The improvement is easy to see in skin tones.

Image eq controls do not work with studio levels. I was concerned about getting the colors right, so I left the eq out of the conversion matrix. Anyone more knowledgeable - feel free to put them back in.

The code should be easy to add to OpenGL output too, as I borrowed the CSC matrix building code from there and just modified it to support different colorspaces and levels.

Now I just need something like this for MythTV too..
Attached Files
File Type: txt 01_rec709_vdpau.patch.txt (6.9 KB, 197 views)
LauriM is offline   Reply With Quote
Old 10-05-09, 03:16 AM   #17
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: VDPAU and studio levels (16-235) possible?

Quote:
Originally Posted by LauriM View Post
Attached is a patch for MPlayer's VDPAU video output.
If you are interested in getting the patch into MPlayer svn:
* All patches go to mplayer-dev-eng. A few restrictions apply to this mailing-list (no top-posting, line length).
* We don't like forward declarations: Please move update_csc_matrix() up.
* From a quick look, colour spaces and studio are independent: So please send one patch first, then a second one after the first was applied.
* Changing default behaviour often is a reason for extra discussion. So I would suggest to make VDP_COLOR_STANDARD_ITUR_BT_601 the default, this may be changed in a subsequent patch.

Carl Eugen
cehoyos is offline   Reply With Quote
Old 10-05-09, 05:46 AM   #18
LauriM
Registered User
 
Join Date: Dec 2008
Posts: 19
Default Re: VDPAU and studio levels (16-235) possible?

Thank you for your advice. I think getting this into svn would be a good thing.

I'll update the patch and post it with some questions when I have a moment. I'd like to add something similar to vo_gl too and I think the eq should probably be fixed.
LauriM is offline   Reply With Quote
Old 10-05-09, 06:31 AM   #19
cehoyos
FFmpeg developer
 
Join Date: Jan 2009
Location: Vienna, Austria
Posts: 467
Default Re: VDPAU and studio levels (16-235) possible?

Quote:
Originally Posted by LauriM View Post
I'll update the patch and post it with some questions when I have a moment. I'd like to add something similar to vo_gl too and I think the eq should probably be fixed.
Just don't forget: Smaller patches are more likely to get accepted, and patches implementing more than one feature will be refused.

Thank you for your efforts, they are very welcome, Carl Eugen
cehoyos is offline   Reply With Quote
Old 10-10-09, 09:47 AM   #20
LauriM
Registered User
 
Join Date: Dec 2008
Posts: 19
Default Re: VDPAU and studio levels (16-235) possible?

The first patch got thoroughly improved by review on the list, but hasn't yet been accepted into svn.

I've implemented similar functionality for vo_gl too, but it's quite hacky still. It is however possible to get bt.709 and studio level RGB out from it too. I'll attach a patch here in case anybody is interested. Use something like "-vo gl:yuv=2:colorspace=0:studio" for proper colors and studio levels.

Here's a sample of the difference using the right color space makes:
LauriM is offline   Reply With Quote

Old 10-12-09, 03:45 AM   #21
jyavenard
MythTV developer
 
Join Date: Mar 2006
Posts: 413
Default Re: VDPAU and studio levels (16-235) possible?

LauriM, using your code as basis, I added those features to MythTV as well.

You mentioned http://avisynth.org/mediawiki/Color_conversions

However, the value for the various colour coefficient that you are using aren't the same. Any particular reasons for this ?
jyavenard is offline   Reply With Quote
Old 10-12-09, 04:03 AM   #22
LauriM
Registered User
 
Join Date: Dec 2008
Posts: 19
Default Re: VDPAU and studio levels (16-235) possible?

Quote:
Originally Posted by jyavenard View Post
LauriM, using your code as basis, I added those features to MythTV as well.
Excellent, thank you!

Quote:
You mentioned http://avisynth.org/mediawiki/Color_conversions

However, the value for the various colour coefficient that you are using aren't the same. Any particular reasons for this ?
I switched to slightly different values that are shown on Wikipedia as they gave results closer to VDPAU. I don't know which ones are correct - or if it even makes any difference in the final values as the range is pretty small..
LauriM is offline   Reply With Quote
Old 10-12-09, 06:48 AM   #23
jyavenard
MythTV developer
 
Join Date: Mar 2006
Posts: 413
Default Re: VDPAU and studio levels (16-235) possible?

Quote:
Originally Posted by LauriM View Post
Excellent, thank you!


I switched to slightly different values that are shown on Wikipedia as they gave results closer to VDPAU. I don't know which ones are correct - or if it even makes any difference in the final values as the range is pretty small..
So are you going to finish your patch and calculate the magic formula to support eq. when using studio level ?

Edit: thinking about it, if someone goes on the trouble to set proper studio level, it's not too play with changing the eq. settings
jyavenard is offline   Reply With Quote
Old 10-12-09, 07:10 AM   #24
LauriM
Registered User
 
Join Date: Dec 2008
Posts: 19
Default Re: VDPAU and studio levels (16-235) possible?

Quote:
Originally Posted by jyavenard View Post
So are you going to finish your patch and calculate the magic formula to support eq. when using studio level ?
Check out the vo_gl patch above, it keeps the existing eq.

Quote:
Edit: thinking about it, if someone goes on the trouble to set proper studio level, it's not too play with changing the eq. settings
Yeah, I think it's more important to just output correct values and calibrate the monitor.

I wasn't sure if the vo_gl eq code is ok with studio levels, so I didn't put it in the vo_vdpau. I don't think their eq really matches what monitor settings usually do.

I'll see if I have time to work on the patches still. The custom matrix stuff would need some work to use common code with vo_gl and it looks like quite a mess - it doesn't even use its own common code everywhere.
LauriM is offline   Reply With Quote
Reply


Thread Tools

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 -5. The time now is 03:26 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.