Posts: 325
Joined: Apr 2004
Reputation:
6
So I see Raspberry Pi 5 has hardware Open GLES support, will this finally allow smooth playback of 4k video using the ACE Filmic, Hables, etc tonemappers in Kodi?
Posts: 695
Joined: Mar 2011
Reputation:
88
sarbes
Team-Kodi Member
Posts: 695
It wouldn't surprise me if it couldn't do 4k60. The GPU can't use the texture format of the video decoder, so it would need a conversion first. And the shader is still very expensive.
And I'm not sure if we even have a rendering path for that.
Posts: 325
Joined: Apr 2004
Reputation:
6
Just curious if there's been any progress with this a few gens later....Vero V maybe?
Posts: 104
Joined: Feb 2017
Reputation:
8
On vero4k, we (OSMC) found the tonemapping provided in the AML kernel code not the best and we implemented our own. If I was convinced ACES filmic was better in any way we would have used that, but I'm not convinced. Vero V has better tonemapping than Vero 4k (including some dynamic adjustment) so we didn't find the need to 'improve' it. You will not therefore see ACES tonemapping on Vero V.
IMVHO ACES/Hable/Reinhart tonemapping is inappropriate for HDR->SDR conversion. These algos are designed to take an essentially infinite dynamic range such as you would get from a computer-generated render (eg in games) and map to a display range. With HDR, the range is already limited (say to 1000 nits) so the mapping needs to be different.
Posts: 325
Joined: Apr 2004
Reputation:
6
Interesting, thanks for the response. In my experiments a couple years ago, Kodi's ACES/Hables tonemapping looked good when I tried it on various HDR sources...basically gave me a result similar to the SDR source, which is what I'd want. So you're saying OSMC doesn't include the ACES/Hables mapping already in the Kodi codebase?
Posts: 695
Joined: Mar 2011
Reputation:
88
sarbes
Team-Kodi Member
Posts: 695
By default, Kodi includes the mentioned ways of tone mapping. But embedded devices are usually not fast enough to run the mappers at a usable frame rate. Such devices often have special tone mapping hardware, which might provide different methods.
Posts: 104
Joined: Feb 2017
Reputation:
8
2024-09-16, 22:16
(This post was last modified: 2024-09-16, 22:33 by graham-h. Edited 1 time in total.)
Only just seen this. Yes 'ACES' as used in Kodi is a tiny subset of what the ACES ecosystem comprises. AIUI someone identified a tonemapping that was defined in the ACES colourspace and transposed it for use in RGB, but it's a while since I looked at the code.
All these methods just define a sigmoidal curve. In the absence of dynamic metadata, you can take your pick and find the one that suits the type of video you are watching. The danger is using a curve that's very flat at the top and bottom so you crush the highlights and shadows. I found that happening when these options were first introduced into Kodi. I see there have been improvements since but I don't do my watching on a device that uses these methods.
Posts: 104
Joined: Feb 2017
Reputation:
8
There certainly doesn't seem to be any conversion to ACES colourspace involved and the parameters for the tonecurve are hard-coded so it seems to me it's 'just another sigmoid'. That's not a criticism, but calling it ACES is a bit like implementing a Dolby tonecurve using ST2094-10 with fixed parameters and calling it 'Dolby'. There's no objective reason why it should be any 'better' than any other sigmoid. Anyway, the OP question is moot now that boxes that do dynamic tonemapping are cheap as chips (pun intended).