diff --git a/DOCS/interface-changes/el.txt b/DOCS/interface-changes/el.txt new file mode 100644 index 0000000000..1486ba6971 --- /dev/null +++ b/DOCS/interface-changes/el.txt @@ -0,0 +1 @@ +add `vf=format=enhancement-layer` option diff --git a/DOCS/man/vf.rst b/DOCS/man/vf.rst index 97b73dd3c7..086295d40c 100644 --- a/DOCS/man/vf.rst +++ b/DOCS/man/vf.rst @@ -323,6 +323,12 @@ Available mpv-only filters are: Whether or not to include HDR10+ metadata (default: yes). If disabled, any HDR10+ metadata will be stripped from frames. + ```` + Whether or not to apply the image enhancement layer (default: yes). + If disabled, the enhancement-layer frame paired with each base-layer + frame is discarded. Currently this controls Dolby Vision Profile 7 FEL + application. + ```` Set the minimum luminance value for the mastering display metadata. This is a float value in nits (cd/m²). diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c index 3179d34d05..25d78aa01a 100644 --- a/video/filter/vf_format.c +++ b/video/filter/vf_format.c @@ -61,6 +61,7 @@ struct vf_format_opts { int force_scaler; bool dovi; bool hdr10plus; + bool enhancement_layer; float min_luma; float max_luma; float max_cll; @@ -187,6 +188,9 @@ static void vf_format_process(struct mp_filter *f) }); } + if (!priv->opts->enhancement_layer) + mp_image_unrefp(&img->enhancement_layer); + if (!priv->opts->hdr10plus) { memset(img->params.color.hdr.scene_max, 0, sizeof(img->params.color.hdr.scene_max)); @@ -269,6 +273,7 @@ static const m_option_t vf_opts_fields[] = { {"dar", OPT_DOUBLE(dar)}, {"convert", OPT_BOOL(convert)}, {"dolbyvision", OPT_BOOL(dovi)}, + {"enhancement-layer", OPT_BOOL(enhancement_layer)}, {"hdr10plus", OPT_BOOL(hdr10plus)}, {"min-luma", OPT_FLOAT(min_luma), M_RANGE(0, 10000)}, {"max-luma", OPT_FLOAT(max_luma), M_RANGE(0, 10000)}, @@ -290,6 +295,7 @@ const struct mp_user_filter_entry vf_format = { .priv_defaults = &(const OPT_BASE_STRUCT){ .rotate = -1, .dovi = true, + .enhancement_layer = true, .hdr10plus = true, .film_grain = true, },