0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vo_gpu_next: expose --tone-mapping=st2094-40 and st2094-10

This commit is contained in:
Niklas Haas 2023-02-11 18:20:14 +01:00 committed by Niklas Haas
parent 79b093f210
commit 2d4a243810
5 changed files with 21 additions and 1 deletions

View File

@ -52,6 +52,7 @@ Interface changes
if fractional scaling support exists).
- change --screenshot-tag-colorspace default value from `no` to `yes`
- undeprecate vf_sub
- add `--tone-mapping=st2094-40` and `--tone-mapping=st2094-10`
--- mpv 0.35.0 ---
- add the `--vo=gpu-next` video output driver, as well as the options
`--allow-delayed-peak-detect`, `--builtin-scalers`,

View File

@ -6442,6 +6442,15 @@ them.
HDR<->SDR mapping specified in ITU-R Report BT.2446, method A. This is
the recommended curve for well-mastered content. (``--vo=gpu-next``
only)
st2094-40
Dynamic HDR10+ tone-mapping method specified in SMPTE ST2094-40 Annex
B. In the absence of metadata, falls back to a fixed spline matched to
the input/output average brightness characteristics. (``--vo=gpu-next``
only)
st2094-10
Dynamic tone-mapping method specified in SMPTE ST2094-10 Annex B.2.
Conceptually simpler than ST2094-40, and generally produces worse
results.
``--tone-mapping-param=<value>``
Set tone mapping parameters. By default, this is set to the special string
@ -6472,6 +6481,8 @@ them.
Specifies the scale factor to use while stretching. Defaults to 1.0.
spline
Specifies the knee point (in PQ space). Defaults to 0.30.
st2094-10
Specifies the contrast (slope) at the knee point. Defaults to 1.0.
``--inverse-tone-mapping``
If set, allows inverse tone mapping (expanding SDR to HDR). Not supported

View File

@ -384,7 +384,9 @@ const struct m_sub_options gl_video_conf = {
{"linear", TONE_MAPPING_LINEAR},
{"spline", TONE_MAPPING_SPLINE},
{"bt.2390", TONE_MAPPING_BT_2390},
{"bt.2446a", TONE_MAPPING_BT_2446A})},
{"bt.2446a", TONE_MAPPING_BT_2446A},
{"st2094-40", TONE_MAPPING_ST2094_40},
{"st2094-10", TONE_MAPPING_ST2094_10})},
{"tone-mapping-param", OPT_FLOATDEF(tone_map.curve_param)},
{"inverse-tone-mapping", OPT_FLAG(tone_map.inverse)},
{"tone-mapping-crosstalk", OPT_FLOAT(tone_map.crosstalk),

View File

@ -98,6 +98,8 @@ enum tone_mapping {
TONE_MAPPING_SPLINE,
TONE_MAPPING_BT_2390,
TONE_MAPPING_BT_2446A,
TONE_MAPPING_ST2094_40,
TONE_MAPPING_ST2094_10,
};
enum tone_mapping_mode {

View File

@ -1835,6 +1835,10 @@ static void update_render_options(struct vo *vo)
[TONE_MAPPING_SPLINE] = &pl_tone_map_spline,
[TONE_MAPPING_BT_2390] = &pl_tone_map_bt2390,
[TONE_MAPPING_BT_2446A] = &pl_tone_map_bt2446a,
#if PL_API_VER >= 246
[TONE_MAPPING_ST2094_40] = &pl_tone_map_st2094_40,
[TONE_MAPPING_ST2094_10] = &pl_tone_map_st2094_10,
#endif
};
static const enum pl_gamut_mode gamut_modes[] = {