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