MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / packLuminanceP010

Function packLuminanceP010

sources/utils/FrameDecoder.cpp:90–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 };
89
90 static double packLuminanceP010(double x)
91 {
92 constexpr double pi2 = M_PI / 2.0;
93 if (x < 0.0)
94 {
95 return 0.0;
96 }
97 else if (x <= 0.7)
98 {
99 return x * 1.3;
100 }
101 else if (x <= 1)
102 {
103 return std::sin(pi2 * ((x - 0.7) / 0.3)) * (1 - signalBreakP010) + signalBreakP010;
104 }
105 return 1;
106 };
107
108 double unpackLuminanceP010(double x)
109 {

Callers 1

initP010Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected