RPi4 testbuild with HDR support

  • Test build much better on viewing uk freesat interlaced channels via tvheadend. Flickering experienced on 10.0.1 is gone. 4k colours also look better. Only issue I have found is playing back tvheadend recordings which now show signs of stuttering when lots of movement. Only watched HD freesat recordings so far 1080 50hz. Rolled back to 10.0.1 and the same recordings playback fine.

    Sorry first post and lacks technical content but hope it helps :)

  • It would be great to get some feedback on the LE10 testbuild as well, initial testing here looked good, but we'd like to have some more positive confirmation that things work as expected before adding the backport patches to official LE10 releases.

    Anyone else seeing occasional black screen during playback? It's almost like the TV is switching refresh rate or resolution, which isn't something I would expect. Running LE10 build based on the le10-test branch. Mostly have noticed this watching from PVR (Tvheadend) with h264 progressive content using HW decoding. It's not scene changes, because I left the progress bar on screen and it also disappears.

    Debug log:

    http://ix.io/3JuE


    Should both pull down & double refresh rate be used? It looks like it is jumping between 59.94 and 60, which I wouldn't have expected with on start/stop as the adjust refresh option. In any case, I went back to the recommendations, turned off pull down & double refresh rate, and removed the 25, 29.94, and 30 fps options. I guess that would probably fix it.

    Edited 2 times, last by frakkin64 (December 25, 2021 at 7:19 PM).

  • Should both pull down & double refresh rate be used? It looks like it is jumping between 59.94 and 60, which I wouldn't have expected with on start/stop as the adjust refresh option.

    Pull-down is only needed for 24->60 Hz, you can keep it disabled if your TV suports 24fps. You should enable double refresh rate though (and disable 25/29.97/30Hz in whitelist) to get proper output with interlaced contents.

    Regarding the black screen/refresh rate changes: can you please upload a sample file that shows this issue?

    so long,

    Hias

  • Pull-down is only needed for 24->60 Hz, you can keep it disabled if your TV suports 24fps. You should enable double refresh rate though (and disable 25/29.97/30Hz in whitelist) to get proper output with interlaced contents.

    I didn't have 24/25/29.7/30 Hz enabled in the whitelist, mostly because of the "soap opera" effect (apparently that's what Samsung calls it) I was having.

    Motion smoothing and the soap opera effect on Samsung TVs
    Motion smoothing, auto motion plus, the soap opera effect, or blur reduction. No matter what you call it, there are certain times where you may want to use…
    www.samsung.com

    Regarding the black screen/refresh rate changes: can you please upload a sample file that shows this issue?

    The issue seems to be caused by I guess Kodi sampling the frame rate and averaging it, and 29.97 to 30 is within that bit of error for it to cause a refresh rate change when double refresh rate is enabled. My guess it has always been like this, up until now I haven't enabled adjust display refresh rate, so a bit of new territory for me. In any case, I did delete the episodes from the PVR, they were all from the same show, I checked a few recordings from the same channel and haven't noticed it again. I'll reply back once I find one again.

  • frakkin64 Outputting 23.976/24.000Hz content natively in 23.976/24.000 Hz over HDMI shouldn't cause you 'Soap Opera Effect' issues unless your TV either cannot disable Frame Rate interpolation, or can't display 23.976/24.000fps content cleanly (i.e. without itself adding 3:2 or similar artefacts)

    My Sony TVs since my second HDTV set bought in 2007 have all supported native 23.976/24.000 support (my earlier displays used 48Hz refresh - which as they were LCD-based with constant backlight didn't flicker, my current display uses 120Hz 5:5 pulldown, as I have all the MotionFlow junk disabled)

  • Outputting 23.976/24.000Hz content natively in 23.976/24.000 Hz over HDMI shouldn't cause you 'Soap Opera Effect' issues unless your TV either cannot disable Frame Rate interpolation, or can't display 23.976/24.000fps content cleanly (i.e. without itself adding 3:2 or similar artefacts)

    Once I turned off Picture Clarity Settings on the Samsung TV it is working fine. They call it motion smoothing, what exactly the technical details are not clear to me. :)

    As for my other issue with the 29.97 content, perhaps it is caused by transcoding interlaced MPEG2 broadcasts to H.264. You need a heck a lot of time and patience to understand ffmpeg and video encoding, and there is a lot of bad information, so it's possible I am doing it wrong. I am going to drop yadif filter, and via mediainfo if it says the scan type is Interlaced then add "-flags +ilme+ildct -x264opts tff=1" to transcode to H.264 interlaced.

  • Ive got a few 4k hdr videos that I can play with the 12.18 build but not with newer builds. As far as I can tell the tv doesn't get put in to hdr10 mode in the newer builds. Brava xbr65a8h and denon avrx4300h. I can upload logs if useful.

  • I'm not sure what happened between when I posted this and now, but the same exact file renders now fine in HDR. The only thing I can think of is in the mean time I got CEC working by enabling/allowing the option on the TCL TV.

  • Ive got a few 4k hdr videos that I can play with the 12.18 build but not with newer builds. As far as I can tell the tv doesn't get put in to hdr10 mode in the newer builds. Brava xbr65a8h and denon avrx4300h. I can upload logs if useful.

    On most Sony HDR TVs you can tell if an HDR mode has been enabled by going to Picture Settings whilst the video is playing. If you see an HDR logo on the top right of the menu (there to tell you that you are altering the settings for HDR content on that source, as SDR and HDR picture settings are stored separately) you are in HDR10 or HLG mode.

    The only way of telling for certain if you are specifically in HLG HDR or HDR10 HDR mode is to go to Advanced Video settings and then manually altering Dynamic Range away from AUTO and forcing HLG or HDR10 to see if there is a difference between them and AUTO. (The same is true for Rec 2020 vs Rec 709 gamut switching in the Colour Space menu in the Advanced Video settings options)

    (Some devices will map HLG into HDR10 and output as HDR10, if they don't detect HLG support, I've found in some situations - though I think this was AML or RK, not Raspberry Pi)

  • Thanks noggin it looks like the issue is with my receiver. The newer builds work fine if I plug my pi4 directly into the tv.

    Here's an example which exhibits the issue

    Samsung Wonderland Two HDR UHD 4K Demo | 4K Media
    Samsung Wonderland Two is a promotional video, filmed across Canada in Ultra-HD HDR, for UHD Samsung 4K TVs. Video Info: Resolution: 3840 x 2160 File size: 802…
    4kmedia.org

    My bravia has android tv. It shows me "3840x2160 4k 16:9 HDR(HDR10)" when things work correctly for my test videos, both with the old and new builds. I'm fairly sure Bravia HDR Mode is HDR10 (not HLG) and color space is BT.2020 (not BT.709, DCI, or Adobe RGB). This is based on visually observing the difference between these modes and AUTO. This appears to be the case for both old and new builds... So as far as I can tell both builds are attempting to use the same color settings.

    But I think its safe to deduce the newer builds are doing something different that is incompatible with my denon...

    According to the links below my denon avrx4300h should be compatible with all the modes. I followed all the troubleshooting steps including using input-cd, updating firmware, etc. Nothing worked for me.

    HDR FORMAT COMPATIBILITY

    HDR PASSTHROUGH NOT WORKING

    Edited 5 times, last by onlyrock (December 31, 2021 at 1:36 AM).

  • I have an AVR-X2400H - I had to enable Enhanced HDMI support on both my TV and my AVR, and have to use HDMI 2 or HDMI 3 on my TV to allow 4:2:2 12-bit 2160p50/59.94 support. (HDMI 1 and HDMI 4 are 4:2:0 only - which the Pi won't support at 2160p50/59.94)

    HDMI 3 is my ARC port so that makes sense anyway.

  • I think my receiver is a generation older than yours, I don't see an enhanced video option. I found a screen buried in settings/general/information/video/HDMI-signal-info that appears to show what's going on. The old LE builds use 8-bit color depth and the new ones use 12-bit, for the demo video I posted earlier.

    Both builds go through two phases when playing the video.

    Old builds start at "1080p:60Hz,BT.2020 RGB,8bits" then after a second or two switch to

    "4k:24Hz,BT.2020 RGB,8bits".

    New builds start at "1080p:60Hz,BT.2020 RGB,12bits" then after a second or two switch to

    "4k:24Hz,BT.2020 YCbCr,-----". I stop seeing video after the second switch.

    So it looks like receiver is unhappy with YCbCr 12bit. I doubt it's a firmware issue. I'll probably need a newer receiver.

    I should also mention my config.txt is fairly stock I havent enabled 4k 60Hz. Don't know if I'm missing something.

  • Just installed the nightly of December 30th on a 4GB Pi4 and I was able to playback 4K x265 10 bit HDR with Dolby Atmos passthrough. I experienced some stuttering until I enabled Sync display on video start-stop as I was noticing some stuttering and hiccups. Very happy with the result!

  • I tried out the 10.x build, and was very happy with it.

    I did notice the flickering on interlaced content (from tvheadend), but followed the wiki, set up a white list, and it's great now!

    As an aside - any reason to use the 10.x build over the 11 nightlies? The only plugins I use are Jellyfin and TVHeadend

  • Nightlies will give you bleeding edge kodi nexus & LE features and bugs, LE10 builds will be more stable - it's your decision which one to choose.

    Since testing looks good so far I'll take care about adding the recent HDR and deinterlace backports to our LE10 code base so they'll be included in the next LE10 release.

    so long,

    Hias

  • It appears that most if not all of my HDR10 videos get sent to my receiver using 12bit color. I think the builds prior to 2021.12.18 would send them as 8bit, as I detailed above.

    I thought HDR10 used 10bit color. Is that correct? If so, is there a reason LE outputs them as 12bit?

  • I thought HDR10 used 10bit color. Is that correct? If so, is there a reason LE outputs them as 12bit?

    The HDMI YCC422 format always uses 12 bits (which uses the same clock as RGB444 8-bit).

    The lsbs will typically be zero for 10-bit (although may not, if there has been processing like scaling or alpha blending with OSD).