* should properly decode all unicodes that fit into 2bytes UTF-16
* with error handling for well-known "malformed UTF-8" expoits
* puh, this stuff looks simple but the details are CRAZY 😝
part1:
* enable all bitmaps already defined in the font files (increases firmware by ~7KB)
* add traslation for unicode -> codepage437 (as used by font files)
* removed unnecessary sanity checks from sPC and gPC
* gPC: use inline color_fade() instead of FastLED .scale8()
in my tests on -S3 this gives a small speedup, 2% up to 6%
* add a dedicated callback for 2D downscaling only (no nested for loop)
-> up to 10% faster
* minor optimizations for 2D up/downscale drawpixel - move repeated calculations out of the inner loop
-> small speedup
- if a segment is destroyed or turned inactive, disable the gif player: only one gif player instance can run at a time, if a inactive or destroyed segment uses it, the effect is broken for other segments.
- copy FX ironically copied the source segment on each call, should use reference not a copy!
* move scaling calculation and decoder.setDrawPixelCallback() into a separate function
*re-calculate scaling before decoding a new frame
* reset gifWidth and gifHeight to zero in endplayback
* mark synchronization variables volatile (thread-safe)
* additional logic in closeFile() to avoid file write while leds are pushed out by NPB driver
* some comments and analysis
* replace "yield()" after file ops with "delay(0)" before operations.
* make sure that filenames can hold 32chars of segment.name
* fix logic error in Segment::drawCharacter
* protect free(Segment::_globalLeds) with a critical section
- Enabling DDP over WebSocket: this allows for UI or html tools to stream data to the LEDs much faster than through the JSON API.
- first byte of data array is used to determine protocol for future use
- Moved the duplicate function to establish a WS connection from the live-view htm files to common.js
- add better safety check for DDP: prevent OOB reads of buffer
- add better support for 1D gifs: use the full gif, row by row, scale if needed
- add blur slider to image FX
- improved safety checks to avoid crashes
- add "fast path" if image size matches virtual segment size
* increased ArrayAndSize.size from 8bit to 16bit
* prevent out-of-bounds access in JMapC::getPixelColor
* do not delete[] SEGMENT.name from outside of segment class !!
* make sure that fileName is big enough for segmentName".json"
* fix possible buffer overflow in f.readBytesUntil
* stop reading map{ } entries when customMappingSize is reached
* raise "low mem" error when malloc failed
* 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*