FastLED 3.9.15
Loading...
Searching...
No Matches

◆ eval16()

u16 fl::detail::gamma_constexpr::eval16 ( u8 x,
u32 gamma_raw )
constexpr

Definition at line 189 of file gamma_lut.h.

189 {
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}
constexpr u32 pow_fp(u32 base_raw, u32 exp_raw) FL_NOEXCEPT
Definition gamma_lut.h:161
fl::u64 u64
Definition s16x16x4.h:221

References FL_NOEXCEPT, FRAC, pow_fp(), SCALE, and fl::x.

Referenced by fl::GammaEval16< GammaRaw >::operator()().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: