Log in

View Full Version : FAQ: How to correct luminance levels


Pages : 1 2 [3] 4 5 6

cca
4th March 2009, 13:42
Kado's method is how I do it too, use a reference video to catch the black level and use a correction if needed. In the latest ATI drivers, if you use EVR Custom in MPC-HC, all videos regardless if SD or HD are displayed with TV levels, so the 16-235 -> 0-255 [SD][HD] shader is needed for proper levels. The RGB idea is not bad, bit you still have wrong levels if you also want to use DXVA, so I prefer the shader method since it covers all cases.

THX-UltraII
4th March 2009, 13:45
About the ffdshow settings:

I want to know some things about how to set it up correctly:

1. In the Output config I have selected 'High quality YV12 to RGB conversion'. But besides this I HAVE to check one (or more) boxes, I420/IYUV, YV12, YUY2, YVYU, NV12, RGB32, RGB24, RGB16 and RGB15. Which one(s) do I have to check here?

2. Select closest matching colorspace => check or uncheck?

3. Set pixel aspect ratio in output media type => square, check or uncheck?

4. Allow output changes during playback => sqaure, check or uncheck?

THX-UltraII
4th March 2009, 13:51
EDIT:

and than there is the RGB conversion config in ffdshow:

5. YCbCr specification => auto, ITU-R BT.601 or ITU-R BT.709

6. Input Levels:auto, standard, full-range or custom?

7. Output Levels: Computer Monitor or TV/Projector?

mark0077
4th March 2009, 13:54
Kado's method is how I do it too, use a reference video to catch the black level and use a correction if needed. In the latest ATI drivers, if you use EVR Custom in MPC-HC, all videos regardless if SD or HD are displayed with TV levels, so the 16-235 -> 0-255 [SD][HD] shader is needed for proper levels. The RGB idea is not bad, bit you still have wrong levels if you also want to use DXVA, so I prefer the shader method since it covers all cases.

The problem with using this test is, it is using video to test. I thnk THX's and many others problems could be the entire desktop is being output properly. I don't think a video test should be used to initially check display output levels. After the display is confirmed to be getting the right levels, then a video can be used to test video levels.

THX

1. In the Output config I have selected 'High quality YV12 to RGB conversion'. But besides this I HAVE to check one (or more) boxes, I420/IYUV, YV12, YUY2, YVYU, NV12, RGB32, RGB24, RGB16 and RGB15. Which one(s) do I have to check here?

RGB32 :D

2. Select closest matching colorspace => check or uncheck?

If only one is selected this doesn't have any effect anyways, no harm leaving it on anyways.

3. Set pixel aspect ratio in output media type => square, check or uncheck?

I say leave as is. I am not sure about this because I think a recent build of ffdshow may have messed this up. This evening I will be testing aspect ratios to see if this option breaks aspect ratio.

4. Allow output changes during playback => sqaure, check or uncheck?

Leaving as is is fine for me also. Square.

5. YCbCr specification => auto, ITU-R BT.601 or ITU-R BT.709

Well Auto works perfectly for me. Any video content thats less than I think 1024 pixels wide, it will assume its BT.601, everything else it will assume its Bt.709 which is exactly right for me. Most of my material is older Bt.601 material with DVD resolution etc so its method of choosing is perfect for me.

6. Input Levels:auto, standard, full-range or custom?

I think like 0.0001% of material is actuall full-range in origin, and auto here works perfect for me. I think it basically assumes "standard" unless explicitly told otherwise by the info in the video type.

7. Output Levels: Computer Monitor or TV/Projector?

