12#include "../geometry/geometry.hpp"
13#include "../macros.hpp"
17hi_export_module(hikogui.color.Rec2100);
19hi_export
namespace hi {
inline namespace v1 {
39 constexpr float c1 = 0.8359375f;
40 constexpr float c2 = 18.8515625f;
41 constexpr float c3 = 18.6875f;
42 constexpr float m1 = 0.1593017578125f;
43 constexpr float m2 = 78.84375;
47 return std::pow((c1 + c2 * Lm1) / (1.0f + c3 * Lm1), m2);
58 constexpr float c1 = 0.8359375f;
59 constexpr float c2 = 18.8515625f;
60 constexpr float c3 = 18.6875f;
61 constexpr float m1 = 0.1593017578125f;
62 constexpr float m2 = 78.84375;
64 auto const Nm2 =
std::pow(N, 1.0f / m2);
66 return std::pow((Nm2 - c1) / (c2 - c3 * Nm2), 1.0f / m1);
color space conversion matrices between XYZ and Rec.2020
constexpr matrix3 XYZ_to_Rec2020
XYZ to Rec.2020 color space conversion matrix.
Definition Rec2020.hpp:30
constexpr matrix3 XYZ_to_Rec2100
XYZ to Rec.2100 color space conversion matrix.
Definition Rec2100.hpp:29
float Rec2100_linear_to_gamma(float L) noexcept
Rec.2100 linear to gamma transfer function.
Definition Rec2100.hpp:37
constexpr matrix3 Rec2020_to_XYZ
Rec.2020 to XYZ color space conversion matrix.
Definition Rec2020.hpp:25
constexpr matrix3 Rec2100_to_XYZ
Rec.2100 to XYZ color space conversion matrix.
Definition Rec2100.hpp:24
float Rec2100_gamma_to_linear(float N) noexcept
Rec.2100 gamma to linear transfer function.
Definition Rec2100.hpp:56
The HikoGUI namespace.
Definition array_generic.hpp:20
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
A 2D or 3D homogenius matrix for transforming homogenious vectors and points.
Definition matrix3.hpp:36