effect math sppedup - up to 3x faster
-> distortion waves 3x speedup -> hiphotic 2x speedup -> waving cell 1.5x speedup * replace sin8_t by lookup-table with pre-computed values * moved integer sin and cos to fcn_declare.h (inlined by the compiler) * moved gamma32 to fcn_declare.h (inlined by the compiler) * a few other small tweaks
This commit is contained in:
@@ -486,6 +486,9 @@ IRAM_ATTR_YN __attribute__((hot)) uint8_t gamma8_slow(uint8_t b) // WLEDMM add
|
||||
return gammaT[b];
|
||||
}
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
// WLEDMM: gamma32() moved to fcn_declare.h (inlining for speed)
|
||||
#else
|
||||
// used for color gamma correction
|
||||
IRAM_ATTR_YN uint32_t __attribute__((hot)) gamma32(uint32_t color)
|
||||
{
|
||||
@@ -500,3 +503,4 @@ IRAM_ATTR_YN uint32_t __attribute__((hot)) gamma32(uint32_t color)
|
||||
b = gammaT[b];
|
||||
return RGBW32(r, g, b, w);
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user