Well this depeneds really. You would normally select "Computer Monitor", meaning extended, BUT if you figure out that your ATI drivers are doign like my drivers did, and outputting in limited range, then TV/Projector will be right (and you will get ugly desktop colors / washed out colors on desktop blacks. You can use all auto settings above, and then use this option here as a test during video playback which setting is correct, and therefore if your drivers are sending you extended or limited.

THX-UltraII
4th March 2009, 13:55
if you use EVR Custom in MPC-HC, all videos regardless if SD or HD are displayed with TV levels, so the 16-235 -> 0-255 [SD][HD] shader is needed for proper levels.Yes, I use EVR Custom in MPC-HC. I thought I did read somewhere that that shader caused some artifacts?

The RGB idea is not bad, bit you still have wrong levels if you also want to use DXVA, so I prefer the shader method since it covers all casesIF I m going to give the RGB method a try I want to know if I use DXVA. How do I know if I use DXVA? (shame on me!) I UNCHECKED all internal MPC-HC filter and added CoreAVC1.9, ReClock and WMV Video Decoder as external filters. Can I assume that I don t use DXVA this way?

THX-UltraII
4th March 2009, 13:56
The problem with using this test is, it is using video to test. I thnk THX's and many others problems could be the entire desktop is being output properly. I don't think a video test should be used to initially check display output levels. After the display is confirmed to be getting the right levels, then a video can be used to test video levels.

So what do you suggest I should do?

mark0077
4th March 2009, 14:06
So what do you suggest I should do?

This is why I suggested just using a black picture, black screensaver, or even easier just set your desktop to black background. It is very clear to me using this method if my gfx card is sending me limited range because the black looks grey. Video tests can't help you out here.

1) So get something pure black filling your screen, an image, or screensaver.

2) Switch between extended and standard on your projector while its been fed this pure black image.

If both modes look the same brightness, your gfx card is sending extended, and you can happily start working on getting your video levels right using whatever method you like.
If both look different (ie standard looks a good bit darker than extended), then your gfx card is incorrectly sending limited and you need to find a fix for that before playing with video levels.

Try it out and let us know does extended/limited give different blacks.

THX-UltraII
4th March 2009, 14:10
I have enough information to go for tonight. More questions will come after tonight I think :p

THX-UltraII
4th March 2009, 14:27
Mark0077:
One more thing before I m going to #^^&%$ up my HTPC tonight :D :

There s also the ffdshow Codecs config. Am I correct that I have to set this all on disabled? Or does ffdshow video decoder in this case not work? I want to keep using CoreAVC and not ffdshow for decoding. So the only thing I want ffdshow to do is do high quality RGB output.

mark0077
4th March 2009, 14:30
Yeah disable them all but set Raw Video (at the bottom of the codecs config), to "All Supported". This will take in your raw video from whatever you like and just do the conversion for you.

But make sure to try the switching between extended / standard trick first though to see if your desktop is sent in full or limited before playing with ffdshow ;) If its outputting full range, then youll have ffdshow setup in 2 minutes literally and you should be getting correct levels from now on. :D

THX-UltraII
4th March 2009, 14:38
Yeah disable them all but set Raw Video (at the bottom of the codecs config), to "All Supported". This will take in your raw video from whatever you like and just do the conversion for you.

But make sure to try the switching between extended / standard trick first though to see if your desktop is sent in full or limited before playing with ffdshow ;) If its outputting full range, then youll have ffdshow setup in 2 minutes literally and you should be getting correct levels from now on. :D

thxz for all your help until now Mark, really appriciate it :thanks:

So tonight I will turn on my pj and my HTPC, set my HTPC to black desktop and see if the black changes when switching for standard to enhanced on my pj right?

IF the blacks are different with the 2 settings I have a problem correct?

THX-UltraII
4th March 2009, 14:39
BTW:

Will my PS3 act fine with the Enhanced setting of my pj you think?

mark0077
4th March 2009, 14:45
thxz for all your help until now Mark, really appriciate it :thanks:

So tonight I will turn on my pj and my HTPC, set my HTPC to black desktop and see if the black changes when switching for standard to enhanced on my pj right?

IF the blacks are different with the 2 settings I have a problem correct?

Yep you have a problem with your graphics drivers most likely (or your pj is... faulty), but most likely your ATi card is sending the entire desktop in the wrong levels.

You can set your PS3 to output Extended or Limited also so if you get Extended working from PC -> Projector, you can set your PS3 to extended also and your sorted and then work on your video levels, which should come after you get the desktop outputting correctly.

I say it will take 2 minutes to get to proper video levels if extended is already working fine for you. It will take 2 hours otherwise (well would take me 2 hours), to track down an ATI hack to get extended range desktop.

Here is how black will look in different scenarios. As you can see, if your Pc is sending limited, then switching display between full (extended) and limited will show a noticible switch from black to grey. Your going to be using this to see if your Pc's desktop is sending limited or full. :D

=====================

Display Full
PC Full
Black will look black.

Display Full
PC Limited
Black will look grey.

Display Limited
PC Full
Black will look black. (but even dark greys will also look black)

Display Limited
PC Limited
Black will look black.

=====================

