Page 1 of 2

Support for Color profiles

Posted: 21 Jun 2009 21:35
by klumy
VLC could support some color profiles. E.g. Nero Showtime has some pre adjusted profiles like Theatre, Warm...
This would be more comfortable then adjusting these balance controler

Re: Support for Color profiles

Posted: 22 Jun 2009 11:20
by Jean-Baptiste Kempf
Provide settings and I'll do that.

Re: Support for Color profiles

Posted: 02 Jul 2009 23:20
by weinleiche
I cannot give you settings for some theatre or warm profiles. I just stumbled about this topic and was hoping it is a request for a real color managment feature/filter for vlc. In fact it is not, but because I've found no request for this, I think it's ok to post my request here. At least it's somehow similar.

There seems to be no video player for Windows (at least to my knowledge) which respects the ICC-Profile of my monitor for displaying the videos, even VLC with it's generous amount of filters and stuff don't (or I'm too stupid to find it). But in fact that would be _the_ feature for me, because I have a wide gamut monitor and every movie I'm looking at is way to much saturized. This is not just a small cosmetic annoyance, the videos are really ugly due to the wider colorspace the monitor is able to display. And just drilling down the saturation a bit doesn't help much, because the saturation differences aren't linear over the colors.

Are there any plans to implement a filter or option to respect at least the default color profile selected in the windows settings, or even better to be able to select any ICC profile for display?

Re: Support for Color profiles

Posted: 03 Jul 2009 16:46
by VLC_help
Are there any plans to implement a filter or option to respect at least the default color profile selected in the windows settings, or even better to be able to select any ICC profile for display?
AFAIK no one is working on this. But there is multiplatform library available that might work (it is MIT licensed) so in theory this should be doable
http://littlecms.com/

Re: Support for Color profiles

Posted: 04 Jul 2009 00:34
by weinleiche
AFAIK no one is working on this. But there is multiplatform library available that might work (it is MIT licensed) so in theory this should be doable
http://littlecms.com/
Thanks for you answer. This looks very interesting, I wasn't aware of a free library for color management. Cool stuff.

Ok, are there any volunteers? :wink:

Hrmpf.... I really would like to contribute this by myself. But currently I'm very short of time, and my C/C++ knowledge is a bit... erm... rusty :mrgreen: (it's years ago that I've coded in C/C++). Also I'm not sure if I have enough knowledge of all the video handling stuff, never coded anything in this direction.

I would really appreciate if someone would pickup this issue. Otherwise I really have to do it by myself (or at least to try it) but this will surely not be in the next few weeks or even months.

Re: Support for Color profiles

Posted: 24 Jul 2009 12:33
by X-dark
People using MediaPlayer Classic have been able to found a workaround. It does not implies using the system-wide color profile. The trick is to use a DirectX 3D render and applying a custom shader.
It is explained in details here and more quickly there.

It is not as good as using an ICC profile (either the system one or a selected one) but it may be quickier to do.

Anyway, littlecms seems to be easy to use but it would be easyer ot implement by someone who already know VLC internal work.

Re: Support for Color profiles

Posted: 24 Jul 2009 14:07
by VLC_help
I did preliminary GLSL shader support for OpenGL output
http://mailman.videolan.org/pipermail/v ... 49177.html
and I plan to add pixel shader support to Direct3D output later, so shader based approach would work also.

Re: Support for Color profiles

Posted: 24 Jul 2009 14:18
by X-dark
Ok. Thanks for the info. But this approach is IMHO only if nothing is doable with icc profile loading.

Re: Support for Color profiles

Posted: 28 Jul 2009 04:40
by DGMurdockIII
this would make videolan even better if it had this and one more step to being the best video player it can be

Re: Support for Color profiles

Posted: 28 Jul 2009 12:40
by weinleiche
People using MediaPlayer Classic have been able to found a workaround. It does not implies using the system-wide color profile. The trick is to use a DirectX 3D render and applying a custom shader.
I've just managed to test it (don't know if it's a special problem of mine, but one has to use MPC HC instead of simple MPC. With MPC I wasn't able to activate the shaders) and this is a huge improvement. Thanks a lot for pointing this out. It may not be as accuarte as using real color management but it is good enough for a start, and of course much better than without any correction.
Anyway, littlecms seems to be easy to use but it would be easyer ot implement by someone who already know VLC internal work.
I second that. I was already failing on the cross compilation. :roll: As I mentioned above, my free time is very limited currently. If someone would like to take on this, I would appreciate. And although the method with the shaders in MPC is working well, I rather prefer VLC as my video player. So if VLC_help can implement the Direct3D shader support this would be great.

