diff options
author | Niklas Haas <git@nand.wakku.to> | 2016-07-09 04:18:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-13 11:03:42 +0200 |
commit | a14f9249c424ed976a7e23cb9f231a8c5f7f2c53 (patch) | |
tree | 0cf38212420c8469503fd0d5202dbe9cfc4e1073 | |
parent | 8b47e5daa440ed30d8e0aa83287bb7a7c014d2ae (diff) | |
download | mpv-a14f9249c424ed976a7e23cb9f231a8c5f7f2c53.tar.bz2 mpv-a14f9249c424ed976a7e23cb9f231a8c5f7f2c53.tar.xz |
command: add properties for HDR metadata
Since it turns out that knowing what exactly a file was tagged with can
be useful for debugging purposes, expose this as a property so I can
check it more easily.
This is mostly useful for sig-peak (since nom-peak is currently entirely
calculated by us), but I added both for consistency.
-rw-r--r-- | DOCS/man/input.rst | 6 | ||||
-rw-r--r-- | player/command.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 9c4df6152b..906d04973b 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1479,6 +1479,12 @@ Property list ``video-params/gamma`` The gamma function in use as string. (Exact values subject to change.) + ``video-params/nom-peak`` + The video encoding's nominal peak brightness as float. + + ``video-params/sig-peak`` + The video file's tagged signal peak as float. + ``video-params/chroma-location`` Chroma location as string. (Exact values subject to change.) diff --git a/player/command.c b/player/command.c index b44e12ab2d..79687fe46d 100644 --- a/player/command.c +++ b/player/command.c @@ -2533,6 +2533,8 @@ static int property_imgparams(struct mp_image_params p, int action, void *arg) SUB_PROP_STR(m_opt_choice_str(mp_csp_prim_names, p.color.primaries))}, {"gamma", SUB_PROP_STR(m_opt_choice_str(mp_csp_trc_names, p.color.gamma))}, + {"nom-peak", SUB_PROP_FLOAT(p.color.nom_peak)}, + {"sig-peak", SUB_PROP_FLOAT(p.color.sig_peak)}, {"chroma-location", SUB_PROP_STR(m_opt_choice_str(mp_chroma_names, p.chroma_location))}, {"stereo-in", |