MCPcopy Create free account
hub / github.com/FastLED/FastLED / eval16

Function eval16

src/fl/gfx/gamma_lut.h:189–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187// Used by five-bit brightness and HD108 pipelines.
188
189constexpr u16 eval16(u8 x, u32 gamma_raw) FL_NOEXCEPT {
190 return x == 0 ? static_cast<u16>(0)
191 : x == 255 ? static_cast<u16>(65535)
192 : static_cast<u16>(
193 (pow_fp(
194 static_cast<u32>((static_cast<u64>(x) << FRAC) / 255),
195 gamma_raw
196 ) * 65535ULL + (SCALE >> 1)) >> FRAC
197 );
198}
199
200} // namespace gamma_constexpr
201} // namespace detail

Callers 1

operator()Method · 0.85

Calls 1

pow_fpFunction · 0.85

Tested by

no test coverage detected