quietvoid / dovi_tool

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

Refactor extension metadata blocks #84

Closed quietvoid closed 2 years ago

quietvoid commented 2 years ago

As well as standardizing the RPU generation.

Left to do:

saindriches commented 2 years ago

Is there any sample RPU matching the L11 struct, or any public information about the so many entries? Since only content_type and white_point are included in metadata.

quietvoid commented 2 years ago

Is there any sample RPU matching the L11 struct, or any public information about the so many entries? Since only content_type and white_point are included in metadata.

At the moment I'm still trying to figure out the format, using the Dolby verifier as help. The current implementation is based on https://patents.google.com/patent/WO2020264409A1 But it seems incorrect.

I haven't seen a sample using it yet.

saindriches commented 2 years ago

The L11 block from iPhone recorded video includes:

content_type = 4
white_point = 0
reference_mode_flag = 0
(byte2)
(byte3)

Seems the length is correct, but they only use these entries for now.

Content type 4 is User-generated content (While the meaning of 0-3 matches patent, 5-15 are reserved), and the function to calculate color temp is white_point * 375 + 6504, so maybe 0 means 6504K.

quietvoid commented 2 years ago

Alright I found a sample with everything, will try to fix it.

quietvoid commented 2 years ago

~Well, it doesn't like the reference mode flag. Presumably because it's always set to 0.~ Oh, nevermind I guess. Maybe byte1 is both whitepoint + reference mode flag.

edit: nope, doesn't work for every value.

quietvoid commented 2 years ago

I did end up figuring it out. For reference mode, we need to add 16 to the whitepoint.

quietvoid commented 2 years ago

I'm not sure what the L10 and L11 format is in XML.