mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 12:02:23 +02:00
vo_opengl: rename tone-mapping=simple to reinhard
This is the canonical name for the algorithm. I simply didn't know it before.
This commit is contained in:
parent
899d3e55b3
commit
48015009b7
@ -1071,9 +1071,9 @@ Available video output drivers are:
|
||||
|
||||
clip
|
||||
Hard-clip any out-of-range values (default)
|
||||
simple
|
||||
Very simple continuous curve. Preserves dynamic range and peak but
|
||||
uses nonlinear contrast.
|
||||
reinhard
|
||||
Reinhard tone mapping algorithm. Very simple continuous curve.
|
||||
Preserves dynamic range and peak but uses nonlinear contrast.
|
||||
gamma
|
||||
Fits a logarithmic transfer between the tone curves.
|
||||
linear
|
||||
@ -1084,7 +1084,7 @@ Available video output drivers are:
|
||||
Set tone mapping parameters. Ignored if the tone mapping algorithm is
|
||||
not tunable. This affects the following tone mapping algorithms:
|
||||
|
||||
simple
|
||||
reinhard
|
||||
Specifies the local contrast coefficient at the display peak.
|
||||
Defaults to 0.5, which means that in-gamut values will be about
|
||||
half as bright as when clipping.
|
||||
|
@ -383,10 +383,10 @@ const struct m_sub_options gl_video_conf = {
|
||||
OPT_CHOICE_C("target-trc", target_trc, 0, mp_csp_trc_names),
|
||||
OPT_INTRANGE("target-brightness", target_brightness, 0, 1, 100000),
|
||||
OPT_CHOICE("hdr-tone-mapping", hdr_tone_mapping, 0,
|
||||
({"clip", TONE_MAPPING_CLIP},
|
||||
{"simple", TONE_MAPPING_SIMPLE},
|
||||
{"gamma", TONE_MAPPING_GAMMA},
|
||||
{"linear", TONE_MAPPING_LINEAR})),
|
||||
({"clip", TONE_MAPPING_CLIP},
|
||||
{"reinhard", TONE_MAPPING_REINHARD},
|
||||
{"gamma", TONE_MAPPING_GAMMA},
|
||||
{"linear", TONE_MAPPING_LINEAR})),
|
||||
OPT_FLOAT("tone-mapping-param", tone_mapping_param, 0),
|
||||
OPT_FLAG("pbo", pbo, 0),
|
||||
SCALER_OPTS("scale", SCALER_SCALE),
|
||||
|
@ -105,7 +105,7 @@ enum prescalers {
|
||||
|
||||
enum tone_mapping {
|
||||
TONE_MAPPING_CLIP,
|
||||
TONE_MAPPING_SIMPLE,
|
||||
TONE_MAPPING_REINHARD,
|
||||
TONE_MAPPING_GAMMA,
|
||||
TONE_MAPPING_LINEAR,
|
||||
};
|
||||
|
@ -327,7 +327,7 @@ void pass_tone_map(struct gl_shader_cache *sc, float peak_src, float peak_dst,
|
||||
GLSL(color.rgb = clamp(color.rgb, 0.0, 1.0);)
|
||||
break;
|
||||
|
||||
case TONE_MAPPING_SIMPLE: {
|
||||
case TONE_MAPPING_REINHARD: {
|
||||
float contrast = isnan(param) ? 0.5 : param,
|
||||
offset = (1.0 - contrast) / contrast;
|
||||
GLSLF("color.rgb = color.rgb / (color.rgb + vec3(%f));\n", offset);
|
||||
|
Loading…
Reference in New Issue
Block a user