diff options
author | Niklas Haas <git@haasn.dev> | 2023-07-17 16:37:36 +0200 |
---|---|---|
committer | Niklas Haas <github-daiK1o@haasn.dev> | 2023-07-18 15:22:18 +0200 |
commit | 02595011eb11a1f4d22339519205c2e087a45663 (patch) | |
tree | e67921cf4d36897fe956ef562a7c62034806d530 /video | |
parent | ac725764ec6dec30aa7c9aa2d4804699c7f6349a (diff) | |
download | mpv-02595011eb11a1f4d22339519205c2e087a45663.tar.bz2 mpv-02595011eb11a1f4d22339519205c2e087a45663.tar.xz |
vo_gpu_next: add --hdr-contrast-recovery/smoothness
New upstream feature. Disabled by default.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gpu/video.c | 5 | ||||
-rw-r--r-- | video/out/gpu/video.h | 2 | ||||
-rw-r--r-- | video/out/vo_gpu_next.c | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/video/out/gpu/video.c b/video/out/gpu/video.c index b38c88d054..4233f14336 100644 --- a/video/out/gpu/video.c +++ b/video/out/gpu/video.c @@ -325,6 +325,7 @@ static const struct gl_video_opts gl_video_opts_def = { .decay_rate = 100.0, .scene_threshold_low = 5.5, .scene_threshold_high = 10.0, + .contrast_smoothness = 3.5, }, .early_flush = -1, .shader_cache = true, @@ -421,6 +422,10 @@ const struct m_sub_options gl_video_conf = { M_RANGE(0, 20.0)}, {"hdr-scene-threshold-high", OPT_FLOAT(tone_map.scene_threshold_high), M_RANGE(0, 20.0)}, + {"hdr-contrast-recovery", OPT_FLOAT(tone_map.contrast_recovery), + M_RANGE(0, 2.0)}, + {"hdr-contrast-smoothness", OPT_FLOAT(tone_map.contrast_smoothness), + M_RANGE(1.0, 100.0)}, {"opengl-pbo", OPT_BOOL(pbo)}, SCALER_OPTS("scale", SCALER_SCALE), SCALER_OPTS("dscale", SCALER_DSCALE), diff --git a/video/out/gpu/video.h b/video/out/gpu/video.h index 307f7ea2ca..30c100e302 100644 --- a/video/out/gpu/video.h +++ b/video/out/gpu/video.h @@ -133,6 +133,8 @@ struct gl_tone_map_opts { float decay_rate; float scene_threshold_low; float scene_threshold_high; + float contrast_recovery; + float contrast_smoothness; int gamut_mode; bool visualize; }; diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 42164ecd98..155a97cc18 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1967,6 +1967,11 @@ static void update_render_options(struct vo *vo) p->color_map.tone_mapping_param = 0.0; p->color_map.visualize_lut = opts->tone_map.visualize; +#if PL_API_VER >= 285 + p->color_map.contrast_recovery = opts->tone_map.contrast_recovery; + p->color_map.contrast_smoothness = opts->tone_map.contrast_smoothness; +#endif + #if PL_API_VER >= 269 if (opts->tone_map.gamut_mode != GAMUT_AUTO) p->color_map.gamut_mapping = gamut_modes[opts->tone_map.gamut_mode]; |