YCbCr 4:2:2 on RP 4 Possible?

  • First off, I'm a video engineer so I'd like to please avoid this topic from turning into a discussion about which color space is best.

    For my application YCbCr 4:2:2 is the best color space to feed my Lumagen RP video processor in my theater room. I have been running a ShieldTV for years which supports this, but there has always been one issue or another with either Android or the Nvidia Shield its self, so I decided to give LibreELEC a run. I keep an extra RP 4 around for experiments so after reading how well supported it is for LibreELEC I decided to give it a spin. I already had a 256GB SATA M.2 SSD from a laptop pull so naturally I bought the Aragon ONE M.2 case.

    I must say for a budget option, or for any option, I am pretty impressed. However a huge lacking for my application is YCbCr 4:2:2 support. I have read rumblings that that the RP 4 hardware can support 4:2:2 and that it may become an option. Is this true and does anyone know if this may become a reality sometime in the not too distant future? Is there anyway to use it now?

    *The reason 4:2:2 is best is that it is 12-bit and up samples the native encoding on BD and UHD-BD which is encoded at 4:2:0. The only format that can be lossless from the native disc encode at 24Hz into a Lumagen video processor is 4:2:2. The best image results from the Lumagen when there is no loss before the video signal is processed.

    A final question unrelated. On LibreELEC 10.x the way to force certain resolutions to be supported has changed. Is there a way for me to be able to enable 4k@60 Hz with 10.3?

    Kind regards and thanks,

    craigr

    Edited once, last by craigr (November 13, 2021 at 6:25 PM).

  • YCbCr 4:2:2 is supported by the hardware but not implemented in the driver and/or kodi yet (a complicated story...). Eventually support should be added though.

    To get 4kp50/60 output (at RGB 4:4:4) you need to add hdmi_enable_4kp60=1 to config.txt - the HDMI sink also needs to support that and signal it via EDID.

    so long,

    Hias

  • YCbCr 4:2:2 is supported by the hardware but not implemented in the driver and/or kodi yet (a complicated story...). Eventually support should be added though.

    To get 4kp50/60 output (at RGB 4:4:4) you need to add hdmi_enable_4kp60=1 to config.txt - the HDMI sink also needs to support that and signal it via EDID.

    so long,

    Hias

    Thanks for the quick reply. Two follow up questions pleas:

    Firstly, do you know if I could run Kodi on another Linux distribution (perhaps Raspbian) for 4:2:2 support now?

    Second, could you please provide the location of the config.txt in LE 10.x? I thought I read that it had been moved and was unable to find it? It was late last night...

    Best regards,

    craigr

  • YCbCr 4:2:2 is supported by the hardware but not implemented in the driver and/or kodi yet (a complicated story...). Eventually support should be added though.

    To get 4kp50/60 output (at RGB 4:4:4) you need to add hdmi_enable_4kp60=1 to config.txt - the HDMI sink also needs to support that and signal it via EDID.

    so long,

    Hias

    So I added the hdmi_enable_4kp60=1 in config.txt and still no 4K@60Hz. My EDID supports 4K@60 Hz for RGB and YCbCr 444/422. All other devices are set to YCbCr 422 or 444 and work fine. What do you mean by "...the HDMI sink also needs to support that..."?

    I also added lines to disable the RP power LED in config.txt and that worked.

    Another question... can I enable YCbCr 4:4:4 for 4k @2398 Hz and 1080p at 23.98 Hz and 59.94 Hz. I may be better off with YCbCr than RGB.

    I have also read glints in posts and tickets that the wrong component color encoding matrix may have been used for Rec601, Rec709, and Rec2020, or that the same matrix may have been incorrectly used for all three gamuts. Do you know if this is true and if it was ever fixed?

    Thanks once more,

    craigr

  • Please post the outputs of "modetest | pastebinit" and "pastekodi"- this will show what modes are available (and a copy of the edid).

    Most sinks won't list 4kp50/60 modes at 4:4:4 in the EDID unless you enable "HDMI Deep Color" at the sink - then 4k 4:4:4 is limited to 30fps and only 4:2:0 (which the RPi doesn't support) 50/60fps are listed.

    YCbCr 4:4:4 isn't supported in the driver either, the proposed kernel patch would add that along 4:2:2 as well.

    IIRC all matrices and BT709/2020 colorspace signalling should be fine now.

    so long,

    Hias

  • BTW: also make sure you are using HDMI0 (the one next to the power connector on RPi4) - HDMI1 only supports up to 4kp30.

    so long,

    Hias

    Sigh, wrong HDMI port :blush:. I thought that my version of the Argon ONE M.2 case kept the HDMI ports in the same order as the Pi board, but it does not. It turns out port zero is the one further from the USB slots on this case. I had to check the PCB traces to be sure.

    http://ix.io/3F10

    http://ix.io/3F13

    These look correct.

    All is good now except for the fact that's it's still RGB. But honestly I use 60Hz very rarely on Kodi so whatever. I'm much more keen to get YCbCr 422 support:

    * I don't plan on running the GUI at 4K60Hz, I just wanted to test it. I'll switch the GUI back to 1080P60Hz and just whitelist 4K@60Hz for auto switching as needed.

    I switched the GUI back to 1080p and then whitelisted 4k@60Hz. I played Billy Lynn's Long Halftime Walk and Kodi switched to [email protected] as expected.

    Thanks so much for your help HiassofT I must say I am impressed that a LE developer would take time to answer a noob LE user's questions.

    Very kind regards,

    craigr

    Edited once, last by craigr (November 14, 2021 at 10:13 PM).