THX-UltraII
4th March 2009, 14:54
Yep you have a problem with your graphics drivers most likely (or your pj is... faulty), but most likely your ATi card is sending the entire desktop in the wrong levels.I know for 99,99% sure that my projector is ok. So IF the wrong levels are sended to my pj, is it best then to contact ATI to report this as bug?

You can set your PS3 to output Extended or Limited also so if you get Extended working from PC -> Projector, you can set your PS3 to extended also and your sorted and then work on your video levels, which should come after you get the desktop outputting correctly.understood

I say it will take 2 minutes to get to proper video levels if extended is already working fine for you. It will take 2 hours otherwise (well would take me 2 hours), to track down an ATI hack to get extended range desktop.let s hope for the first then!

mark0077
4th March 2009, 14:59
Well I know from nvidia's forums, that the problem is there on nvidia drivers since november last year AT LEAST. I guess there isn't much demand out there to have the ability to select the output levels type of the entire desktop. But the fact the drivers ASSUME one level or the other..... not good enough IMO, can't do any harm to report it.

THX-UltraII
4th March 2009, 15:09
Display Full
PC Full
Black will look black.

Display Full
PC Limited
Black will look grey.

Display Limited
PC Full
Black will look black. (but even dark greys will also look black)

Display Limited
PC Limited
Black will look black.

limited = Normal on my pj and Full = Enhanched right?

mark0077
4th March 2009, 15:10
limited = Normal on my pj and Full = Enhanched right?

Yeah thats it :D

THX-UltraII
4th March 2009, 15:14
pffff, why didn t ATI just put two option in the CCC where you can choose between Limited (Normal :)) and Full (Enhanced). Should be a simple thing to intergrate for engineers @ATI.

THX-UltraII
4th March 2009, 16:05
cca:

You talk about the ffdshow RGB HQ option that this will give troubles with DXVA. Can you tell more about this? How do I know if I use DXVA?

mark0077
4th March 2009, 16:13
Outputting in rgb32 to the renderer stops stuff like DXVA decoding and Hardware De-interlacing from working..... but who cares when you can do both in software. :D (assuming your cpu is fast enough to do them in software)

THX-UltraII
4th March 2009, 16:15
Outputting in rgb32 to the renderer stops stuff like DXVA decoding and Hardware De-interlacing from working..... but who cares when you can do both in software. :D (assuming your cpu is fast enough to do them in software)

thxz, how do I know if I use DXVA? Where is this turned ON/OFF?

THX-UltraII
4th March 2009, 16:23
I will be home from work within 2,5 hours so I will report back then right away!

But let s go over one more time to see if I understand what I have to do (sorry for looking so noobish :stupid:):

1. Set my PJ on Extended
2. Test my desktop to see if the blacks change (get better/blacker) when switching back to the Normal setting on my PJ.
If this results in no difference I m ok and go to step =>
3. config ffdshow so everything I play get outputted in RGB32 HQ.
If 2. results in difference I m not ok and go to step 'freak out' and report back here on the forum ;)

mark0077
4th March 2009, 16:30
I will be home from work within 2,5 hours so I will report back then right away!

But let s go over one more time to see if I understand what I have to do (sorry for looking so noobish :stupid:):

1. Set my PJ on Extended
2. Test my desktop to see if the blacks change (get better/blacker) when switching back to the Normal setting on my PJ.
If this results in no difference I m ok and go to step =>
3. config ffdshow so everything I play get outputted in RGB32 HQ.
If 2. results in difference I m not ok and go to step 'freak out' and report back here on the forum ;)

