(2019-09-17, 17:22)popcornmix Wrote: [ -> ]I believe the current intention is to convert Rec 2020 tonemap to Rec 709 and output image flagged as Rec 709.
But I think the 2020->709 matrix isn't right. We're looking into that.
A slightly more future intention is for Rec 2020 content to be output flagged as Rec 2020.
The more future intention is also to also output deep colour.
I'm running a Pi 4B with LibreELEC (Leia) 9.2 Beta1 from the public downloads page, not a nightly.
Just looked at some Rec 2020 HLG EOTF HDR content and it looks as if the Rec 2020 YCbCr 4:2:0 10-bit content to RGB Rec 709 8-bit playback is doing an at-least-watchable Rec 2020->Rec 709 tone mapping (i.e. it's not totally desaturated as if Rec 2020 RGB primaries are mapped to Rec 709 primaries with no gamut conversion?) The content I have in both HDR10 and HLG flavours IS very saturated though - so I may be mistaken...
**EDIT - think I may be. Manually forcing my TV into Rec 2020 gamut when fed the Rec 709-flagged RGB seems to look 'nearer' **
HLG's EOTF is backwards compatible-ish with SDR Power Law Gamma/BT.1886 EOTFs - so black levels remain OK and ~75% of the luminance range looks OK (brighter areas look a bit like they have have a heavy knee on them rather than clipping)
When I manually force the TV into HLG HDR this seems to do an OK job.
Looking at the same content in HDR10 Rec 2020 with a PQ ST.2084 EOTF, the Pi 4B may be doing some EOTF conversion (as it doesn't look like HDR10 stuff does when played back as if it is SDR) but the tone mapping isn't as good as it is with HLG content (but that may because HLG is just being Gamut mapped not EOTF converted?) It's not as bad as if has been left alone, though it's clearly still 'off'. (Having the same video content in both HDR flavours is useful!) However when I force the TV into HDR10 mode, it's clear that the input isn't native HDR10 as the forced result looks very 'off'
Out of interest - is the approach for Rec 2020 PQ EOTF to Rec 709 BT.1886/Power Law gamma a Scene Light or a Display Light conversion?
I guess there are three things that need to happen - though these may be partially combined :
1. Rec 2020 YCbCr to RGB conversion uses different co-efficients Y = 0.2627R + 0.678G + 0.0593B (Rec 709, Rec 601 and Rec 2020 all have different RGB->YCbCr mappings)
2. If you are outputting Rec 2020 as Rec 709 you need to gamut convert because the Rec 2020 RGB primaries are very different 'colours' to the Rec 709 RGB primaries - as they have a wider colour gamut. You need to decide how you handle 'out of gamut' Rec 2020 colours that can't be accurately carried in Rec 709 gamut video. There are multiple approaches to this.
3. If you are handling HDR10 PQ or HLG HDR but outputting this as SDR Rec 2020 or Rec 709, you have to EOTF convert. This can be combined with 2. if you are outputting a Rec 2020 HDR source as a Rec 709 SDR signal. You have to decide how to handle HDR content that can't be carried within an SDR signal range. Display Light approaches make the SDR version look as close to the HDR version as possible (keeping a look as close to the HDR version as possible), Scene Light approaches try to simulate what an SDR camera shooting the same scene as the HDR camera would have looked like.