mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
vo_gpu_next: add --hdr-peak-percentile
This commit is contained in:
parent
14504e0559
commit
45e95311b8
@ -31,6 +31,7 @@ Interface changes
|
||||
in %LOCALAPPDATA% instead of %APPDATA% directory by default on Windows.
|
||||
- change `--subs-with-matching-audio` default from `no` to `yes`
|
||||
- change `--subs-fallback` default from `no` to `default`
|
||||
- add the `--hdr-peak-percentile` option
|
||||
--- mpv 0.36.0 ---
|
||||
- add `--target-contrast`
|
||||
- Target luminance value is now also applied when ICC profile is used.
|
||||
|
@ -6690,6 +6690,15 @@ them.
|
||||
advanced scaling is enabled. Defaults to on. (Only affects
|
||||
``--vo=gpu-next``, note that ``--vo=gpu`` always delays the peak.)
|
||||
|
||||
``--hdr-peak-percentile=<0.0..100.0>``
|
||||
Which percentile of the input image brightness histogram to consider as the
|
||||
true peak of the scene. If this is set to 100 (default), the
|
||||
brightest pixel is measured. Otherwise, the top of the frequency
|
||||
distribution is progressively cut off. Setting this too low will cause
|
||||
clipping of very bright details, but can improve the dynamic brightness
|
||||
range of scenes with very bright isolated highlights. Values other than 100
|
||||
come with a small performance penalty. (Only for ``--vo=gpu-next`)
|
||||
|
||||
``--hdr-peak-decay-rate=<1.0..1000.0>``
|
||||
The decay rate used for the HDR peak detection algorithm (default: 100.0).
|
||||
This is only relevant when ``--hdr-compute-peak`` is enabled. Higher values
|
||||
|
@ -416,6 +416,8 @@ const struct m_sub_options gl_video_conf = {
|
||||
{"auto", 0},
|
||||
{"yes", 1},
|
||||
{"no", -1})},
|
||||
{"hdr-peak-percentile", OPT_FLOAT(tone_map.peak_percentile),
|
||||
M_RANGE(0.0, 100.0)},
|
||||
{"hdr-peak-decay-rate", OPT_FLOAT(tone_map.decay_rate),
|
||||
M_RANGE(1.0, 1000.0)},
|
||||
{"hdr-scene-threshold-low", OPT_FLOAT(tone_map.scene_threshold_low),
|
||||
|
@ -133,6 +133,7 @@ struct gl_tone_map_opts {
|
||||
float decay_rate;
|
||||
float scene_threshold_low;
|
||||
float scene_threshold_high;
|
||||
float peak_percentile;
|
||||
float contrast_recovery;
|
||||
float contrast_smoothness;
|
||||
int gamut_mode;
|
||||
|
@ -1883,6 +1883,7 @@ static void update_render_options(struct vo *vo)
|
||||
p->peak_detect.smoothing_period = opts->tone_map.decay_rate;
|
||||
p->peak_detect.scene_threshold_low = opts->tone_map.scene_threshold_low;
|
||||
p->peak_detect.scene_threshold_high = opts->tone_map.scene_threshold_high;
|
||||
p->peak_detect.percentile = opts->tone_map.peak_percentile;
|
||||
|
||||
const struct pl_tone_map_function * const tone_map_funs[] = {
|
||||
[TONE_MAPPING_AUTO] = &pl_tone_map_auto,
|
||||
|
Loading…
Reference in New Issue
Block a user