tone_mapping: Fix inferred default tone map param
When the param is not set or zero, the default should be used before clamping, otherwise the param is left to the clamped minimum and the default param is never set.
Fixes: https://github.com/mpv-player/mpv/issues/11076
I'm not sure how to handle intentional param overrides to 0, the current code would default to the min instead.
I think defaulting to sane values makes sense.
Merge request reports
Activity
I'm not sure how to handle intentional param overrides to 0, the current code would default to the min instead.
This is basically intended behavior, to intentionally set it to 0 you effectively have to set it to something like
1e-6
instead. Actually, it doesn't matter too much, because the only curve that even accepts0.0
as a valid parameter ismobius
, and mobius withparam = 0.0
is mathematically identical toreinhard
. So this is not a very interesting parameter to set.Edited by Niklas HaasMerged manually as 1f832079