quietvoid / dovi_tool

dovi_tool is a CLI tool combining multiple utilities for working with Dolby Vision.
MIT License
615 stars 58 forks source link

How to go about converting DoVi RPU to HDR10+ metadata? #23

Closed sagz closed 3 years ago

sagz commented 3 years ago

Following up from the previous issue thread, here's the overall goal. I'm trying to upload a bunch of content I have to Wikimedia Commons but that requires royalty-free encoded videos. I can do the HEVC>VP9 while maintaining BT.2020 (pending tone-curve conversion if needed), but the frame-level dynamic metadata gets lost in the process.

The thing is that iPhone12, while being DoVi encoded video, is HLG and so it seems like the metadata conversion from DoVi RPU to HDR10+ JSON should be possible 'easily' enough...

I'm not sure if it's in-scope for dovi_tool to do this, but since you also are the creator of the amazing hdr10plus_parser, I thought I'd go to you first to ask how to connect these two standards.

Looking through the extracted frame info from a DoVi RPU and a sample of the HDR10+ json from Tears of Steel, I don't think it's just a matter of reformatting the json... or is it?

Thanks for you help!

quietvoid commented 3 years ago

No, the two formats are different. There are patents on converting from one to another but the detailed steps are not public.

Since neither HDR10+ or Dolby Vision analysers are publicly available, this isn't a trivial task. And I don't plan on looking into it either.

quietvoid commented 2 years ago

HDR10+ with VP9 relies on the container for the metadata, it is not in the stream. I don't know if Youtube videos are HDR10+ when played on a supported display.

Gronis commented 2 years ago

I can see that it is possible to create a dolby vision RPU using HDR10+ metadata json file, so there seem to be some compatibility between the formats.

quietvoid commented 2 years ago

The only thing they share is the maximum brightness of the scene.

HDR10+ requires image analysis like the distribution (histogram) of the brightness in every frame, which Dolby Vision doesn't have.

So it cannot be converted without processing the decoded image.

sagz commented 2 years ago

Is the image processing easy to do? aka, there's a set formula to calculate the histogram? considering that decode speeds are so good and in so many HW devices, that shouldn't be too hard to do for users with all sorts of computers if they wanna convert.

Message ID: @.***>

quietvoid commented 2 years ago

It shouldn't be too complicated. There's no public reference or implementation though.

joaoserra commented 1 year ago

There are patents on converting from one to another but the detailed steps are not public.

Patents on converting DV metadata to HDR10+? I understand that the patents don't have the exact details, but exactly what patents? I would like to take a look at those.

Thanks!

quietvoid commented 1 year ago

I didn't keep a note of it.