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

◆ eval()

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

Definition at line 174 of file gamma_lut.h.

174 {
175 return x == 0 ? static_cast<u8>(0)
176 : x == 255 ? static_cast<u8>(255)
177 : static_cast<u8>(
178 (pow_fp(
179 static_cast<u32>((static_cast<u64>(x) << FRAC) / 255),
180 gamma_raw
181 ) * 255ULL + (SCALE >> 1)) >> FRAC
182 );
183}
constexpr u32 pow_fp(u32 base_raw, u32 exp_raw) FL_NOEXCEPT
Definition gamma_lut.h:161
unsigned char u8
Definition stdint.h:131
fl::u64 u64
Definition s16x16x4.h:221

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

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

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