You are not logged in.

#1 2017-05-10 08:42:55

hifi25nl
Member
Registered: 2011-05-07
Posts: 263

Mpv, Intel graphics and color space

I am trying to set the right color space for movies with an Optoma projector, mpv and Intel graphics 530 (processor i7-6700).
Following the nice  kodi wiki here
http://kodi.wiki/view/Video%20levels%20 … or%20space
where is suggested to use the combination limited, full, limited, now my system is configured like this:
1) MPV set to limited with "video-output-levels=limited" in mpv.conf
2) GPU set to full with

xrandr --output HDMI-2 --set "Broadcast RGB" "Full"

3) Optoma projector set to limited, that is 16-255

The result however is dark with "crushed black".  Something wrong?

Offline

#2 2017-05-10 09:36:55

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Mpv, Intel graphics and color space

This sounds like the GPU is not sending limited like what you've set for the projector. Does the projector have a setting where it uses full range, 0-255, not that reduced 16-235 one? That should fix it.

Or you could set that "Broadcast RGB" property in xrandr to limited. How that is called exactly is printed somewhere next to it when you do "xrandr --verbose", if I remember right (not using Intel here so can't check).

Last edited by Ropid (2017-05-10 09:37:48)

Offline

#3 2017-05-10 21:16:57

hifi25nl
Member
Registered: 2011-05-07
Posts: 263

Re: Mpv, Intel graphics and color space

It seems that 0-255 on projector did solve the probem. Most probably Intel graphics is not sending the right color space.

Offline

#4 2017-05-13 22:27:52

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Mpv, Intel graphics and color space

"Broadcast RGB" should always match with the expectation/setting of your sink (monitor, projector...). So it was YOU who was doing it wrong.

Offline

#5 2017-05-14 07:27:49

hifi25nl
Member
Registered: 2011-05-07
Posts: 263

Re: Mpv, Intel graphics and color space

From the wiki above:
"Out of the eight combinations, only three have correct video levels by the time they reach the TV:
Full,Full,Full -- Both Desktop & Video Content will look correct but video content is also scaled during the Y'CbCr --> RGB color space transformation. BtB & WtW are clipped so calibration will be more difficult
Full, Limited, Limited -- This should be avoided since there are two levels of scaling which will likely cause unnecessary banding.
Limited, Full, Limited -- Best option for embedded video player as there is zero video content scaling during the Y'CbCr --> RGB color space transformation. BtB & WtW are preserved to make calibration easier. If using a Desktop it will look overly dark"

Since I have chosen the third option, I have set mpv player to limited, GPU to full with "Broadcast RGB" "Full" and Projector to limited 16-255.

The only options with full GPU and full monitor are these:
Full, Full, Full -- Video Level CORRECT : WtW & BtW Clipped, Single scaling
Limited, Full, Full -- Video Level WRONG : Washed Out Colors

Really I am using now the second one and wrong,: Limited, Full, Full  because if I remove the line video-output-levels=limited form mpv  I have crushed blacks beyond repair (increasing brightness will not solve this)

So, you understand, I am a little confused.I know, there is some wrong, but where: in the kodi wiki, in the Intel HDMI output, in the mpv option?

Last edited by hifi25nl (2017-05-14 07:31:47)

Offline

#6 2017-05-14 13:44:27

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Mpv, Intel graphics and color space

Honestly I don't find the wiki explains it very clearly anyway. I couldn't really parse it (maybe it's because i didn't bother to read it thoroughly because of its length).

First of all, in the general sense, the driver setting should always match with your sink setting. The tricky stage is between the player and the driver.

I suspect the reason that the wiki suggested "Limited, Full, Limited" is:

1. Setting the video player output to Limited prevents the player from doing a Limited -> Full conversion
2. The driver will always expect everything you see on X to be in Full range (there's a reason why full range is also known as "PC level"), no matter when you have "Broadcast RGB" set to Full or Limited, so "Broadcast RGB = Full" always means "passthrough", and "Broadcast RGB = Limited" always means "perform a Full to Limited conversion" (not clipping, well hopefully not, ask the Intel guys)

Since even when you have your video player output set to Limited, the driver will still consider the video player output to be in Full range, in some sense that has made the video player output be "encapsulated" as Full range signal, and when the signal is being sent to the sink (that is set to expect Limited range signal), the Full range signal would be clipped and hence the video player output will be "decapsulated".

If you are not yet lost, you will notice that ultimately "Limited, Full, Limited" will cause NO range conversion or clipping to the video player output at all, hence in its highest quality. That said, it does NOT mean everything else (e.g. Browser content, UI elements...) on the screen will not be "black crushed" as expected: https://ptpb.pw/iIwm.png

If your video player output is ALSO "black crushed" when you have "Limited, Full, Limited", I suppose there would be basically two possible reasons:
1. the output range option of the video player does not work as expected; either it is bugged or you misinterpreted something
2. somehow mpv managed to inform the driver that the video output is in Limited range, so the driver actually performed color range conversion (Limited to Full) to the output because you have "Broadcast RGB" set to Full, before the signal is being sent to the sink; so "actual" (not in a "decapsulating" sense) clipping occured to the video player output as well when the signal reach the sink.

P.S. Btw color space and color range are not the same thing.

EDIT: while "Limited, Full, Full" will almost certainly not work well for the video player output, "Full, Full, Full" should not cause any big trouble, since that only causes a Limited to Full range conversion performed in mpv, it might technically cost you some accuracy to the colors but it should not cause "black crush", if none of the "stakeholders" are doing something wrong.

Last edited by tom.ty89 (2017-05-14 14:31:13)

Offline

#7 2017-05-17 10:49:10

hifi25nl
Member
Registered: 2011-05-07
Posts: 263

Re: Mpv, Intel graphics and color space

Thanks for the explanation.

I have found the right solution here:
https://forums.plex.tv/discussion/19760 … re-quality

--> the Intel VAAPI driver now supports the Video 16:235 pass-through option which should be used over "FULL" as this will give you the optimal result regardless of the capability of your TV to look at infoframes and/or override them. Run the command xrandr --output HDMI1 --set "Broadcast RGB" "Video 16:235 pass-through"

So a working configuration is this:

1) Mpv with video-output-levels=limited in mpv.conf
2) Intel GPU set to 16-235 pass-though with  xrandr --output HDMI1 --set "Broadcast RGB" "Video 16:235 pass-through"
3) Projector set to AUTO

Offline

Board footer

Powered by FluxBB