diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h b/third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h index 3d94ccea12..7d09beed32 100644 --- a/third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h +++ b/third_party/jpeg-xl/lib/jxl/cms/tone_mapping-inl.h @@ -100,14 +100,14 @@ class HlgOOTF : HlgOOTF_Base { using HlgOOTF_Base::HlgOOTF_Base; static HlgOOTF FromSceneLight(float display_luminance, - const float primaries_luminances[3]) { + const Vector3& primaries_luminances) { return HlgOOTF(/*gamma=*/1.2f * std::pow(1.111f, std::log2(display_luminance / 1000.f)), primaries_luminances); } static HlgOOTF ToSceneLight(float display_luminance, - const float primaries_luminances[3]) { + const Vector3& primaries_luminances) { return HlgOOTF( /*gamma=*/(1 / 1.2f) * std::pow(1.111f, -std::log2(display_luminance / 1000.f)), @@ -132,7 +132,7 @@ class HlgOOTF : HlgOOTF_Base { }; template <typename V> -void GamutMap(V* red, V* green, V* blue, const float primaries_luminances[3], +void GamutMap(V* red, V* green, V* blue, const Vector3& primaries_luminances, float preserve_saturation = 0.1f) { hwy::HWY_NAMESPACE::DFromV<V> df; const V luminance = |