hot path optimization: make gamma correction inline

* make sure that gamma LUT is always initialized
* remove some unnecessary safety checks
* make gamma8() inline, for more speed
* use fast unGamma8 for preview
* add super-fast unGamma8 for HUB75 - old function lost 3-10 fps, this version does not reduce fps at all *grins*
This commit is contained in:
Frank
2025-11-10 23:17:16 +01:00
parent 4a323ba057
commit 36648d1936
6 changed files with 50 additions and 17 deletions

View File

@@ -886,6 +886,11 @@ void WLED::setup()
#endif
USER_PRINT(F("Free heap ")); USER_PRINTLN(ESP.getFreeHeap());USER_PRINTLN();
// WLEDMM force initial calculation of gamma correction LUT
if ((gammaCorrectVal < 0.999f) || (gammaCorrectVal > 3.0f)) calcGammaTable(1.0f); // no gamma => create linear LUT
else calcGammaTable(gammaCorrectVal);
USER_PRINTLN(F("WLED initialization done.\n"));
delay(50);
// repeat Ada prompt