Commit Graph

22 Commits

Author SHA1 Message Date
Frank
271e9ac7b7 image loader: allow graceful takeover after error
Allow decoder "takeover" by another segment
a) when last segment has decoding error (unsupported file, etc.)
b) when last segment became inactive
2025-11-17 14:45:07 +01:00
Frank
cd2dc437a3 replace magic number by constant
32 => WLED_MAX_SEGNAME_LEN
2025-11-14 11:40:26 +01:00
Frank
f95dae1b1b ensure that lastFilename is always terminated properly 2025-11-14 01:40:46 +01:00
Frank
6ae4b1fc38 comment to prevent future "false improvement" attempts 2025-11-14 01:26:52 +01:00
Frank
fc776eeb16 add comment to explain coordinate packing logic 2025-11-14 01:08:48 +01:00
Damian Schneider
79376bbc58 improved lastCoordinate calculation 2025-11-13 18:26:00 +01:00
Damian Schneider
3b14c31e00 fix noScale callback, allow for more blur, removed some whitespaces 2025-11-11 21:09:48 +01:00
Frank
a96e88043d remove commented code for no-PSRAM boards
*sigh* changing gifdecoder parameters seems to have _no_ effect on RAM needed
2025-11-09 20:24:57 +01:00
Frank
29d2f7fc1b debug print for decodeFrame error codes 2025-11-09 19:06:59 +01:00
Frank
1324d49098 revert smaller gif size limits for board without PSRAM
see discussion in PR#5040
2025-11-09 18:28:12 +01:00
Frank
79a52a60ff small optimization: fast 2D drawing without scaling
for 2D segments, setPixelColorXY() should be used because it is faster than  setPixelColor().
2025-11-09 18:14:50 +01:00
Frank
6581dd6ff9 add blur option 2025-11-09 17:33:04 +01:00
Frank
4659939547 error handling and robustness improvements
* catch some error that would lead to undefined behavior
* additional debug messages in case of errors
* robustness: handle OOM exception from  decoder.alloc() gracefully
2025-11-09 17:29:56 +01:00
Damian Schneider
790be35ab8 make all globals static 2025-11-08 16:04:08 +01:00
Damian Schneider
0eef321f88 uising is2D() to check if segment is 2D, use vLength() on 1D setups 2025-11-08 12:54:25 +01:00
Damian Schneider
69dfe6c8a1 speed optimizations: skip setting multiple times, "fastpath" if no scaling needed 2025-11-08 12:01:40 +01:00
Damian Schneider
0e043b2a1b changed to vWidth/vHeight
- since we draw on a segment, we need to use virtual segment dimensions or scaling will be off when using any virtualisation like grouping/spacing/mirror etc.
2025-11-06 15:23:43 +01:00
Damian Schneider
01c84b0140 add better 1D support for gif images
Instead of showing a scaled, single line of the GIF: map the full gif to the strip
2025-11-06 14:55:26 +01:00
Damian Schneider
d5d7fde30f use video scaling instead of NPB luminance & new ABL (#4798)
* updated color scaling to preserve hue at low brightness resulting in much better colors
* replace NPBlg with NPB, moved brightness scaling to bus manager
* improved gamma table calculation: fixed mismatch in inverting gamma table calculation: inversion should now be as good as it gets
* code cleanup, fixed gamma being applied in unnecessary places

Improvements to ABL handling:
- removed strip level handling, ist now all done on bus level
- limiter now respects pixel mapping
- proper handling of white channel
- improved current estimation
- current is now always correctly reported to UI
- minimal FPS impact if the ABL is not limiting but slighly higher impact for global ABL limit due to double-scaling

- moved brightness scaling to BusDigital
- created new header file colors.h to be able to access color functions in bus-manager.
- updated colo_fade() with better video scaling to preserve hue's at low brightness
- added IRAM_ATTR to color_fade (negligible speed impact when compared to inline and benefits other functions)
- added IRAM_ATTR to color_blend as it is used a lot throughout the code, did not test speed impact but adding it to color_fade made it almost on-par with an inlined function

Additional changes:
- fixes for properly handling `scaledBri()` (by @blazoncek)
- also use bit-shift instead of division in blending for ESP8266
- improvements for faster "softlight" calculation in blending
- changed some variables to uint8_t to maybe let the compiler optimize better, uint8_t can be faster if read, store and set are all done in uint8_t, which is the case in the ones I changed
- various minor code formatting changes
2025-08-29 17:12:10 +02:00
Blaž Kristan
0f321bfb38 Compilation fixes 2025-04-23 18:38:34 +02:00
Will Tatam
56b8af86d7 Swap to WLED_ENABLE_GIF 2025-01-14 18:40:41 +00:00
Christian Schwinne
e852df3179 Proper debug statements 2025-01-14 18:30:34 +00:00