Re: Support for Color profiles

Posted: 28 Jul 2009 12:42
by weinleiche
Ok. Thanks for the info. But this approach is IMHO only is nothing is doable with icc profile loading.
If I understand you're linked sources correctly, it should be possible to read the needed values for the shader calculations out of the ICC profile.

Re: Support for Color profiles

Posted: 28 Jul 2009 13:01
by X-dark
Ok. Thanks for the info. But this approach is IMHO only is nothing is doable with icc profile loading.
If I understand you're linked sources correctly, it should be possible to read the needed values for the shader calculations out of the ICC profile.
Yes. You can read the content of an ICC profile with a program like ICCProfileInspector (http://www.color.org/ICCProfileInspector.zip). Then the needed calculations for the shader is in this XLS file : http://www.megaupload.com/?d=1726XM3X

Re: Support for Color profiles

Posted: 22 Aug 2009 03:23
by Pio2001
Hello,
I would also be happy with color profile management. I've just watched a DVD. I usually don't notice these sublte problems as long as I don't print photos, but this DVD, Ghost in the Shell 2.0, has so much contrast and color shades that the lack of color calibration was quite annoying.

Color management is unfortunately very complicated. In theory, a conversion is done from a source profile into a target profile. In a DVD, the source profile appears to be YCbCr (not sure if it is a profile or just a color space), as defined in ITU 601 ( http://www.dvinfo.net/conf/jvc-gy-hd-se ... d-dvd.html ). The target profile must be the screen profile, built with a hardware measurement device.

In practice, it is much more complicated than that. Hardware calibrators usually install a small loader that applies a correction at Windows' start (if you're using Windows), then, software that support color management convert the data to display from the working color space into the display profile. It is very unclear what part of the correction is applied by the loader, and what part is applied by the software. It seems that the loader corrects the RGB gamma curves, making all values of grey look neutral, and that the software then deals with gamuts.
A big problem is that loaders (they are said to "load the profile into the video card LookUpTable") only act on the main display channel (called "desktop"), and not with video channels, like the "overlay", or whatever. Video card drivers recently introduced advanced display options that allow to load profiles or to act on the overlay, but so far, everything I tried didn't work properly (bad conversion, or no effect at all). These options seem to be in an alpha stage of development.

Therefore building profile management in VLC would mean not only deal with the usual display profile conversion (gamuts), but also display calibration (gamma ?).

I took some pictures of my screen (a high end CRT) showing the DVD in a given software player (all settings on the neutral position, THX chart correct), and the same picture (got with the screen capture option of the player) displayed with and without color management in a classic software (Gimp), through the "desktop" channel, after my screen profile, built with a lacie Blue Eye Pro, have been loaded. This dark scene is very sensitive to calibration.

http://3141592.pio2001.online.fr/pictur ... e-cal1.jpg
http://3141592.pio2001.online.fr/pictur ... e-cal2.jpg

Here, we can see that the main correction is done by the "profile loader", and not by the "color management". On the other hand, for people having large gamut screens, the main part of the correction should be done by the "color management".

Edit : if I "unload" my screen profile from the system (by loading sRGB instead), and set color management off in Gimp, the screen capture have exactly the same color and brightness as the DVD display.

Re: Support for Color profiles

Posted: 22 Aug 2009 22:48
by VLC_help
Direct3D shader (HLSL) support isn't going to happen anytime soon, since Win32 headers are missing definitions like LPD3DXBUFFER and D3DXCompileShaderFromFile (loadlibrary can work around this) + IDirect3DDevice9_CreatePixelShader causes instant crash (I have no clue why).

Re: Support for Color profiles

Posted: 09 Jul 2010 14:39
by eltouco
Hi,

Is there any news on that feature request ?

I would be great to have accurate color rendering in VLC, since I believe that the video rendering in VLC is certainly done by only sending RGB (or YUV) value directly to the video card without using info about the moniteur color profile or the source color profil (for instance in an MPEG stream there is info on the color encoding parameters (ITU 601) hat give the XYZ coordinate of Red, Blue, Green primaries and so on)

thanks for keeping us update

Touco

Re: Support for Color profiles

Posted: 09 Jul 2010 15:32
by VLC_help
I haven't heard anything.

Re: Support for Color profiles

Posted: 09 Jul 2010 19:20
by eltouco
I have a question in order to clarify my understanding of how VLC works for color rendering.

Once the RGB values or YUV values of the image are decoded, they are sent to the video output module.

Let say it is Direct3D.

Does Direct3D take into account the monitor profil ?

Moreover does VLC take into account color information in the media being played ? like different color primaries for instance as defined in ITU 601 for dvd video and ITU 709 for HD video.

I need that in order to write a clear feature request (if necessary)


thanks in advance

Touco

Re: Support for Color profiles

Posted: 10 Jul 2010 14:53
by VLC_help
Does Direct3D take into account the monitor profil ?
No. AFAIK there isn't any drawing API that would automatically use monitor/display device profiles.

Re: Support for Color profiles

Posted: 10 Jul 2010 20:57
by eltouco
Does Direct3D take into account the monitor profil ?
No. AFAIK there isn't any drawing API that would automatically use monitor/display device profiles.
Ok, I think then it is worth to request a color management feature, what do you think ?

This way VLC could have accurate color reproduction, it could solve the problem of people having wide gamut screen. (seen on this forum)
It could also solve the problem of people (for instance on this forum) complaining that their video are too dark (usually because dvd video are intended to be player on a TV whith a gamma (2.5) higher than on a pc screen (2.2) and even higher than a mac screen (1.8 ))

More over VLC could then honestly pretend to be a software for Home Theater PC (I mean for users with a high level of requirement for image quality)

Re: Support for Color profiles

Posted: 16 Jul 2010 14:35
by Jean-Baptiste Kempf
Some shadering work is being done this summer.

Re: Support for Color profiles

Posted: 17 Jul 2010 12:28
by eltouco
Some shadering work is being done this summer.
Cool

I'm a bit litterate in color science and video standards, if needed, I could help by writing a spec on how accuretly handle color in video rendering.

For instance, I don't know if it is well implemented in VLC, but there is a common mistake amongst various video software player, that is the color space of HD video is different from SD video (the way Luma is calculate is different and the Red, Blue, Green primaries are different between SD and HD) therefore the video rendering process should be different when handling SD or HD.

more details on this, on this well explained page :

http://www.glennchan.info/articles/tech ... -space.htm

Touco

Re: Support for Color profiles

Posted: 17 Jul 2010 12:55
by Jean-Baptiste Kempf
Oh, no, the mistake is in the video drivers usually.

Re: Support for Color profiles

Posted: 17 Jul 2010 15:12
by eltouco
Oh, no, the mistake is in the video drivers usually.
Really ? but how the video driver is aware of whether using REC 601 standard (SD video) or REC 709 standard (HD video) ?
You mean this parameter is passed through by VLC to the video driver ?

Re: Support for Color profiles

Posted: 22 Jul 2010 22:34
by DGMurdockIII
take a look at this http://forum.doom9.org/showthread.php?t=154719 and this http://yesgrey.com/ycms.html Color management wiki ( very good info) - http://www.colorwiki.com/wiki/ColorWiki_Home

yCMS is a Color Management System (CMS) that uses 3-dimensional lookup tables ("3D LUTs") to perform the conversion between the input and output color representations.

The idea of using 3D LUTs was due to the intensive computing that needs to be performed when converting video data between different color spaces. When using 3D LUTs all computing is performed offline during its creation. The computed 3D LUTs (three, one for each component) are then written to a file which can later be used, when playing videos or viewing photos, simply by mapping the input data through the 3D LUTs. This way, the conversion can be performed at runtime using lower computational power and leaving more CPU available for other tasks. Since all the computing is performed offline its precision can be increased by using 64bit floating point (per component) through out all the conversion chain.

Windows Color System - http://download.microsoft.com/download/ ... em_API.ppt

Re: Support for Color profiles

Posted: 23 Jul 2010 00:18
by eltouco
take a look at this http://forum.doom9.org/showthread.php?t=154719 and this http://yesgrey.com/ycms.html Color management wiki ( very good info) - http://www.colorwiki.com/wiki/ColorWiki_Home

yCMS is a Color Management System (CMS) that uses 3-dimensional lookup tables ("3D LUTs") to perform the conversion between the input and output color representations.

The idea of using 3D LUTs was due to the intensive computing that needs to be performed when converting video data between different color spaces. When using 3D LUTs all computing is performed offline during its creation. The computed 3D LUTs (three, one for each component) are then written to a file which can later be used, when playing videos or viewing photos, simply by mapping the input data through the 3D LUTs. This way, the conversion can be performed at runtime using lower computational power and leaving more CPU available for other tasks. Since all the computing is performed offline its precision can be increased by using 64bit floating point (per component) through out all the conversion chain.

Windows Color System - http://download.microsoft.com/download/ ... em_API.ppt
thanks for the info, however, ideally VLC should be able to do this conversion internally without the help of an external software