quietvoid / dovi_tool

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

Add editing some new values in RPU Editor #57

Closed manuelrn closed 3 years ago

manuelrn commented 3 years ago

Hi!

Currently the RPU editor supports editing of the min_pq and max_pq values. Would it be possible to implement new values to edit in the RPU Editor?

I mean these specifically: max_display_mastering_luminance min_display_mastering_luminance max_content_light_level max_frame_average_light_level

This is because sometimes I have had a HDR video (from UHD) and a DV video (from WEB). The UHD video contains those 4 values, and the RPU extracted from the WEB video contains the max_display_mastering_luminance and min_display_mastering_luminance values with exactly the same values as the UHD video, but the max_content_light_level and max_frame_average_light_level values are set to 0... And, as I mentioned before, in the UHD those 2 values were set with a value that is not 0.

So, I have thought that if it is set to 0 it is equivalent to not being set, correct?

And in that case, I suppose it would be appropriate and advisable to replace the 0 RPU values with the HDR video values. So you can take advantage of those values that are available thanks to the other video.

This is correct? Or is it not appropriate? I guess it is correct since the other 2 values match exactly in both video sources.

Thanks and regards!

quietvoid commented 3 years ago

So you basically want to be able to change the global L6 metadata?

manuelrn commented 3 years ago

Those values are inside Level6.

So yes @quietvoid, that's right.

Thanks!

quietvoid commented 3 years ago

Implemented. The syntax is the same as the generator config, the documentation has been modified to reflect the change.

There is an example JSON here: https://github.com/quietvoid/dovi_tool/blob/main/assets/editor_examples/level6_metadata.json

manuelrn commented 3 years ago

Thank you very much @quietvoid!

manuelrn commented 3 years ago

@quietvoid I think there is a small mistake in the new editor.md:

    "level6": {
        "max_display_mastering_luminance": int,
        "min_display_mastering_luminance": int,
        "max_content_light_level": int,
        "max_frame_average_light_level": int,
    }


I think this should look like this:

    "level6": {
        "max_display_mastering_luminance": int,
        "min_display_mastering_luminance": int,
        "max_content_light_level": int,
        "max_frame_average_light_level": int
    }


Thanks!

quietvoid commented 3 years ago

That's true. Thanks.