lol yep thats it. At step 2, if they are different, you may be tempted to leave your pj in "Normal" (but don't) as it will look a fair bit blacker. Set it back to "Extended" and try and find a fix for the problem (or freak out) .... you will benefit in better colors on the desktop, games, web, anything other than video, if you do find the fix and get everything in extended. :D

DXVA will be a setting in your player / decoder. I assume if you have ffdshow outputting rgb32, then dxva will just turn off and your decoder should know about it, and decode in software.... Thats how mpc-hc decoders work for me anyways, ie no settings changes required.

THX-UltraII
4th March 2009, 16:38
Set it back to "Extended" ....you will benefit in better colors on the desktop, games, web, anything other than video, if you do find the fix and get everything in extendedhmmmm, this is something new you say here. So IF it does not work (different blacks on desktop when switching between Normal and Enhanced) and I set my projector on Normal I will not have troubles with video (both hd and sd?) when using the ffdshow RGB HQ option but only with Games, Internet etc? Because that would be fine with me because I ONLY use my projector for watching video content (.mkv, .wmv and video_ts material) and I use my standard monitor for everything else.

mark0077
4th March 2009, 16:46
hmmmm, this is something new you say here. So IF it does not work (different blacks on desktop when switching between Normal and Enhanced) and I set my projector on Normal I will not have troubles with video (both hd and sd?) when using the ffdshow RGB HQ option but only with Games, Internet etc? Because that would be fine with me because I ONLY use my projector for watching video content (.mkv, .wmv and video_ts material) and I use my standard monitor for everything else.

In that case, if you do find the two are different, you can still get proper video levels using ffdshow with the settings described, just need to set the display type option to "TV/Projector". You will be depending on your projector to internally convert this normal/limited range its being fed into the full rgb32 thats eventually pushed onto your projector screen.....

I still prefer the fully extended option and let ffdshow do that conversion. Its really excellent, but your projector would probably do a really good job also.

Its just like, if everything in the chain is the same level, then no conversion should be needed in your pc, can be done at the end by projector. So a few scenarios that should give proper video levels are, ( surely with a few steps missing / debatable.)

Limited / Normal Scenarios
1) limited color video -> limited color output from gfx card -> limited input to projector -> Projector expands to extended internally if its natively extended -> Projected to wall
2) limited color video -> colorspace conversion only with ffdshow to RGB32 (with output type set to TV/Projector) -> limited output from gfx card -> limited input to projector -> Projector expands to extended internally if its natively extended -> Projected to wall

Extended / Full Range Scenarios
3) limited color video -> colorspace conversion and levels conversion ffdshow to RGB32 (with output type set to Monitor) -> extended output from gfx card -> extended input to projector -> Projected to wall

See what your gfx card is outputting first before you decide which of the above is going to be a solution your happy with. ;) The scenario I use is number 3, gives me colorspace conversion and trusted levels conversion all from ffdshow, aswell as extended colors from desktop looking correct for use as PC monitor.

THX-UltraII
5th March 2009, 08:42
So I did some (3 hours!) testing last night. I found out a few important things:

1. Setting a BLACK desktop and switch between 'Standard' and 'Enhanced' on the projector shows no difference at all in the black levels. But it looks like some brighther scenes are slightly different. White seems just a little yellowish. It s so minimal you can t hardly see difference between the two settings but there IS difference.

2. I ve set up ffdshow the correct way (RBG32 output HQ), but I don t see any differences between ffdshow ON or OFF while playing content. This SHOULD give me differences right?

Another question:
How can I make screenshots in MPC-HC to compare after some different settings?

THX-UltraII
5th March 2009, 09:02
I also talked to Spyre (ATI moderator/developer). He says that all I need to do is setup the 'Pixel Format' under the CCC correct. I ve searched the CCC (in advanced) for more than one our last night but really cannot find a setting like this anywhere. Spyre also said that this setting is only available when not using DVI but HDMI. This can t be the problem with me because I use the ASUS HD4350 and I use the direct HDMI out of this card.

mark0077
5th March 2009, 10:24
So I did some (3 hours!) testing last night. I found out a few important things:

1. Setting a BLACK desktop and switch between 'Standard' and 'Enhanced' on the projector shows no difference at all in the black levels. But it looks like some brighther scenes are slightly different. White seems just a little yellowish. It s so minimal you can t hardly see difference between the two settings but there IS difference.

Thats good then IMO. Colors in between will and should look different. But pure black should look the same and pure white should look the same, you can ignore the difference in other colors. They indicate nothing in this test. I am 99% sure your PC and Projector are correctly using Enhanced/Extended mode so you can focus on ffdshow.... which you probably have working fine already :D

2. I ve set up ffdshow the correct way (RBG32 output HQ), but I don t see any differences between ffdshow ON or OFF while playing content. This SHOULD give me differences right?

Well if you don't use ffdshow, your ATI drivers are doing the conversion so they may or may not get it right. You may not notice the difference if they are both doing the conversion correctly, but you can be pretty sure ffdshow is doing a good job if you use that instead. When using ffdshow, make sure to turn off any old pixel shaders you were using that might effect black levels etc as ffdshow is now handling it all.

Also with ffdshow, you may notice slight color differences to those that might appear if your gfx card does the conversion, as ffdshow will do Rec.601 -> Rec.709 conversion so your old standard definition content will look right on our newer displays. You should see an image closer to that of what the director / editor saw when producing the movie. This will be obvious from comparing the screenshots if your gfx card doesn't do this colorspace conversion (don't think either ATI or NVidia can switch between the two on the fly without registry hacks, ffdshow can).

