1
mirror of https://github.com/mpv-player/mpv synced 2024-10-02 16:25:33 +02:00

vo_opengl: support tone-mapping-param for clip

This just indicates a fixed linear coefficient to multiply into the
signal, similar to the old option --target-brightness (but the inverse
thereof). Good for testing purposes, which is why I added it. (This also
corresponds somewhat to what zimg does)
This commit is contained in:
Niklas Haas 2017-07-07 21:00:21 +02:00
parent 03596ac551
commit 8c0162e762
No known key found for this signature in database
GPG Key ID: 9A09076581B27402
2 changed files with 4 additions and 1 deletions

View File

@ -4712,6 +4712,9 @@ The following video options are currently all specific to ``--vo=opengl`` and
Set tone mapping parameters. Ignored if the tone mapping algorithm is not
tunable. This affects the following tone mapping algorithms:
clip
Specifies an extra linear coefficient to multiply into the signal
before clipping. Defaults to 1.0.
mobius
Specifies the transition point from linear to mobius transform. Every
value below this point is guaranteed to be mapped 1:1. The higher the

View File

@ -538,7 +538,7 @@ static void pass_tone_map(struct gl_shader_cache *sc, float ref_peak,
switch (algo) {
case TONE_MAPPING_CLIP:
GLSL(luma = clamp(luma, 0.0, 1.0);)
GLSLF("luma = clamp(%f * luma, 0.0, 1.0);\n", isnan(param) ? 1.0 : param);
break;
case TONE_MAPPING_MOBIUS: {