View Full Version : 0-255 vs 16-235 question
madhatter300871
17th February 2011, 00:41
Hi
I ll try to keep this brief and to the point.
Imagine I have a video encoding with a colour scale of 16-235 (I know that's not a very concise description, please don't rip this apart, I think you know what I mean here).
I play the video into a projector (which, as fas as I can tell is expecting colour levels in the scale of 16-235).
If I set my PC to output a scale of 0-255 (either in ffdshow for example, or the nvidia control panel or wherever) what happens ?
Is it :-
A. The PC re-scales the video, spreading out the colour levels across the range of 0-255.
B. the PC outputs the full colour scale (0-255) but as there are no colours lower than 16 or higher than 235 in the video nothing really happens anyway.
Conversely :-
Does the projector receive the video and anything lower than 16 is just set as the projectors lowest black and anything over 235 is just set as the projectors highest white, or does it actually re-scale the video so that 16 is now shown as grey and 235 is saturated white (becasue i have incorrectly told the PC to output 0-255 when the video is only 16-235).
Hope that makes sense.
It's just that my projector has 2 settings for the hdmi input, called "level 1" and "level 2". The manual is not forthcoming but, after some playing, it is evident that its the colour scale that the source outputs.
When i swap between the two I can see whites get saturated and blacks go grey, but it all depends on what I set the PC to output.
In fact, are all blu-rays in the range 16-235 ? If so, does that mean that 16 is as black as your going to get, and if you output full range then your display wont show black it will only show dark grey ?
WOW, I think I've just asked the same question twice !!
Hopefully you will see my dilemma.
Thanks.
Mixer73
17th February 2011, 03:52
It's just that my projector has 2 settings for the hdmi input, called "level 1" and "level 2". The manual is not forthcoming but, after some playing, it is evident that its the colour scale that the source outputs.
I dunno if I am equipped to answer the whole question but NORMALLY a DVI or HDMI device will use VIDEO levels (ie 15-235) if you are using standard video resolutions like 720/50p, 1080/50i, 1080/60p etc, and PC levels (ie 0-255) at resolutions OTHER than this.
Also very relevant is how your graphics card is set up, in NVidia there's a setting called "treat my device as a HDTV" which will force VIDEO levels as well.
Most important thing is to make sure everything is set to the same level so you don't blow out or crush your material.
Blue_MiSfit
17th February 2011, 03:54
This whole body of questions is rather sticky :)
A few things (as far as I understand them):
1) All BluRays are in fact 16-235, at least if they're properly mastered.
2) The 4:2:0 YV12 must be converted to RGB at some point, whether it's done by your TV/Projector or your PC. This is where scaling to full range etc can come into play.
I wish I had better answers for you :)
Derek
madhatter300871
17th February 2011, 11:35
Thanks for the feedback guys.
Yes, sticky is one way of putting it :confused:
So... my Nvidia panel doesnt have the "treat my device as a HDTV", rather pleasingly it's more direct and I can actually choose an output level of 16-235 or 0-255, but I know what your saying.
And also, I don't think the penny dropped for me until now, off course it all gets converted to RGB at some point (it has to) and that's where you can play with output levels.
I have everything set to 16-235. Thats :-
1. My decoder output (ffdshow).
2. My nvidia panel.
3. My projector input.
So, here is my question slightly re-phrased :-
The PC is definately outputting 16-235, what do I expect to happen when I set my projector to expect 0-255 input ?
Does the projector say "hey ! 0 is my black, so I'll display your 16 as dark grey" thus washing out the blacks.
Conversely if my PC outputs 0-255 and I set my projector to expect 16-235 what do I expect to happen ?
Does the projector say "hey ! 16 is my black, so I'll display your 0-16 as black" thus losing detail in dark areas.
Also, if I set my PC to output 0-255 when the video source is actually 16-235, what do I expect to happen ?
Does the video range get "re-scaled" so to speak, so 16 is now 0, 235 is now 255 and anything in between is "stretched" so to speak. Or does 16 no longer represent black, it simply represents a dark grey.
I'm tweaking and can't quite decide what is the technically correct thing to do. I am moving towards "16-235 on everything", as bluray (in fact all video no ?) uses this range so there is no benefit to using 0-255 (I can live with reduced range on my general desktop).
Any Ideas ?
nm
17th February 2011, 11:42
Since you are converting to RGB at the PC end, wouldn't it make more sense to convert video to the full 0-255 range and set the projector to display that. Then you have both the desktop and video playback at correct levels.
madhatter300871
17th February 2011, 12:34
nm, is there any beneift to this ? Im not converting to RGB at the PC end (am I ?). Do graphics cards only output RGB by the very nature of how they work ?
I thought I was feeding the projector with YV12 with range 16-235 ... is this the illusive point I have been missing ? To be honest I'm not a total noob with all of this but I am definitely missing something here !
So are we saying that the PC only ever outputs RGB, and this being the case I may aswell output full range 0-255 and, like you say, the desktop will benefit ?
If so, what do we mean by "output full range" with relation to video content. Are the colour levels actually "manipulated", so that 16 becomes 0, 235 becomes 255 and eveything in between is re-sampled accordingly .... or is it the case that 0 is black, 255 is white, 16 is a dark grey and 235 is a lighter white so all that happens is blacks become washed out and whites become dull ?
nm
17th February 2011, 13:29
nm, is there any beneift to this ?
- Correct levels for both video and desktop graphics.
- Full color range for RGB graphics without conversions and dithering.
- Possibility of using an advanced YUV->RGB renderer such as madVR.
Im not converting to RGB at the PC end (am I ?). Do graphics cards only output RGB by the very nature of how they work ?
Nowadays with HDMI outputs you can set them to display in either RGB or YUV formats, but the latter could mean multiple conversions between YUV and RGB along the way. That certainly happens for everything but video, but also some (most?) video renderers might not know what the driver is up to, so they will convert to RGB first; then the driver converts everything to YUV and finally the projector converts back to RGB.
Better make it just one YUV->RGB conversion for video playback and no conversions for other graphics.
I thought I was feeding the projector with YV12
There should be a setting for YCbCr 4:2:2 output in the driver. Have you selected that option or not?
If so, what do we mean by "output full range" with relation to video content. Are the colour levels actually "manipulated", so that 16 becomes 0, 235 becomes 255 and eveything in between is re-sampled accordingly .... or is it the case that 0 is black, 255 is white, 16 is a dark grey and 235 is a lighter white so all that happens is blacks become washed out and whites become dull ?
Both alternatives are possible depending on what the video renderer and the driver have been set to do.
madhatter300871
17th February 2011, 15:44
nm, thanks. Interesting info.
I'll have a play this evening I think, with the emphesis on outputting RGB from the PC. I do use madVR as it happens with MPC-HC.
So I will set up as follows :-
1. Play video with MPC-HC.
2. Use madVR as renderer in MPC-HC
3. Set ffdshow to convert to full range RGB (0-255)
4. Set my nvidia control panel to output full range RGB (0-255)
5. Set my projector to expect full range input.
Hopefully I'll see an improvement. Not that its really bad, I just feel I could get more detail in the dark areas.
I'll report back for interests sake.
Thanks alot :)
P.S. .... it's never straight forward is it !
nm
17th February 2011, 16:45
1. Play video with MPC-HC.
2. Use madVR as renderer in MPC-HC
3. Set ffdshow to convert to full range RGB (0-255)
4. Set my nvidia control panel to output full range RGB (0-255)
5. Set my projector to expect full range input.
Sounds like a plan except for point 3, which isn't necessary if you are using madVR. You don't want to convert to RGB with ffdshow but with madVR, which can be set to output full range RGB (PC levels).
madhatter300871
17th February 2011, 17:39
OK. I didn't realise this. I don't remember seeing this option in the MPC-HC output settings page, the only option I have there for madVR is "D3D fullscreen" to remove tearing (if you have any). I'll have a closer look.
Out of interest, why do it with madVR and not set ffdshow to do it ?
Also out of interest, what is your video chain ? Where do you do your conversions ?
sneaker_ger
17th February 2011, 18:01
AFAIK madVR does not accept RGB input anyways, so you don't need to change the ffdshow standard settings. It should also ignore any setting in the nvidia control panel.
In short: ditch point 3 and 4.
madhatter300871
17th February 2011, 18:14
sneaker_ger : OK, thanks for that pointer.
Off course there could be another factor at play here, maybe my eyes are just not that good anymore !
What would you suggest I set ffdshow to output. Closest matching colour space ? or maybe YV12 only ?
TinTime
17th February 2011, 18:19
madVR only accepts YV12 so that's how ffdshow (or any other filter) will connect.
So long as you don't disable YV12 out in ffdshow you'll be fine :)
nm
17th February 2011, 18:29
I don't remember seeing this option in the MPC-HC output settings page, the only option I have there for madVR is "D3D fullscreen" to remove tearing (if you have any). I'll have a closer look.
Well, it should output full range by default. The settings dialog can probably be reached through a tray icon?
Out of interest, why do it with madVR and not set ffdshow to do it ?
The main point of using madVR is its high quality, GPU-accelerated YUV->RGB conversion. I don't think madVR even supports RGB input, so if you convert with ffdshow, madVR doesn't get used at all.
You might want to read madshi's first posts to the madVR thread (http://forum.doom9.org/showthread.php?t=146228). And maybe speed read the whole thread if you're interested in this stuff.
Also out of interest, what is your video chain ? Where do you do your conversions ?
I use MPlayer on Linux with monitors that only support full-range RGB input.
madhatter300871
17th February 2011, 21:42
I did speed read madshi's post, there is a hell of a lot of text there !!
Well I have had some success, I have definitely obtained a much better picture on the projector by simply setting the nvidia card to output full range and the projoctor to expect full range. Much much nicer picture ..... hmmm, I'm sure I did this in the past, but anyway ....
I can't get madVR to work when i use ffdshow to decode. Infact, I cant get madVR to work if I deselect all the MPC-HC internal filters.
If i enable all the internal filter, madVR is used, the tray icon appears, i can access all it's settings ... but .... the video is unwatchable, very very jerky. Audio is perfect.
What am I doing wrong to make ffdshow not talk to madVR ? I have not disabled YV12 in the ffdshow settings, infact YV12 is greyed out and cant be unticked.
I have not set ffdshow to convert to RGB.
I think I will use filtergraph and just have a play, see how I can make them talk to each other ....
But please do let me know if you have a hunch what I am setting wrong.
madhatter300871
17th February 2011, 22:49
OK, so to enable YV12 as an output colourspace in ffdshow I have to disable "set interlace flag in output media type".
So, I have now got madVR working while using ffdshow as my decoder.
I have a problem, the playback is jerky in fullscreen mode, even though CPU usage is about 10%-20%.
I'm getting there .... slowly !
By the way, my specs are P4 dual core 3.2GHz, 2GB RAM, Nvidia 8400GS (PCIe)... good enough for video playback surely.
nm
17th February 2011, 23:18
By the way, my specs are P4 dual core 3.2GHz, 2GB RAM, Nvidia 8400GS (PCIe)... good enough for video playback surely.
Do you have 3dLUT enabled in madVR? It might be too much for your GPU. Check the GPU load and search the madVR thread for posts about similar issues.
madhatter300871
17th February 2011, 23:41
nm, I did have it enabled but then i disabled it ... the result is the same, jerky video. I will admit the quality looks better, it seems to be sharper, but its hard to tell with it being so jerky.
What other options reduce GPU load ?
What i will say though is this, I have very good results with the following setup :-
1. MPC-HC set to use the default renderer (which is VMR-7 I think)
2. FFDSHOW set to output only in YV12 colour space.
3. Setting the nvidia card to output full range 0-255 video.
4. Setting the projector to expect full range 0-255 video.
I think its the full range video setting that has made the desperately needed subtle difference. I say subtle, but the result is one of those "eurika" moments, I really do have a very nice picture now.
Still keen to play with madVR and get it working, but much happier with my setup now. Thanks for the pointer about full range.
Topic not closed, still keen to get madVR working to try it out.
TinTime
18th February 2011, 00:25
...Nvidia 8400GS (PCIe)... good enough for video playback surely.
Might be a bit weak for madVR's various scaling options. Try setting luma and chroma scaling to bilinear and see if that helps.
madhatter300871
18th February 2011, 00:44
tintime, yes I was beginning to come to that conclusion as well. I actually changed all the settings to bilinear ... still jerky.
madhatter300871
15th September 2011, 11:08
Hi .. thought I would update this post for anyone interested.
I finally got madvr working well. I now have a new motherboard with P4 quad core, 4G ram (only 3G used as its XP 32 bit) and the same Nvidia 8400gs PCI-e.
I have set the three resizing methods to bilinear and rendering is now smooth and judder free.
CPU load an a full HD movie is about the 20% - 30% mark, the 8400gs is probably working at near maximum but playback is really really good.
I can definitely see a marked improvement over all the other renderers I have used, most noticeably detail in dark areas, colour reproduction and overall sharpness. Couldn't decide if this was a placebo effect so I swapped back and forward between many different settings and sure enough there is a marked improvement.
So my final setup is :-
MPC-HC 1.5.2.3456
Renderer = madVR 0.74
Internal filters = all off
Video decoder = ffdshow
Audio decoder = ffdshow
FFdshow
DXVA decoding = disabled for H264 and VC1
Video decoder codec = libavcodec H264, wmv for VC1
Video decoder output = YV12 only
Audio decoder output = spdif passthrough (to my decoder/amp)
madVR
chroma / luma resizing = bilinear
3Dlut = not used
Output levels = PC (0 - 255)
Nvidia control panel
Video output colour control = controlled by the player
Sanyo Z4 PLV projector
Input setting = L2 (PC levels 0 - 255)
Many subtle changes to brightness, contrast, RGB levels etc etc
I have to say I had a rather large cheesy grin on my face watching a movie last night, playback quality was at last pretty damn good. For the first time in a long time I finally feel I have finished tweaking .....
Mixer73
18th September 2011, 23:35
Sanyo Z4 PLV projector
Input setting = L2 (PC levels 0 - 255)
Many subtle changes to brightness, contrast, RGB levels etc etc
Can I just ask though, what's your resolution & refresh rate, and what's the resolution and refresh rate of your most common content?
madhatter300871
18th September 2011, 23:59
Mixer73 --
Native resolution of the Z4 is 1280x720.
VGA accepts ranges from 640x480 - 1152x900, also 720p, 1080i, 1080p
HDMI accepts 480i, 575i, 480p, 575p, 720p, 1080i, 1080p
V-Freq for HDMI 59.94/60Hz or 50Hz depending on input.
My most common media resolution is 1920x1080, although this is also quite often 1920x800 ish (1080 cropped content), at 23.976fps, I'll check V-Freq of Z4 on my next movie but I think it's 60Hz for this content.
I always output 1280x720, I let the graphics card handle this although I could do the resizing with ffdshow but never saw any visual benefit. The PC does resize "nicer" than the Z4 (in my humble opinion).
Why do you ask ?
madhatter300871
6th October 2011, 14:17
I posted this in another thread but thought it was relevant here also.
I have realised that madVR treats the video like a game, so the settings in the nvidia control panel for desktop brightness/contrast/saturation etc now DO effect the video. I have tweaked these a little with good results, mainly detail in dark areas (that's always been the part I struggle with).
I also have learned that the built in ffmpeg decoders are 'better' (I know thats subjective) than the ffdshow ones so I thought what the heck, and I now decode with them instead.
But my biggest breakthough was the discovery that I can set custom resolutions with the Nvidia control panel. I have configured custom resolutions and have configured MPC-HC to switch to the correct one depending on source video frame rate. My customs resolutions are all 1280x720 and @23.976, @50 and @60.
Although the Z4 manual specifically lists acceptable resolutions, it handles pretty much anything I throw at it without any complaints. The info section of the on screen menu does indeed show 23.9Hz, 50Hz or 60Hz depending on what I am feeding it and playback is really really smooth and judder free now. Those jerks (seen clearly on slow panning scenes) are all but gone.
Incidentally, I have no success in getting it to accept 24P, it always switches to 24i (I didn't even know this existed !). Besides, the few 24p movies that I do have I just play at 23.976 and to be honest, they play great. I think I might try a custom resolution of 74Hz, not sure yet.
And so my setup is now :-
MPC-HC 1.5.2.3456
Renderer = madVR 0.74
Internal filters = all off
Audio decoder = ffdshow
Fullscreen monitor = set to select desired custom resolution
FFdshow
DXVA decoding = disabled for H264 and VC1
Video decoder codec = h264 disabled, VC1 disabled.
Audio decoder output = spdif passthrough (to my decoder/amp)
madVR
chroma / luma resizing = bilinear
3Dlut = not used
Output levels = PC (0 - 255)
Video decoding = ffmpeg
Nvidia control panel
Video output colour control = controlled by the player (irrelevant)
Desktop colour control = tweaked slightly for colour/contrast etc
Custom resolutions set
Sanyo Z4 PLV projector
Input setting = L2 (PC levels 0 - 255)
Many subtle changes to brightness, contrast, RGB levels etc etc
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.