Another question:
How can I make screenshots in MPC-HC to compare after some different settings?

Not sure what the keyboard shortcut is in mpc-hc, but I put my movie full screen and press "Print Scrn". Then in microsoft paint, go edit->paste and save as png to preserve all the detail.

THX-UltraII
6th March 2009, 09:15
Thats good then IMO. Colors in between will and should look different. But pure black should look the same and pure white should look the same, you can ignore the difference in other colors. They indicate nothing in this test. I am 99% sure your PC and Projector are correctly using Enhanced/Extended mode so you can focus on ffdshow.... which you probably have working fine already :DI found out a setting yesterdag in the CCC. It s called Pixel Format and there I can choose:

YCbCr 4:4:4
YCbCr 4:2:2
RGB 4:4:4: Studio (Limited RGB)
RGB 4:4:4 PC Standard (Full RGB)

It already was on RGB 4:4:4 PC Standard (Full RGB) so I think this is the right one correct?

Well if you don't use ffdshow, your ATI drivers are doing the conversion so they may or may not get it right. You may not notice the difference if they are both doing the conversion correctly, but you can be pretty sure ffdshow is doing a good job if you use that instead. When using ffdshow, make sure to turn off any old pixel shaders you were using that might effect black levels etc as ffdshow is now handling it all.How do I make sure that no 'old pixel shaders' are used? You mean the menu shaders in MPC-HC when playing media? This is turned OFF at my system now. Correct?

Not sure what the keyboard shortcut is in mpc-hc, but I put my movie full screen and press "Print Scrn". Then in microsoft paint, go edit->paste and save as png to preserve all the detail.print scren button did the job

mark0077
6th March 2009, 10:27
I found out a setting yesterdag in the CCC. It s called Pixel Format and there I can choose:

YCbCr 4:4:4
YCbCr 4:2:2
RGB 4:4:4: Studio (Limited RGB)
RGB 4:4:4 PC Standard (Full RGB)

It already was on RGB 4:4:4 PC Standard (Full RGB) so I think this is the right one correct?

How do I make sure that no 'old pixel shaders' are used? You mean the menu shaders in MPC-HC when playing media? This is turned OFF at my system now. Correct?

print scren button did the job

I think you are setup perfectly so far :D ffdshow on auto for the rgb settings, rgb32 only selected, high quality conversion selected and your ready to go IMO. One thing I did also because I hate the way DVD's are badly marked as coming from interlaced sources is to "Force Progressive" in the rgb section. This way the 99% of my disks that come from progressive sources get handled properly by the color conversion.

If I do any de-interlacing, I do it with "yadif + double framerate" within ffdshow before this step anyways so I always assume progressive material will be going through the rgb converter. I would advise selecting this also unless you trust your content / decoders deciding between progressive / interlaced. I certainly do not ;) I still advise setting mpc-hc's mpeg2 decoder option "set interlaced flag in output" to on and let ffdshow handle de-interlacing (if you decide to use ffdshows de-interlacing) but at least this will stop mpc-hc doing bad bob de-interlacing on this high percentage of disks, now your in control ;)

ALSO: Just out of interest for future reference, would you mind trying the pixel format "RGB 4:4:4: Studio (Limited RGB)" and let me know if the entire desktop changes. I just want to build up a record in my mind of what ATI / NVidia give in terms of controls. NVidia only give Studio vs Standard for video content that passes through it, NOT the entire desktop. Cheers for that ;)

THX-UltraII
7th March 2009, 12:34
the limited settings gives indeed wrong levels and makes the desktop go outwashed blacks.

mark0077
7th March 2009, 17:45
Excellent, at least ATI gives the setting :D NVidias setting only effects video, ATI users have the setting which effects EVERYTHING :D

I guess its upto you whether you let / trust ATI do your video color conversion or ffdshow.... you can be very confident that ffdshow is doing a great job anyways.

chichazor
8th March 2009, 01:29
In my 9600GT I use the 0-255 option for my monitor and 16-235 for my Sony Bravia, and all videos plays with the correct luminance levels in every display. I am thinking about buy a Ati 4870, ¿are the options in Pixel Format of Catalyst equal of the Nvidia about luminance leves and can I set up for 2 displays?

