BlueAndi / Pixelix

Full RGB LED matrix, based on an ESP32 and WS2812B LEDs.
MIT License
303 stars 59 forks source link

[Feature] Optimize GETDISP command #199

Closed nhjschulz closed 2 weeks ago

nhjschulz commented 2 weeks ago

Is your feature request related to a problem? Please describe. no

Describe the solution you'd like Add a simple "compression" to framebuffer uploads. The unused upper 8 bits of an RGB value can be used as a repeat count. It tells how often the same color shall be used on the pixels that follow. This significantly reduces frame buffer traffic to the websockt, expecially for 64x64 layouts.

Example: To upload an empty black 32x8 frame buffer, only a single 0xFF000000 data value will be send.

Describe alternatives you've considered Use zlib or other compressions. But these0 likely increase flash footprint causing issues with 4 MB modules.

BlueAndi commented 2 weeks ago

Thanks!