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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user