HDMI Black level - Raspberry 4 - Librelelc 10.0.2 - Limited out of the box ?

  • Hi,

    Could any body confirm that, out of the box, Librelec 10.0.2 on a Raspberry 4 will use the limited HDMI Black level please ?

    There is a setting in the system menu but it seems to do more arm than good.

    Should I mess with the config file and the hdmi_pixel_encoding settings (I've read it is not taken into consideration with the PI 4 and this version of Libreelec) ?

    My TV is a LG C1 and I'd like to set it up correctly (not a fan of "auto" in the tv settings).

    Thanks

  • Yes - as standard when plugged into a regular HDMI TV that supports Limited Range video (and tells the Pi it does via EDID - which they all do) - the Pi 4B will output Limited Range (16-235 in 8-bit, 256-3760 in 12-bit - and 64-940 in 10-bit if that applies) which is what is expected as standard by consumer HDMI displays.

    The Kodi 'Limited' menu option is confusing - I believe it's designed for x86 boxes with GPU drivers that won't output 16-235, and only output 0-255, and it allows you to output 16-235-within-0-255 - allowing displays that only expect 16-235 to work correctly.

    (These days most displays and sources will support InfoFrames that mean the source can tell the display whether it's Limited or Full range video, and most consumer TVs will accept both, and flag that they do. As all consumer video - DVD, HD and UHD Blu-ray, OTT streaming, DVB/ATSC/ISDB TV is Limited - whether SDR or HDR - keeping things Limited makes sense)

  • Depends what 'Auto' you are talking about.

    On my Sony FALD UHD HDR TV using 'Auto' for Limited/Full, Rec 709/Rec 2020, and SDR/HDR10/HLG works OK on almost everything. Some platforms don't signal HLG properly - but there are fewer of those now.

    Most platforms are correctly flagging video range using HDMI InfoFrames etc (Limited vs Full), gamut (Regular Rec 709 vs Wide Color Gamut Rec 2020), EOTF (i.e. HDR flavour) and most TVs correctly interpret these now.

    When it comes to other 'Auto' stuff like noise reduction, 'picture mode', contrast enhancement, black level etc. I disable all of those and set my TV up using calibration discs (and if I have time a probe - though that's easier for SDR than HDR)

  • If you want to set the output to full range and 12bits, you can do so using modetest:

    # Broadcast RGB:

    # flags: enum

    # enums: Automatic=0 Full=1 Limited 16:235=2

    modetest -M vc4 -w 32:Colorspace:12 -w 32:"max bpc":12 -w 32:"Broadcast RGB":1

    I have a corresponding entry in my autostart.sh script, of course with ()& around the statement in order to run in background.

    The id 32 goes for hdmi0, for hdmi1 use id 41.

  • I'd recommend sticking with 16-235 (or the 12-bit equivalent which will be 256-3760 - best thought of as 16.00-235.00) as that is the level space that consumer video (SD, HD and UHD, and SDR and HDR10/10+/HLG) is distributed in, and it's the core standard for video throughout the production and distribution chain.

    If you scale 16-235 content to 0-255/1-254 you will clip <16 and >235 (or the 12-bit equivalent) content when you scale to full-range.

    Given that broadcast video can often go >235 within the broadcast specs ( https://tech.ebu.ch/publications/r103 details production signal range and why clipping Limited range video and scaling to Full isn't a good idea ) - it's best if you can keep as much processing as possible in the YCbCr 16-235 (or 10-bit or 12-bit equivalents).

    A lot of people assume that 16=0% and a hard clip and 235=100% and video is 0% to 100% and so it's fine and there's no clipping - with nothing going above and below. That's not the case. Content is allowed to go >235 in broadcast specs (and whilst it's less useful in HDR10 as in PQ that content is VERY bright, it can - and often does - carry very useful highlight content in HLG), and whilst you shouldn't see <16 on a properly calibrated display, its presence actually helps you calibrate a display with standard test signals (where using test signals requires that you can see <16 content).

    Scaling to Full range makes using PLUGE (a standard test signal used to set black level on a display) impossible for instance. PLUGE has bars at limited range 12 (sub-black), 16 (black) and 20 (just above black). You adjust your display fed with PLUGE so that you can't see the difference between 12 and 16 to set black level, but to do so you need to be able to see the difference between 12,16 and 20 bars when you are altering your display black level/brightness. If you signal has been scaled to Full range already your 12 and 16 bars will both be clipped at 0 or 1 - rendering the signal pointless for setting black level.

    NB if something else in your Kodi playback chain already processes using a Limited->Full scaling - then it's a moot point what you output in... Hopefully most platforms these days don't do that - but I know x86 stuff often does.

    Here endeth the lesson...

  • Many thanks for shedding some light on screen darkness ;) which was my initial reason for fiddling around with color range. I removed the modetest line from the autostart script and instead adjusted the display settings at last.

  • Coming from an Apple TV 4k I noticed that on my RPi 4 the blacks are darker, expecially on 4k HDR contents. If I put playback in pause on a black, on the Apple TV 4K is possible to read more details pn picture than on RPi 4. To correct this I set on my LG the Black level option to high instead the default low.

    Reading on this forum I understood it not an issue with the limited RGB color range but I can’t still explain why on Apple TV details on blacks in 4K HDR are better readable with LG default profile settings.

  • Keep the black level setting at the default Auto - RPi will signal the quantization range in the infoframe and TV will switch appropriately.

    so long,

    Hias

  • I have available the auto option only using an internal LG App like Netflix. on HDMI sources auto option disappears and I have to choose Low or High. :(

  • Coming from an Apple TV 4k I noticed that on my RPi 4 the blacks are darker, expecially on 4k HDR contents. If I put playback in pause on a black, on the Apple TV 4K is possible to read more details pn picture than on RPi 4. To correct this I set on my LG the Black level option to high instead the default low.

    Reading on this forum I understood it not an issue with the limited RGB color range but I can’t still explain why on Apple TV details on blacks in 4K HDR are better readable with LG default profile settings.

    Are you playing the same HDR10 content on both platforms (and not DV on the Apple TV)?

    DV sends dynamic metadata that will trigger your TV to do more tone mapping than HDR10 does.

    What's the model number of your TV - if I can find the manual online I'll see if it sheds any light on the various HDMI input mode options.

  • Are you playing the same HDR10 content on both platforms (and not DV on the Apple TV)?

    DV sends dynamic metadata that will trigger your TV to do more tone mapping than HDR10 does.

    What's the model number of your TV - if I can find the manual online I'll see if it sheds any light on the various HDMI input mode options.

    The content is the same and HDR10 (and tv supports only hdr10). Model is LG UM7450PLA, the panel is LCD.

  • The content is the same and HDR10 (and tv supports only hdr10). Model is LG UM7450PLA, the panel is LCD.

    OK - reading the manual :

    for best performance with the Raspberry Pi you need to be set to ON

    [Picture] [Additional Settings] [HDMI ULTRA HD Deep Colour]

    to be set to ON

    That will enable the input formats on your TV that the Pi supports HDR in for 50/60Hz output (the Pi doesn't output 4:2:0)

    However the manual doesn't seem to include any description about Low and High HDMI levels... So no idea what LG mean by those.

    My guess is that Low = Limited = Standard 16-235 (which is the standard used for video) and High = Full = 0/1-254/255 'PC' range.

    The only other thing to be aware of is that the Apple TV doesn't always pass on HDR10 metadata (it's effectively PQ10 with some media replay solutions) whereas the Pi does - so if your TV pays attention to the HDR10 MaxCLL / MaxFALL metadata that the rendering results could be changed by that.

  • Thank you to have looked at the manual.

    Yes HDMI Ultra HD Deep colour is set to ON.

    For the Black Level option I can report best results setting it to Low in the SDR profile and setting it to High in the HDR profile, both profiles are set to Cinema as base settings.

    One interesting thing using the black level option is that used on HDR it changes only the details on the blacks leaving unchanged the colors of the picture, if used instead on sdr it washes out entire picture colors, as the backlight luminance was changed. So from my experieche it should be used only on hdr content.

  • Thank you to have looked at the manual.

    Yes HDMI Ultra HD Deep colour is set to ON.

    For the Black Level option I can report best results setting it to Low in the SDR profile and setting it to High in the HDR profile, both profiles are set to Cinema as base settings.

    One interesting thing using the black level option is that used on HDR it changes only the details on the blacks leaving unchanged the colors of the picture, if used instead on sdr it washes out entire picture colors, as the backlight luminance was changed. So from my experieche it should be used only on hdr content.

    Ah - it's a black level control, not a video range control. That's a very different setting. That's like 'Colour' and 'Contrast' - a user control.

    (Back in the days of NTSC composite/S-video there was a 'technical' black level control that handled NTSC's optional +7.5IRE black level pedestal that was used in North America, but not used in Japan. This ceased to be an issue once component and HDMI came into use as they have no black level offset and use the same standards in all versions of 525 and 625 video - though ISTR some North American component devices may have had an out-of-spec +7.5 IRE black level so the adjustment was allowed there too)

  • After many tests comparing files with 4k resolution and same file but in 1080p (keeping in mind I've set the adjust refresh setting to always), it looks like playing 1080p files are indeed using limited hdmi blacks while 4k sdr (maybe hdr also) uses full hdmi blacks.

    Every 4k files I played with the PI were so damn black when I compare to 4k files played through the TV native Netflix or Prime app that I though something was off.

    So in the end, in term of "black level/darkness", to me 1080p -> Limited HDMI black, 4k sdr -> full HDMI black.

    I have to force it on my LG C1 : if I put the setting to auto it will stay limited.

    I don't know how I can provide factual evidence / log to pass upon to the dev team or if it's a know "issue".

    Any ideas how to get attention from the technical team ?

    Thanks

  • This is only a guess. The difference may be in the codec used. avc videos are normal, hevc videos are slightly darker. If is in the codec, you could also have a 1080p darker, if encoded hevc.

  • Well maybe. Really when I switch to full on the tv then I can see the details etc. without having washed out color etc.

    That why I assume that there's something on when you display 4k videos as it's definitely not happening in 1080p.

    If I do the same with a 1080p file every colors are washed out

  • Provide a log from some legit media and ideally some short sample so we can reproduce the issue.

    Not only we don't care about piracy crap but also there's just too many issues with bad rips/encodings etc.

    Test with known samples, eg from 4kmedia.org on a clean LibreELEC installation without piracy crap and we can have a look.

    so long,

    Hias