diff options
| author | Emil Muratov <gpm@hotplug.ru> | 2021-02-20 18:39:17 +0300 |
|---|---|---|
| committer | Emil Muratov <gpm@hotplug.ru> | 2021-02-20 21:03:06 +0300 |
| commit | 1bbbcf6b6548e176d82d50910fbb8f6a152e41c5 (patch) | |
| tree | 940a9df207b873fc67ad2d54749000699ac9df37 /doc | |
| parent | fc1956deb6b5861a3c4755d08dc2af7ffd1fb843 (diff) | |
TOC for readme
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/BuildOptions.md | 14 | ||||
| -rw-r--r-- | doc/i2s_memcalc.md | 16 |
2 files changed, 16 insertions, 14 deletions
diff --git a/doc/BuildOptions.md b/doc/BuildOptions.md index 4207a58..bf6f5ad 100644 --- a/doc/BuildOptions.md +++ b/doc/BuildOptions.md @@ -11,23 +11,21 @@ lib_deps = ESP32 HUB75 LED MATRIX PANEL DMA Display build_flags = -DSERIAL_DEBUG - -DNO_GFX + -DNO_GFX ``` -##Build flags +## Build flags | Flag | Description | Note | | :------------ |---------------|-----| -| **SERIAL_DEBUG** |Print out detailed information about memory allocations, DMA descriptors setup and color depth BCM | +| **SERIAL_DEBUG** |Print out detailed information about memory allocations, DMA descriptors setup and color depth [BCM](http://www.batsocks.co.uk/readme/art_bcm_5.htm) | | **USE_GFX_ROOT** | Use [lightweight](https://github.com/mrfaptastic/Adafruit_GFX_Lite) version of AdafuitGFX, without Adafruit BusIO extensions | You **must** install [Adafruit_GFX_Lite](https://github.com/mrfaptastic/Adafruit_GFX_Lite) library instead of original AdafruitGFX| -| **NO_GFX** | Build without AdafuitGFX API, only native methods supported based on manipulating DMA buffer. I.e. no methods of drawing circles/shapes, typing text or using fonts!!! This might save some resources for applications using it's own internal graphics buffer or works solely with per-pixel manipulation. For example Aurora effects can work fine w/o AdafruitGFX. | Use this if you rely on FastLED, Neomatrix or any other API. For example Aurora effects can work fine w/o AdafruitGFX. | +| **NO_GFX** | Build without AdafuitGFX API, only native methods supported based on manipulating DMA buffer. I.e. no methods of drawing circles/shapes, typing text or using fonts!!! This might save some resources for applications using it's own internal graphics buffer or working solely with per-pixel manipulation. | Use this if you rely on FastLED, Neomatrix or any other API. For example [Aurora](/examples/AuroraDemo/) effects can work fine w/o AdafruitGFX. | | **NO_FAST_FUNCTIONS** | Do not build auxiliary speed-optimized functions. Those are used to speed-up operations like drawing straight lines or rectangles. Otherwise lines/shapes are drawn using drawPixel() method. The trade-off for speed is RAM/code-size, take it or leave it ;) | If you are not using AdafruitGFX than you probably do not need this eather| |**NO_CIE1931**|Do not use LED brightness [compensation](https://ledshield.wordpress.com/2012/11/13/led-brightness-to-your-eye-gamma-correction-no/) described in [CIE 1931](https://en.wikipedia.org/wiki/CIE_1931_color_space). Normaly library would adjust every pixel's RGB888 so that liminance (or brighness control) for the corresponding LED's would apper 'linear' to the human's eye. I.e. a white dot with rgb(128,128,128) would seem to be at 50% brightness between rgb(0,0,0) and rgb(255,255,255). Normaly you would like to keep this enabled by default. Not only it makes brightness control "linear", it also makes colors more vivid, otherwise it looks brighter but 'bleached'.|You might want to turn it off in some special cases like: <ul><li>Using some other overlay lib for intermediate calculations that makes it's own compensation, like FastLED's [dimming functions](http://fastled.io/docs/3.1/group___dimming.html).<li>running at low color depth's - it **might** (or might not) look better in shadows, darker gradients w/o compensation, try it<li>you run for as bright output as possible, no matter what (make sure you have proper powering)<li>you run for speed/save resources at all costs</ul> | - - -##Build-time variables +## Build-time variables | Flag | Description | Note | | :------------ |---------------|-----| -| **PIXEL_COLOR_DEPTH_BITS=8** | Color depth per color per pixel in range 2-8. More bit's - more natural color. But on the other hand every additional bit:<ul><li>eats ~2.5 bits of DMA memoy per pixel<li>reduces matrix refresh rate in power of two due to nature of [BCM]((http://www.batsocks.co.uk/readme/art_bcm_5.htm)</ul> | Default is 8 bits per color per pixel, i.e. TrueColor 24 bit RGB. For higher resolutions, from 64x64 and above it is not possible to provide full 24 bits color without significant flickering OR reducing dynamic range in shadows. In that case using 5-6 bits at high res make very small difference to the humans eye actually. Refer to the [I2S memcalc](i2s_memcalc.md) for more details|
\ No newline at end of file +| **PIXEL_COLOR_DEPTH_BITS=8** | Color depth per color per pixel in range 2-8. More bit's - more natural color. But on the other hand every additional bit:<ul><li>eats ~2.5 bits of DMA memoy per pixel<li>reduces matrix refresh rate in power of two due to nature of [BCM](http://www.batsocks.co.uk/readme/art_bcm_5.htm)</ul> | Default is 8 bits per color per pixel, i.e. TrueColor 24 bit RGB. For higher resolutions, from 64x64 and above it is not possible to provide full 24 bits color without significant flickering OR reducing dynamic range in shadows. In that case using 5-6 bits at high res make very small difference to the humans eye actually. Refer to the [I2S memcalc](i2s_memcalc.md) for more details|
\ No newline at end of file diff --git a/doc/i2s_memcalc.md b/doc/i2s_memcalc.md index 2997376..47806af 100644 --- a/doc/i2s_memcalc.md +++ b/doc/i2s_memcalc.md @@ -1,7 +1,7 @@ ### I2S HUB75 Calculator I've made this [spreadsheet](i2s_memcalc.xlsm) to estimate all of the main parameters for ESP32-HUB75-MatrixPanel-I2S-DMA lib driving any combination of matrixes/chains so that I do not need to reflash it hundreds of times just to check for the debug info about memory. -Be sure to enable embede macro's to allow refresh rate calculations. +Be sure to enable embeded macro's to allow refresh rate calculations.  Just fill-in all of the INPUT fields and get the OUTPUTs. @@ -19,16 +19,20 @@ And there are lot's of hogs for those: Equalising ones with the others results in **Refresh rate**, -or (rough approximation) $$RefreshRate=\frac{resolution \times chain \times (ColorDepth-LSB2MSB)}{ I ^2S _ {clock} }$$ +or (rough approximation) +<img src="https://render.githubusercontent.com/render/math?math=RefreshRate=\frac{resolution%20\times%20chain%20\times%20(ColorDepth-LSB2MSB)}{%20I%20^2S%20_%20{clock}%20}"> -So, how to find otimum balance for all of these? Obviously you can't change *resolution* and *chain length* it's a physical characteristics and the is not much you can do about it except cutting of your chain or pushing it to the memory limits. +[//]: # (github markdown does not like LaTex formulas) +[//]: # ($$RefreshRate=\frac{resolution \times chain \times (ColorDepth-LSB2MSB)}{ I ^2S _ {clock} }$$) + +So, how to find optimum balance for all of these? Obviously you can't change *resolution* and *chain length*, it is physical characteristics and there is not much you can do about it except cutting of your chain or pushing it to the memory limits. There are 3 parameters you can choose from (actually two:) - - Color Depth - predefined at build-time option + - **Color Depth** - predefined at [build-time]((/doc/BuildOptions.md)) option - - $$I^2S$$ clock speed - run-time tunable with a very limited options + - I2S clock speed - run-time tunable with a very limited options -- LSB to MSB transition - it can't be controlled in any way, library uses it internaly trying to balance all of the above +- **LSB-to-MSB** transition - it can't be controlled in any way, library uses it internaly trying to balance all of the above Using provided table it is possible to estimate all of the parameters before running the library. Besides calculating memory requirements it could help to find **optimum color depth** for your matrix configuration. For higher resolutions default 8 bits could be too much to sustain minimal refresh rate and avoid annoying flickering. So the library would increase MSB transition to keep the balance, thus reducing dynamic range in shadows and dark colors. As a result it is nearly almost the same as just reducing overal color depth. **But** reducing global color depth would also saves lot's of precious RAM! Now it's all up to you to decide :) |
