player/command: remove hdr-metadata property

It is now included in video-out-params and was never released in stable
version, so we can safely remove it.
This commit is contained in:
Kacper Michajłow 2023-10-24 14:06:53 +02:00 committed by sfan5
parent 1174afcccc
commit 38da5b89c2
3 changed files with 10 additions and 86 deletions

View File

@ -113,6 +113,7 @@ Interface changes
- `--demuxer-hysteresis-secs` now respects `--cache-secs` and/or
`--demuxer-readahead-secs` as well
- add hdr metadata to `video-params` property
- remove `hdr-metadata` property
--- mpv 0.36.0 ---
- add `--target-contrast`
- Target luminance value is now also applied when ICC profile is used.

View File

@ -2550,55 +2550,15 @@ Property list
"stereo-in" MPV_FORMAT_STRING
"average-bpp" MPV_FORMAT_INT64
"alpha" MPV_FORMAT_STRING
``hdr-metadata``
Video HDR metadata per frame, including peak detection result.
If supported the same information is also included in ``video-out-params``.
This has a number of sub-properties:
``hdr-metadata/min-luma``
Minimum luminance, as reported by HDR10 metadata (in cd/m²)
``hdr-metadata/max-luma``
Maximum luminance, as reported by HDR10 metadata (in cd/m²)
``hdr-metadata/max-cll``
Maximum content light level, as reported by HDR10 metadata (in cd/m²)
``hdr-metadata/max-fall``
Maximum frame average light level, as reported by HDR10 metadata (in cd/m²)
``hdr-metadata/scene-max-r``
MaxRGB of a scene for R component, as reported by HDR10+ metadata (in cd/m²)
``hdr-metadata/scene-max-g``
MaxRGB of a scene for G component, as reported by HDR10+ metadata (in cd/m²)
``hdr-metadata/scene-max-b``
MaxRGB of a scene for B component, as reported by HDR10+ metadata (in cd/m²)
``hdr-metadata/max-pq-y``
Maximum PQ luminance of a frame, as reported by peak detection (in PQ, 0-1)
``hdr-metadata/avg-pq-y``
Average PQ luminance of a frame, as reported by peak detection (in PQ, 0-1)
When querying the property with the client API using ``MPV_FORMAT_NODE``,
or with Lua ``mp.get_property_native``, this will return a mpv_node with
the following contents:
::
MPV_FORMAT_NODE_MAP
"min-luma" MPV_FORMAT_DOUBLE
"max-luma" MPV_FORMAT_DOUBLE
"max-cll" MPV_FORMAT_DOUBLE
"max-fall" MPV_FORMAT_DOUBLE
"scene-max-r" MPV_FORMAT_DOUBLE
"scene-max-g" MPV_FORMAT_DOUBLE
"scene-max-b" MPV_FORMAT_DOUBLE
"max-pq-y" MPV_FORMAT_DOUBLE
"avg-pq-y" MPV_FORMAT_DOUBLE
"min-luma" MPV_FORMAT_DOUBLE
"max-luma" MPV_FORMAT_DOUBLE
"max-cll" MPV_FORMAT_DOUBLE
"max-fall" MPV_FORMAT_DOUBLE
"scene-max-r" MPV_FORMAT_DOUBLE
"scene-max-g" MPV_FORMAT_DOUBLE
"scene-max-b" MPV_FORMAT_DOUBLE
"max-pq-y" MPV_FORMAT_DOUBLE
"avg-pq-y" MPV_FORMAT_DOUBLE
``dwidth``, ``dheight``
Video display size. This is the video size after filters and aspect scaling

View File

@ -2716,42 +2716,6 @@ static int mp_property_vo_passes(void *ctx, struct m_property *prop,
return M_PROPERTY_OK;
}
static int mp_property_hdr_metadata(void *ctx, struct m_property *prop,
int action, void *arg)
{
MPContext *mpctx = ctx;
if (!mpctx->video_out)
return M_PROPERTY_UNAVAILABLE;
int valid = m_property_read_sub_validate(ctx, prop, action, arg);
if (valid != M_PROPERTY_VALID)
return valid;
struct pl_hdr_metadata data;
if (vo_control(mpctx->video_out, VOCTRL_HDR_METADATA, &data) != VO_TRUE)
return M_PROPERTY_UNAVAILABLE;
bool has_cie_y = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_CIE_Y);
bool has_hdr10 = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_HDR10);
bool has_hdr10plus = pl_hdr_metadata_contains(&data, PL_HDR_METADATA_HDR10PLUS);
struct m_sub_property props[] = {
{"min-luma", SUB_PROP_FLOAT(data.min_luma), .unavailable = !has_hdr10},
{"max-luma", SUB_PROP_FLOAT(data.max_luma), .unavailable = !has_hdr10},
{"max-cll", SUB_PROP_FLOAT(data.max_cll), .unavailable = !has_hdr10},
{"max-fall", SUB_PROP_FLOAT(data.max_fall), .unavailable = !has_hdr10},
{"scene-max-r", SUB_PROP_FLOAT(data.scene_max[0]), .unavailable = !has_hdr10plus},
{"scene-max-g", SUB_PROP_FLOAT(data.scene_max[1]), .unavailable = !has_hdr10plus},
{"scene-max-b", SUB_PROP_FLOAT(data.scene_max[2]), .unavailable = !has_hdr10plus},
{"scene-avg", SUB_PROP_FLOAT(data.scene_avg), .unavailable = !has_hdr10plus},
{"max-pq-y", SUB_PROP_FLOAT(data.max_pq_y), .unavailable = !has_cie_y},
{"avg-pq-y", SUB_PROP_FLOAT(data.avg_pq_y), .unavailable = !has_cie_y},
{0}
};
return m_property_read_sub(props, action, arg);
}
static int mp_property_perf_info(void *ctx, struct m_property *p, int action,
void *arg)
{
@ -3963,7 +3927,6 @@ static const struct m_property mp_properties_base[] = {
{"current-window-scale", mp_property_current_window_scale},
{"vo-configured", mp_property_vo_configured},
{"vo-passes", mp_property_vo_passes},
{"hdr-metadata", mp_property_hdr_metadata},
{"perf-info", mp_property_perf_info},
{"current-vo", mp_property_vo},
{"container-fps", mp_property_fps},