Linux Color range, color space and Kodi
#1
Hello everyone,

I'm using Kodi 15.2 under Ubuntu 12.04 LTS (custom CLI installation with added X11).

I recently bought a new TV and read about the advantages of using a Limited RGB Range (16-235) all the way through the home cinema so that there's no intermediate range compression or expanding taking place.

I successfully set Kodi (Settings -> System -> Video) and my TV to the Limited Range.
My question is: Do I have to set this up for anything else on my PC like the Nvidia display driver (nvidia-current) or X11?

Although I have no problem with controlling a CLI Ubuntu installation, I'm no Linux video expert and have no idea how the whole process takes place. Maybe Kodi already talks to the display driver itself so that setting the checkbox in Kodi already did the whole job?

Thanks for input on this!
Reply
#2
To output limited Range, you can choose "Use Limited Range" in kodi - that will influence Nvidia's VDPAU Mixer to output studio colors.

Edit: Also of course make sure that nvidia's "UseColorMode" "limited" does not introduce further scaling ... to the colors as this would render you without correct black values.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Thank you very much for your answer. I've already set "Use Limited Range" in Kodi.

I'm not sure I know what "nvidia's UseColorMode" is and how to check whether it introduces further scaling. Can you help me out?
Reply
#4
Do you see all back values? Is black, black?

I would try the following two options:

a) kodi: Use Limited false
/etc/X11/xorg.conf like:

Code:
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    Option         "DynamicTwinView" "False"
    Option         "NoLogo" "true"
    Option         "ModeValidation" "NoVesaModes, NoXServerModes"
EndSection
    
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync      26-81
    VertRefresh    24-75
    ModeLine       "1920x1080_24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    ModeLine       "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    Option         "DPMS"
    Option         "DPI" "96 x 96"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "nvidia0"
    Monitor        "Monitor0"
    Option         "ColorRange" "Limited"
    Option         "ColorSpace" "RGB"
    DefaultDepth    24
    Option         "ModeValidation" "NoVesaModes, NoXServerModes"
    Option         "ExactModeTimingsDVI" "True"
    SubSection     "Display"
       Depth       24
       Modes      "1920x1080_60" "1920x1080_24" "1920x1080_23.976"
    EndSubSection
EndSection
    
Section "Extensions"
   Option         "Composite" "Disable"
EndSection

b) kodi: Use Limited true
/etc/X11/xorg.conf like:
Code:
Section "Device"
    Identifier     "nvidia"
    Driver         "nvidia"
    Option         "DynamicTwinView" "False"
    Option         "NoLogo" "true"
    Option         "ModeValidation" "NoVesaModes, NoXServerModes"
EndSection
    
Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "Unknown"
    HorizSync      26-81
    VertRefresh    24-75
    ModeLine       "1920x1080_24" 74.250 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    ModeLine       "1920x1080_23.976" 74.175 1920 2558 2602 2750 1080 1084 1089 1125 +hsync +vsync
    Option         "DPMS"
    Option         "DPI" "96 x 96"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "nvidia0"
    Monitor        "Monitor0"
    Option         "ColorRange" "Full"
    Option         "ColorSpace" "RGB"
    DefaultDepth    24
    Option         "ModeValidation" "NoVesaModes, NoXServerModes"
    Option         "ExactModeTimingsDVI" "True"
    SubSection     "Display"
       Depth       24
       Modes      "1920x1080_60" "1920x1080_24" "1920x1080_23.976"
    EndSubSection
EndSection
    
Section "Extensions"
   Option         "Composite" "Disable"
EndSection

Option a) will render Full RGB in kodi and nvidia will scale down for you when outputting Limited.
Option b) will force Full RGB out, but kodi will downscale / use vdpau mixer to output studio level. Issue here: all other applications not kodi will be too dark.

Both settings only make sense if your TV is set to limited range. If the TV is fully range (and you are sure it is), keep kodi on Full, e.g. Use Limited false, but also use the ColorRange "Full" in xorg.conf
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Wow, very helpful. To answer your question: Yes, black looks as black as the TV's frame, which is as black as my eyes can see ;-)
I will still take a closer look at your xorg configuration. Is there any way to check the current output format on-the-fly with some command like xrandr?
Reply
#6
Nope - nvidia is not really xrandr aware in that regard.

Here are some test samples:

a) https://dl.dropboxusercontent.com/u/5572...ipping.mp4
b) https://dl.dropboxusercontent.com/u/5572...ipping.mp4
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
What about "Settings -> System -> Video->Limited Range" with -platform-Raspberri ? I dont have such an entry in the menu? Is this possilbe at all? Just wondering because I have no X,xrandr,xorg.conf on my system...
Reply
#8
The Pi does it right automatically. If not you need to cope with the framebuffer, see config.txt
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Ok thank you. I dont know what I do wrong. I want to set Kodi to use any 50Hz mode (1080p or 720p) but every time I activate it
the image is totaly greyish, no good black, no good highlights. But when I set Kodi Video output to 60Hz colours are perfect, but 60Hz is not good on 50Hz networks, any advice? I tried various settings in config.txt, like hdmi_group=1 (CEA) Mode 19 720p 50Hz: but Kodi shows the same behavior when changing 60Hz/50Hz. (16.0-RC4 Git:2016-02-17-b9a8135) Kodi x32 build (version for Raspberry Pi)
Reply
#10
@pauledd you could try adding:
Code:
hdmi_pixel_encoding=1
to force limited encoding or
Code:
hdmi_pixel_encoding=2
to force full range encoding
Reply
#11
(2016-02-20, 20:30)popcornmix Wrote: @pauledd you could try adding:
Code:
hdmi_pixel_encoding=1
to force limited encoding or
Code:
hdmi_pixel_encoding=2
to force full range encoding

Thank you, that helped! Blush I have now good colors @50Hz with this settings:
Code:
hdmi_pixel_encoding=2
Code:
hdmi_group=0
Reply

Logout Mark Read Team Forum Stats Members Help
Color range, color space and Kodi0