mark0077
8th March 2009, 03:34
Well I think both manufacturers should provide one option, display output level.

ATI seem to do this according to THX_ULTRA and this handles desktop and video.

NVidia unfortunately only give control over video controls, not desktop. Its a mess. With my nvidia set I use the EDID override in the drivers and use ffshow for color conversion and all is perfect.

iron2000
8th March 2009, 09:54
Looked around and seems like the Pixel Format option for ATI is only for HDMI-HDMI connections (HDMI at monitor to HDMI or ATI HDMI dongle at card).

Don't think it will work for me as its DVI at my monitor.
Theres a HDMI port at the card, thought of getting a 3rd party DVI to HDMI adapter but read that it might not work to get that option in CCC.

THX-UltraII
9th March 2009, 14:28
You can set your PS3 to output Extended or Limited also so if you get Extended working from PC -> Projector, you can set your PS3 to extended also and your sorted and then work on your video levels, which should come after you get the desktop outputting correctly

I ve put my PS3 on extended and now I have proper blacks on the PS3 extended and projector enhanced setting too! However, do you know by chance if the ps3 setting called 'SUPER WHITE' needs to be set to ON or OFF in my scenario?

mark0077
9th March 2009, 14:39
I am not 100% sure on the best setting for this. I think I set it to auto on a friends ps3 after reading that was a good setting, but according to http://manuals.playstation.net/document/en/ps3/current/settings/superwhite.html it doesn't have any impact unless your using Y Pb / Cb Pr / Cr so you should be fine setting it to Automatic maybe if all your using is RGB.

THX-UltraII
9th March 2009, 14:51
thxz

there s no auto setting, only ON or OFF possible

Shakey_Jake33
9th March 2009, 15:18
Sorry if this has been answered, I'm just trying to ensure I have this correct.

