HUB75 speedups and minor improvements

* HUB75: allow to use native driver gamma correction - requires to undo WLED gamma
* added unGamma24() function
* HUB75: optimized setPixelColor()
* some experimental HUB75 stuff
This commit is contained in:
Frank
2024-08-05 17:28:03 +02:00
parent 6505e04cbf
commit 078bd70775
5 changed files with 34 additions and 11 deletions

View File

@@ -413,6 +413,12 @@ uint8_t unGamma8(uint8_t value) {
if (gammaTinv[255] == 0) calcInvGammaTable(gammaCorrectVal);
return gammaTinv[value];
}
uint32_t unGamma24(uint32_t c) {
if ((gammaCorrectVal < 0.999f) || (gammaCorrectVal > 3.0f)) return c;
if (gammaTinv[255] == 0) calcInvGammaTable(gammaCorrectVal);
return RGBW32(gammaTinv[R(c)], gammaTinv[G(c)], gammaTinv[B(c)], W(c));
}
// wleDMM end
uint8_t gamma8_cal(uint8_t b, float gamma)