RPi4 testbuild with HDR support

  • I've been testing for a few weeks with HDR.

    My normal setup is RPi4 -> Denon AVRx4300h -> Sony Bravia. With this setup, I can't get the Bravia to show HDR in 4K. However, if I disable the 4K resolutions in libreelec, then the Bravia will show HDR in 1080p with the same file.

    I recently tried hooking the RPi4 directly to the Bravia. With this setup, and the same file as before, the Bravia WILL show HDR in 4K. However this forces me to use the ARC audio back to the Denon. It works ok but the volume is way lower and the HD audio modes aren't supported. (AVRx4300h doesn't support eARC)

    Is this something worth troubleshooting in libreelec, or is this maybe a problem with my AVRx4300h?

  • I've been testing for a few weeks with HDR.

    My normal setup is RPi4 -> Denon AVRx4300h -> Sony Bravia. With this setup, I can't get the Bravia to show HDR in 4K. However, if I disable the 4K resolutions in libreelec, then the Bravia will show HDR in 1080p with the same file.

    I recently tried hooking the RPi4 directly to the Bravia. With this setup, and the same file as before, the Bravia WILL show HDR in 4K. However this forces me to use the ARC audio back to the Denon. It works ok but the volume is way lower and the HD audio modes aren't supported. (AVRx4300h doesn't support eARC)

    Is this something worth troubleshooting in libreelec, or is this maybe a problem with my AVRx4300h?

    I am not sure if this helps, but on my Yamaha AVR it was necessary to activate HDR for HDMI which was not default. Maybe on your Denon exists a similar setting.

  • Hi there,

    I had the same problem with Denon and Bravia. According to this How-To I had to switch my receiver to 'enhanced'.

    HDR PASSTHROUGH NOT WORKING

    And if your Bravia is an Android TV you have to activate: Home --> Settings --> External Inputs (select your input) --> HDMI Signal Format switch to Enhanced

    I also changed all my HDMI cables because some worked and some not.

    Maybe this helps .....

    Oh .... I almost forgot, after changing the settings you always have to switch your devices off an on because of the HDMI handshake/sync.

    Edited once, last by doubleP (March 31, 2021 at 12:35 PM).

  • That link was great. I stumbled across it yesterday when trying to fix HDR on my AVR X4200. The step which worked for me was:

    "Disable the video conversion in the AVR."

    Something as simple as that (default) setting was killing HDR, resulting in washed-out colors.

    Now to see if my new RPi 4 with LE can reliably play 4K content for entire movies (my S912 with CoreElec struggled).

    Cheers, Carl

  • Better switch to nightlies, they contain additional fixes and it's good to get some additional testing of what will become beta2.

    hi, true hd and dts hd hd don't work normally when they are enabled , I played a 4k hdr dolby atmos movie and after 50 mins it was unwatchable , I tried with true hd and without it , true hd had a lot more problems (I also created a thread about this error and provides a kodi log here : Issue with audio-video sync (log file included )

  • That link was great. I stumbled across it yesterday when trying to fix HDR on my AVR X4200. The step which worked for me was:

    "Disable the video conversion in the AVR."

    Something as simple as that (default) setting was killing HDR, resulting in washed-out colors.

    Now to see if my new RPi 4 with LE can reliably play 4K content for entire movies (my S912 with CoreElec struggled).

    Cheers, Carl

    I believe you may still be getting sub-par colours in the current Pi 4 HDR builds - as I don't believe Rec 2020 gamut (which is the gamut HDR10 and the 'in the wild' HLG uses) is being flagged, so whilst the colours look less washed-out than when the HDR EOTF was being blocked (and your PQ ST.2084 content was being displayed in SDR), the Pi 4 still outputs Rec 2020 as Rec 709.

    Some TVs may switch to Rec 2020 when they detect an HDR EOTF I guess (though that's a bit of an 'out of spec' guess), but certainly my Sony TV will display Rec 709 gamut stuff in Rec 709 with an HDR EOTF (which means the colours will be less vibrant than if correctly flagged as Rec 2020 - which I can manually force and which brings things closer to what they should look like) (*)

    (*) The YCbCr->RGB matrixes used for Rec 709 and Rec 2020 are slightly different - but the differences between them will be harder to tell. (The difference between Rec 601 SD and Rec 709 HD are more marked ISTR)

  • My Sony is not switching .... as long as I tell him to do so.

    My Sony is working in Cinema Home Mode with 24p switching.

    And all movies without HDR are played in that mode.

    When my Sony gets a HDR signal, it switches to HDR-Video. Press the Action-Menu key on your remote and go to picture. It is greyed out so can not change it.

    But you can change the colour space from 'Auto' to 'BT.2020'. So the colours are much more intense.

    I appended some photos with my settings. I hope you can see the difference.

    This leads, in my case, to normal videos with colour space 'auto' and HDR videos with bt.2020.

  • My Sony is not switching .... as long as I tell him to do so.

    <snip>

    This leads, in my case, to normal videos with colour space 'auto' and HDR videos with bt.2020.

    Yes - this is a known issue.

    At the moment the Pi 4B builds correctly send the HDR EOTF (HLG/ARIB B-67 or HDR10/ST.2084) signal to switch the TV from SDR mode into the right HDR mode.

    However the other requirement for most HDR material (and all HDR10 material) is to switch from Rec 709 to Rec 2020 colour gamut (which is the Wide Colour Gamut used for all HDR10 and most other HDR content). The Rec 2020 colour gamut can be manually forced on your Sony TV, as it can be on mine.

    That gets the colour into the right gamut for HDR10.

    The two other issues are that the output is still RGB 8-bit not 10-bit - so banding is more likely to be an issue - and if the gamut is flagged as Rec 709 then there is no guarantee that the YCbCr->RGB colour matrices used to generate the RGB won't also still be the Rec 709 ones (which are slightly different to the Rec 2020 ones)

    Rec 709 : Y = 0.2126 x R + 0.7152 x G + 0.0722 x B

    Rec 2020 : Y = 0.2627 x R + 0.678 x G + 0.0593 x B

    UHD TVs don't automatically assume all UHD inputs are Rec 2020 though - as some (most?) SDR UHD content is often still in Rec 709 gamut (the same gamut used for HD)

    (For reference the SD Rec 601 RGB->YCbCr matrix is also different - Y = 0.299 x R + 0.587 x G + 0.114 x B)

  • Thanks doubleP. I had tried almost all of those things but you know what I didn't do? I didn't reboot after switching my android Bravia HDMI to enhanced mode. So it didn't work when I tried it... and I switched it back to standard... and I thought for a month it didn't work... and then I setup the direct Pi->TV route... for absolutely no good reason. Works now, thanks all!

  • As it seems, the issue with washed out HDR content isn't fully fixed yet. For some people it seems to work? I re-checked all my settings and cables. I'm using a deleyCon micro HDMI to HDMI cable (model number may be MK48 according to Amazon). The description doesn't say whether it's 18Gbps or not. On eBay, it says 18Gbps. The cable looks the same, but doesn't provide an exact model number. Can I assume that the cable is 18Gbps or would you guys recommend to get another one that clearly states so?

  • Hi AriaTwoFive,

    I now use the original raspberry micro hdmi to hdmi cable and it works fine for me. With the little workarounds I am very satisfied at all. I get HDR with more colour in it and atmos sound. Playback is smooth. I can fast-forward and rewind any 4K HDR Atmos movie without any latency. Even the movie playback from any position is working fine. The picture and the sound are straight on the TV. Okay, sometimes my synology has to wake up, that might take a second.

    Try new cables as I did. I found out that half of my 'normal' cables are not working properly. Sometimes I had a signal, sometimes not. It was like winning a lottery. Even two identical cables did not do the same thing. And try to get 'fast' cables. The picture might help you .....

  • HDR doesnt work for anyone yet (rpi4 libreelec), they just think it does.I thought so too before comparing clips with lots of red with my tvs build in player vs libreelec.

    hias told us to wait some more.

  • HDR doesnt work for anyone yet (rpi4 libreelec), they just think it does.I thought so too before comparing clips with lots of red with my tvs build in player vs libreelec.

    hias told us to wait some more.

    That's not 100% correct. HDR works - but Rec 2020 doesn't.

    HDR works OK - the EOTF (Electro Optical Transfer Function) is correctly signalled over HDMI switching your TV from SDR to either PQ/ST.2084 or HLG/ARIB-B67 HDR display modes. This is what makes the video use the HDR range of the display rather than the SDR range, and it is flagged correctly.

    HOWEVER - most HDR content is also in Rec 2020 colour gamut (i.e. Wide Colour Gamut) rather than the Rec 709 colour gamut used for HD SDR (and which is also similar to the colour gamut used for SD video too). The colour gamut defines the actual colours that the Red, Green and Blue primary colours used in a video signal are - and Rec 2020 effectively defines 'redder reds', 'greener greens' etc.

    The Pi 4B HDR implementation currently DOESN'T send the correct Colour Gamut flags for Rec 2020 content - so you get the correct HDR EOTF (and your TV switches into HDR mode) but the video is treated by most TVs as Rec 709 (so appears to have far less vibrant colours). Some of us can force our TVs into Rec 2020 mode using a menu option - which gets much closer to showing HDR10 correctly.

    (It may be that some models of TV automatically switch to Rec 2020 when they detect an HDR EOTF - which may be why some people are happier than others)

  • If you are in the mood for some experimental testing here's a new testbuild to try:

    LibreELEC-RPi4.arm-10.0-devel-20210409193846-98e0bda.tar

    Kodi and video driver now signal BT.2020 colorspace, my LG C8 now shows BT.2020 in status info (which it didn't before).

    Conversion matrix in video driver is unchanged so whitepoint most certainly isn't right. 10/12bit output is still missing as well, but hopefully we're one step closer to correct HDR output.

    The build also contains current WIP HEVC optimizations and latest kodi Matrix changes. High-bitrate and 50/60fps HEVC videos should perform better now but beware, there might still be bugs :)

    so long,

    Hias