mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 03:52:22 +02:00
vf_format: add hdr10plus sub-parameter to format video filter
This commit is contained in:
parent
d9c1e9bc5c
commit
024edb2991
@ -62,6 +62,7 @@ Interface changes
|
|||||||
over blending alpha components into specific background types
|
over blending alpha components into specific background types
|
||||||
- add `--border-background` option
|
- add `--border-background` option
|
||||||
- add `video-target-params` property
|
- add `video-target-params` property
|
||||||
|
- add `hdr10plus` sub-parameter to `format` video filter
|
||||||
--- mpv 0.37.0 ---
|
--- mpv 0.37.0 ---
|
||||||
- `--save-position-on-quit` and its associated commands now store state files
|
- `--save-position-on-quit` and its associated commands now store state files
|
||||||
in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows.
|
in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows.
|
||||||
|
@ -316,6 +316,10 @@ Available mpv-only filters are:
|
|||||||
Whether or not to include Dolby Vision metadata (default: yes). If
|
Whether or not to include Dolby Vision metadata (default: yes). If
|
||||||
disabled, any Dolby Vision metadata will be stripped from frames.
|
disabled, any Dolby Vision metadata will be stripped from frames.
|
||||||
|
|
||||||
|
``<hdr10plus=yes|no>``
|
||||||
|
Whether or not to include HDR10+ metadata (default: yes). If
|
||||||
|
disabled, any HDR10+ metadata will be stripped from frames.
|
||||||
|
|
||||||
``<film-grain=yes|no>``
|
``<film-grain=yes|no>``
|
||||||
Whether or not to include film grain metadata (default: yes). If
|
Whether or not to include film grain metadata (default: yes). If
|
||||||
disabled, any film grain metadata will be stripped from frames.
|
disabled, any film grain metadata will be stripped from frames.
|
||||||
|
@ -60,6 +60,7 @@ struct vf_format_opts {
|
|||||||
bool convert;
|
bool convert;
|
||||||
int force_scaler;
|
int force_scaler;
|
||||||
bool dovi;
|
bool dovi;
|
||||||
|
bool hdr10plus;
|
||||||
bool film_grain;
|
bool film_grain;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -178,6 +179,13 @@ static void vf_format_process(struct mp_filter *f)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!priv->opts->hdr10plus) {
|
||||||
|
memset(img->params.color.hdr.scene_max, 0,
|
||||||
|
sizeof(img->params.color.hdr.scene_max));
|
||||||
|
img->params.color.hdr.scene_avg = 0;
|
||||||
|
img->params.color.hdr.ootf = (struct pl_hdr_bezier){0};
|
||||||
|
}
|
||||||
|
|
||||||
if (!priv->opts->film_grain)
|
if (!priv->opts->film_grain)
|
||||||
av_buffer_unref(&img->film_grain);
|
av_buffer_unref(&img->film_grain);
|
||||||
|
|
||||||
@ -240,6 +248,7 @@ static const m_option_t vf_opts_fields[] = {
|
|||||||
{"dar", OPT_DOUBLE(dar)},
|
{"dar", OPT_DOUBLE(dar)},
|
||||||
{"convert", OPT_BOOL(convert)},
|
{"convert", OPT_BOOL(convert)},
|
||||||
{"dolbyvision", OPT_BOOL(dovi)},
|
{"dolbyvision", OPT_BOOL(dovi)},
|
||||||
|
{"hdr10plus", OPT_BOOL(hdr10plus)},
|
||||||
{"film-grain", OPT_BOOL(film_grain)},
|
{"film-grain", OPT_BOOL(film_grain)},
|
||||||
{"force-scaler", OPT_CHOICE(force_scaler,
|
{"force-scaler", OPT_CHOICE(force_scaler,
|
||||||
{"auto", MP_SWS_AUTO},
|
{"auto", MP_SWS_AUTO},
|
||||||
@ -256,6 +265,7 @@ const struct mp_user_filter_entry vf_format = {
|
|||||||
.priv_defaults = &(const OPT_BASE_STRUCT){
|
.priv_defaults = &(const OPT_BASE_STRUCT){
|
||||||
.rotate = -1,
|
.rotate = -1,
|
||||||
.dovi = true,
|
.dovi = true,
|
||||||
|
.hdr10plus = true,
|
||||||
.film_grain = true,
|
.film_grain = true,
|
||||||
},
|
},
|
||||||
.options = vf_opts_fields,
|
.options = vf_opts_fields,
|
||||||
|
Loading…
Reference in New Issue
Block a user