Was thinking about dynamic HDR10+ conversion to DV P8 (or P7 MEL)
Was previously using your tools to do the same offline.
Currently CE and Android Kodi are using your lib to allow conversion of DV P7 → P8 (or P7 MEL) and there is code in the BitstreamConverter to identify and remove HDR10+ also.
It strikes me that the processing overhead to convert from one metadata type to the other would not be very high and could be done dynamically - though no expert so maybe not understanding something there.
Elements required as I see it:
Extract the HDR10+ SEI - already have the code basics.
Combine with Display Mastering Luminance etc. to convert to a DV P8 NAL etc (your code bases also I think has all the elements required - ideally just an additional method to the current lib to take the SEI/metadata and return an RPU! )
Add back the new P8 NAL to the stream - maybe a little more involved to do dynamically?
Alter the hints from HDR10 to DV with appropriate stream level metadata.
I think this would be very powerful for the Android version and here in the CE version.
Any thoughts/blockers?, happy to try and do some of this on the dev side - I think though you would have a very strong idea and like to follow your guidance and anything you could help provide to make it straight forward.
thx.
cpm
Putting it out in the forum so others can also opine if think if this is great feature to add or not, if it’s a goer then can add a poll to gauge interest here without lots of replies pilling up.
I think this would be a great feature for users who have a DoVi TV that doesn’t support HDR10+. However, thinking about user impact, I think working to improve DoVi compatibility with PGS subtitles would have a greater impact.
Another vote for it being a good idea, particular given hdr10+ content is out there and many tv’s support dv but not hdr10+.
I think this could get interesting in terms of trying to come up with a better way of converting hdr10+ to DV. From this comment the dovi_tool seems the to only set L1 data, not sure if this info is outdated though. The more interesting part in the link seems to be the comments about a bezier curve to adjust mapping and being unable to translate that directly.
Not looked at the conversion code yet, just skim reading the readme lol - presumed if using some histogram distributions may help map into the DV L1 space better - was assuming that was connected to the bezier curve comment, though maybe not! just pointing the options out for now.
Ok, read it better now, just for the max brightness.
Anyway any DV L1 is worth while.
The issue with doing this on the fly is that you need HDR10+ parsing in libdovi.
It doesn’t really belong in there though, so I’m not sure how I feel about it.
As you unquestionable already know, so just talking out loud for others to follow, to separate out the concerns could have a 2nd lib for just conversion keeping the libdovi untouched - at some point something must know how to convert and thus knowledge of both sides, though that is a whole new project and overhead in its own right but could house all the conversion and be used across your tools when converting.
And what does it provide exactly? In what form is the metadata then?
It’s not an option as I don’t want libdovi to depend on the other HDR10+ lib for parsing.
The simplest is creating a new library that builds off of both.
If you know that the struct contains the brightness histogram, we can just extend libdovi to be able to create a new RPU through the C API.
Would need to think of a simple way to expose the current generator options.
FYI, had a blocker previously with passing HDR10+ into the DV Engine - throws errors unless removing the SEI, saying that existing combined P7 DV/HDR10+ streams seem fine (HDR10+ on the BL and RPU on the EL) so maybe just the presence of the RPU will be enough but seems likely needs to be on the EL for it to work ok (for HDR10+ only this maybe a major pain to create a EL stream for the RPU - so best bet will be to strip the SEI off when adding the RPU - code in place to do this on the Kodi side already).