Kodi Community Forum
Bug Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Raspberry Pi (https://forum.kodi.tv/forumdisplay.php?fid=166)
+---- Thread: Bug Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? (/showthread.php?tid=374494)



Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - devkid - 2023-09-21

Hi everyone,

I think there is a bug making Kodi ignore the Limited/Full range setting when DRM Prime decoder is enabled, making Kodi always output in Full range.

But from the beginning:
I recently installed LibreELEC (11.0.3 (RPi4.arm)) to my RPi4 and I tried to set up video levels correctly. I read this page:
https://kodi.wiki/view/Video_levels_and_color_space#:~:text=Video%20levels%20are%208bit%20values,we%20call%20this%20limited%20range.

What I have learned is that the best setting is:
Kodi: Limited
GPU: Full
TV: Limited

The GPU was set to "auto" by default, and I was unsure if this actually works with my >15 years old LCD, so I set GPU to "Full" via modetest in autostart.sh. (EDIT: Before, I wrote I set GPU to "Limited" which was wrong!)

Anyway, the problem:

Regardless if I configure Kodi to "Limited" or "Full", when playing video, it always looks the same. The actual Kodi menus and when viewing images change as expected.
So I think the video level settings in Kodi are ignored when playing video files using RPi4.

I could get it to work by disabling DRM Prime Decoding in the Kodi settings. When I do that, then the video looks (and changes) as expected in regard to the video level setting.
When enabling DRM Prime, then I get the same looks as when putting Kodi to "Full".
So, I think when DRM Prime is enabled, then Kodi always outputs video as "Full" even when Kodi is configured to "Limited". I hope, I could make myself clear Smile

PS.
When doing the same on my Intel NUC, then the Kodi Full/Limited setting has an effect when showing videos. So I think this bug (if it is a bug) is RPi specific.


RE: Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - popcornmix - 2023-09-22

Not a bug. The limited/full setting only affects GL rendering.

DRM uses a different path and this shouldn't be required.
The decoded video plane includes a colourspace attribute which describes full/limited encoding.
And this gets through to the (kernel) DRM display driver which will handle signalling full/limited range
over hdmi. And if not supported, it will convert to the range supported by display.


RE: Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - devkid - 2023-09-22

Hm, ok, so what you say is that when watching videos with DRM, then the Kodi limited/full setting is irrelevant and stuff should automatically be "correct"?

So either:
* If the TV supports it: Kernel will tell the TV to use limited or full and the TV will ignore what is configured in its own settings
* Otherwise, the kernel will detect what is configured on the TV (so, if TV expects limited or full) and converts the video accordingly

But the problem still is as described: When having DRM enabled on Kodi, then I am quite sure the video reference levels are reaching the TV as "full" (even when TV is configured to "limited"). Setting the video level setting on the TV clearly makes a difference (so not overridden by HDMI) and it is only correct when setting it to "Full" on the TV.

And another sign of the problem: The video levels between watching video and Kodi UI or watching images are different. They should be same right? So, either I manually misconfigured the GL-path or the DRM-path did something wrong with the auto-detection, right? As said, for the GL-path I set Kodi to "limited", GPU to "full" and TV to "limited", so I am quite sure this is correct?

PS.
I was wrong when I said the problem only happens on my Pi but not on my NUC: It seems DRM on my NUC defaulted to "off". When I enable it manually then I am having the exact same behavior that the video seems to be always sent as "full" to the TV (while the TV is configured to "limited").
Related question: Should I enable DRM on the NUC or should it let it off?

My two setups:
1. NUC7i5BNK + OLED55C8LLA 
2. Rpi4 + LE40M86BD (stone age)


RE: Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - devkid - 2023-09-22

Is there a way to manually force the DRM path to output as "limited"? I could then at least confirm if the behavior I am observing is correct or not. When I could force it to "limited" then the picture should not change on my TVs because DRM is currently supposed to output "limited" anyway.


RE: Kodi Setting RGB Limited/Full not respected for videos when using DRM Prime? Bug? - popcornmix - 2023-09-22

It shouldn't be necessary unless the display is not respecting the full/limited signalling in the AV Infoframe.
But see here for how to manually set it.


This forum uses Lukasz Tkacz MyBB addons.