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/opsin_params.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/opsin_params.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/cms/opsin_params.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/cms/opsin_params.h b/third_party/jpeg-xl/lib/jxl/cms/opsin_params.h index 48e8e254f7..69dcd0b512 100644 --- a/third_party/jpeg-xl/lib/jxl/cms/opsin_params.h +++ b/third_party/jpeg-xl/lib/jxl/cms/opsin_params.h @@ -6,7 +6,7 @@ #ifndef LIB_JXL_CMS_OPSIN_PARAMS_H_ #define LIB_JXL_CMS_OPSIN_PARAMS_H_ -#include <array> +#include "lib/jxl/base/matrix_ops.h" // Constants that define the XYB color space. @@ -35,21 +35,20 @@ constexpr float kOpsinAbsorbanceBias1 = kOpsinAbsorbanceBias0; constexpr float kOpsinAbsorbanceBias2 = kOpsinAbsorbanceBias0; // Opsin absorbance matrix is now frozen. -constexpr std::array<float, 9> kOpsinAbsorbanceMatrix = { - kM00, kM01, kM02, kM10, kM11, kM12, kM20, kM21, kM22, -}; +constexpr Matrix3x3 kOpsinAbsorbanceMatrix{ + {{kM00, kM01, kM02}, {kM10, kM11, kM12}, {kM20, kM21, kM22}}}; -constexpr std::array<float, 9> kDefaultInverseOpsinAbsorbanceMatrix = { - 11.031566901960783f, -9.866943921568629f, -0.16462299647058826f, - -3.254147380392157f, 4.418770392156863f, -0.16462299647058826f, - -3.6588512862745097f, 2.7129230470588235f, 1.9459282392156863f}; +constexpr Matrix3x3 kDefaultInverseOpsinAbsorbanceMatrix{ + {{11.031566901960783f, -9.866943921568629f, -0.16462299647058826f}, + {-3.254147380392157f, 4.418770392156863f, -0.16462299647058826f}, + {-3.6588512862745097f, 2.7129230470588235f, 1.9459282392156863f}}}; // Must be the inverse matrix of kOpsinAbsorbanceMatrix and match the spec. -static inline const float* DefaultInverseOpsinAbsorbanceMatrix() { - return kDefaultInverseOpsinAbsorbanceMatrix.data(); +static inline const Matrix3x3& DefaultInverseOpsinAbsorbanceMatrix() { + return kDefaultInverseOpsinAbsorbanceMatrix; } -constexpr std::array<float, 3> kOpsinAbsorbanceBias = { +constexpr Vector3 kOpsinAbsorbanceBias = { kOpsinAbsorbanceBias0, kOpsinAbsorbanceBias1, kOpsinAbsorbanceBias2, @@ -63,14 +62,14 @@ constexpr float kScaledXYBOffset0 = 0.015386134f; constexpr float kScaledXYBOffset1 = 0.0f; constexpr float kScaledXYBOffset2 = 0.27770459f; -constexpr std::array<float, 3> kScaledXYBOffset = { - kScaledXYBOffset0, kScaledXYBOffset1, kScaledXYBOffset2}; +constexpr Vector3 kScaledXYBOffset = {kScaledXYBOffset0, kScaledXYBOffset1, + kScaledXYBOffset2}; constexpr float kScaledXYBScale0 = 22.995788804f; constexpr float kScaledXYBScale1 = 1.183000077f; constexpr float kScaledXYBScale2 = 1.502141333f; -constexpr std::array<float, 3> kScaledXYBScale = { +constexpr Vector3 kScaledXYBScale = { kScaledXYBScale0, kScaledXYBScale1, kScaledXYBScale2, |