In the Nvidia Control Panel, I have enabled Full colour range as described. The side-effect of this is that videos that are designed for a Limited colour range (mostly SD TV content and DVD's) will appear incorrect.

To counter this, we can either force RGB32 in ffdshow (which is CPU-heavy so I'd rather not), or in the ffdshow Video Decoder configuration, go to Picture Properties and tix Luminance Level fix. I'm assuming this changes the Luminance levels for footage above/below a certain resolution.

Do I have that right?

mark0077
9th March 2009, 15:35
Sorry if this has been answered, I'm just trying to ensure I have this correct.

In the Nvidia Control Panel, I have enabled Full colour range as described. The side-effect of this is that videos that are designed for a Limited colour range (mostly SD TV content and DVD's) will appear incorrect.

To counter this, we can either force RGB32 in ffdshow (which is CPU-heavy so I'd rather not), or in the ffdshow Video Decoder configuration, go to Picture Properties and tix Luminance Level fix. I'm assuming this changes the Luminance levels for footage above/below a certain resolution.

Do I have that right?

No, the setting in the NVidia control panel means, "what type of display will you be watching the video content on". So if you select full-range (0-255) the nvidia drivers will use that information from then on and convert any limited range material upto 0-255 for you, and leave any 0-255 material as is. You shouldn't need to change the setting over and over again. It uses a similar technique to ffdshow as far as I know for determining what the origin of any type of video was, ie. limited or extended...

I suppose for me the difference between ffdshow handling color's and levels vs nvidia, is that I feel I can trust ffdshow's more than nvidias because I have found various combinations where nvidia definitely gets the conversion wrong or does a bad job, where as the newer ffdshow versions get it right for 100% of my content at least.

Beliyaal
13th March 2009, 12:15
I have added an option in EVR CP to choose the output space in my newest version (link in signature). The question is if this will break something on NVidia. Right now you can choose 0 - 255 and 16 - 235. Before it would set it to undefined. Maybe I should add an option for this as well?

mark0077
13th March 2009, 12:26
Will choosing one of these output to RGB32? When outputting to RGB the drivers don't do any conversion.

I think the ffdshow rgb conversion options are a great place to start. With its "Auto" settings I can do all of my colorspace and levels conversions without any manual steps. Maybe you could "steal" the code from the latest ffdshow's ;)

IMO in a perfect setup there would be options for

Input colorspace - Auto | Rec 709 | Rec 601 (Already in ffdshow)
Display colorspace - Rec 709 | Rec 601 | Other? (Not in ffdshow, I assume for maybe some technical reason it just assumes the display is Rec 709 calibrated)

Input Levels - Auto | 0-255 | 16-235 (Already in ffdshow)
Display Levels - Monitor (0-255) | TV/Projector (16-235) (Already in ffdshow)

Feel free to correct me on these.

Beliyaal
13th March 2009, 14:53
Will choosing one of these output to RGB32? When outputting to RGB the drivers don't do any conversion.

I think the ffdshow rgb conversion options are a great place to start. With its "Auto" settings I can do all of my colorspace and levels conversions without any manual steps. Maybe you could "steal" the code from the latest ffdshow's ;)

IMO in a perfect setup there would be options for

Input colorspace - Auto | Rec 709 | Rec 601 (Already in ffdshow)
Display colorspace - Rec 709 | Rec 601 | Other? (Not in ffdshow, I assume for maybe some technical reason it just assumes the display is Rec 709 calibrated)

Input Levels - Auto | 0-255 | 16-235 (Already in ffdshow)
Display Levels - Monitor (0-255) | TV/Projector (16-235) (Already in ffdshow)

Feel free to correct me on these.

The renderer always outputs in RGB32. The EVR CP isn't actually doing the color conversion, the EVR processing is, so I don't have any control over the code, I can just set flags about how I want it to output.

I have not found any way to control the color space, because this is a source property, and not a output property. It might be possible with some hacking intercepting the delivery of samples to the input pin to the EVR renderer. It might actually be possible for decoders to tag the format with the color space, and ideally they should take care of it (DXVA_Extended format properties).

Actually I found that ffdshow doesn't seem to be able to correctly preserve BTB or WTW info. It clips the samples when you choose 16-235 as input and 16-235 and output (this is the correct color space). This seems to work correctly with the EVR output though.

mark0077
13th March 2009, 15:23
The renderer always outputs in RGB32. The EVR CP isn't actually doing the color conversion, the EVR processing is, so I don't have any control over the code, I can just set flags about how I want it to output.

I have not found any way to control the color space, because this is a source property, and not a output property. It might be possible with some hacking intercepting the delivery of samples to the input pin to the EVR renderer. It might actually be possible for decoders to tag the format with the color space, and ideally they should take care of it (DXVA_Extended format properties).

Actually I found that ffdshow doesn't seem to be able to correctly preserve BTB or WTW info. It clips the samples when you choose 16-235 as input and 16-235 and output (this is the correct color space). This seems to work correctly with the EVR output though.

Ah I see, I thought you were implementing your own conversion code. In that case I don't see it being necessary to change any inputs. Is the whole point of outputting the flag, to basically give more information to the driver so it will know whether it has to do conversion or not (where as now it guesses based on resolution... but mostly gets it right). I didn't know this was possible :D What do you think the advantages are for us NVidia users? I have to say my nvidia drivers seem to get the levels conversion right most of the time. I never knew there was a problem regarding color levels when using hardware de-interlacing.

When you say ffdshow doesn't preserve BTB or WTW when set to 16-235, this is what its supposed to do. You are not meant to see BTB or WTW because reference black is 16 and reference white is 235. Correct me if I am wrong but ffdshow is doing what it is meant to do, clip off 0-16 and 235-255 and expand whats left to 0-255 for you, as these clipped parts are not meant to contain any data (They can contain data but are not "supposed" to.).

Beliyaal
13th March 2009, 16:29
When you say ffdshow doesn't preserve BTB or WTW when set to 16-235, this is what its supposed to do. You are not meant to see BTB or WTW because reference black is 16 and reference white is 235. Correct me if I am wrong but ffdshow is doing what it is meant to do, clip off 0-16 and 235-255 and expand whats left to 0-255 for you, as these clipped parts are not meant to contain any data (They can contain data but are not "supposed" to.).

As far as I understand it, the TV is supposed to do the clipping. I have set the TV to 0 - 255 level, and you should be able to see the levels below and above 16/235 in this case otherwise the BTB and WTW information is lost. This information is used to represent colors that cannot be represented in the colorspace otherwise.

clsid
13th March 2009, 16:36
The point is to output in the range that your display device expects as input. For old CRT TVs that is 16-235. For computer monitors that is 0-255. Digital TVs can usually be set to either range.

mark0077
13th March 2009, 16:54
As far as I understand it, the TV is supposed to do the clipping. I have set the TV to 0 - 255 level, and you should be able to see the levels below and above 16/235 in this case otherwise the BTB and WTW information is lost. This information is used to represent colors that cannot be represented in the colorspace otherwise.

Well if your TV is setup to accept 0-255 it will do absolutely no clipping. It just takes what it gets and pushes it onto your screen. In this case it is upto your gfx card or ffdshow to translate any of your 16-235 content to 0-255 for you and send that to your display. Your display just pushes this onto the screen and it should look right if your PC did the conversin properly. You shouldn't see BTB or WTW as 16 was stretched to 0 on your tv, and 235 was stretched to 255, the BTB and WTW should be history.

If your graphics card is properly outputting 0-255 (problem with nvidia cards and HDTV's as they send 16-235 without doing the EDID override), and your display is set to 0-255, then with ffdshow display output option set to Monitor / PC (0-255) and video source option set to Standard (16-235) I can confirm it does send 16-235 correctly (it stretches the 16-235 correctly out to 0-255). If ffdshow is doing its job, 16 in your source should be stretched to 0 before it reaches your display and look jet black (and you should see NOTHING below it) even on your 0-255 display, and 235 in your source should stretched to 255 before it reaches your display and be pure white (and you should see NOTHING above it). IMO you should never ever want to see the BTB or WTW even on 0-255 displays. If you do you are doing something wrong and your blacks will be grey, and whites.... grey too...

I wonder would it be beneficial to do a little diagram up to explain this stuff. Took me forever to get into my head whats going on and it confuses the best of us.

Beliyaal
13th March 2009, 17:10
Well if your TV is setup to accept 0-255 it will do absolutely no clipping. It just takes what it gets and pushes it onto your screen. In this case it is upto your gfx card or ffdshow to translate any of your 16-235 content to 0-255 for you and send that to your display. Your display just pushes this onto the screen and it should look right if your PC did the conversin properly. You shouldn't see BTB or WTW as 16 was stretched to 0 on your tv, and 235 was stretched to 255, the BTB and WTW should be history.

If your graphics card is properly outputting 0-255 (problem with nvidia cards and HDTV's as they send 16-235 without doing the EDID override), and your display is set to 0-255, then with ffdshow display output option set to Monitor / PC (0-255) and video source option set to Standard (16-235) I can confirm it does send 16-235 correctly (it stretches the 16-235 correctly out to 0-255). If ffdshow is doing its job, 16 in your source should be stretched to 0 before it reaches your display and look jet black (and you should see NOTHING below it) even on your 0-255 display, and 235 in your source should stretched to 255 before it reaches your display and be pure white (and you should see NOTHING above it). IMO you should never ever want to see the BTB or WTW even on 0-255 displays. If you do you are doing something wrong and your blacks will be grey, and whites.... grey too...

I wonder would it be beneficial to do a little diagram up to explain this stuff. Took me forever to get into my head whats going on and it confuses the best of us.

Yes this is the way I have it set up. If my TV however WAS able to accept 16-235 the correct way to set it up in ffdshow would be: input levels 16-235 and output level 16-235. This ways it could correctly interpret the source YUV as 16-235 and ouput the RBG "non clipped" as 16-235 with some value being below 16 or above 235 (BTB and WTW).

The problem with ffdshow is that it clips to 16-235.

The BTB and WTW information is only valuable when viewing other colors than white and black, as it these colors that might not be representable in the YUV colorspace.

mark0077
13th March 2009, 17:31
Yes this is the way I have it set up. If my TV however WAS able to accept 16-235 the correct way to set it up in ffdshow would be: input levels 16-235 and output level 16-235. This ways it could correctly interpret the source YUV as 16-235 and ouput the RBG "non clipped" as 16-235 with some value being below 16 or above 235 (BTB and WTW).

The problem with ffdshow is that it clips to 16-235.

The BTB and WTW information is only valuable when viewing other colors than white and black, as it these colors that might not be representable in the YUV colorspace.

Sorry I don't understand, could it be something that could be fixed, if so I suggest sending it to the guys in the ffdshow thread.

Are you saying if your TV is set to 16-235 and your source is 0-255 (16-235 with btb and wtw information), that ffdshow doesn't do the 0-255 -> 16-235 conversion properly, it clips the values off instead of scaling from one to the other?

clsid
13th March 2009, 17:35
But if the TV was configured properly then 16 would give pure black and 235 would give pure white. Clipping 16-235 input (treating 0-15 as 16 and 236-255 as 235) should then have no visible difference since lower/higher values should also be pure black/white.

Video sources are almost always encoded as 16-235.